1

I am trying to mount one of my file containers: it contains an ext-4 volume and the file is also on an ext-4 volume (using Linux).

The Veracrypt GUI makes a popup: mount: /media/veracrypt5: mount(2) system call failed: Structure needs cleaning.

Syslog:

Jul 23 06:37:11 sus kernel: [ 3539.354847] EXT4-fs (dm-2): ext4_check_descriptors: Block bitmap for group 41984 not in group (block 2980594717749601960)!
Jul 23 06:37:11 sus kernel: [ 3539.354852] EXT4-fs (dm-2): group descriptors corrupted!
Jul 23 06:37:11 sus systemd[1]: tmp-.veracrypt_aux_mnt3.mount: Succeeded.
Jul 23 06:37:11 sus systemd[1302]: tmp-.veracrypt_aux_mnt3.mount: Succeeded.

I tried to mount with the Veracrypt command-line tool and getting "Structure needs cleaning" there too.

I tried to add additional options there which did not help: --force --mount-options=readonly

When using normal drives I can use fsck on the unmounted volume, e.g. on /dev/sdc

But Veracrypt's unmounted volume is encrypted, so how would I use fsck and on what file?

Or is there some other way to repair?

1 Answer 1

3

VeraCrypt's 'mount' consists of two steps – first attaching the encrypted device so that a virtual "clear-text" device becomes visible to the OS, and only then mounting that device as a filesystem.

As far as I know, VeraCrypt uses the built-in Linux "Device Mapper" dm-crypt framework (exactly the same as LUKS), so you would find the mapped device under /dev/mapper/<some name>.

I've found hints on forums that if you use VeraCrypt from CLI, then the --filesystem none option should do what you need – set up the clear device without trying to mount its filesystem.

The LUKS cryptsetup tool also recognizes VeraCrypt volumes – use cryptsetup open to set up the dm-crypt device instead of going through VeraCrypt.

1
  • --filesystem none is exactly what I need. I am still running sudo fsck -c -v /dev/mapper/veracrypt5 . When that finishes I will have to compare versus backups whether something is corrupted or newer. But I consider this done/accepted, thank you Commented Jul 23, 2022 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .