[dm-crypt] cryptsetup creates 1.8 Gb when it should be 1Tb

metageek pedro at gepasi.org
Mon Oct 28 20:28:31 CET 2013


Ok, problem solved now,

the last poster was spot on, for some reason that I cannot figure out, there
was a regular file /dev/sdb1. After removing it (with the drive
disconnected), everything works. 

The drive is a Seagate Backup Plus portable drive
 
I'm running cryptsetup version 1.4.3 (the version in Slackware64 14.0,
running kernel 3.8.8)

# dd if=/dev/zero of=/dev/sdb bs=1GB
dd: writing '/dev/sdb': No space left on device
1001+0 records in
1000+0 records out
1000204885504 bytes (1.0 TB) copied, 12064.5 s, 82.9 MB/s

so it is really 1.0 TB there (not a fake one)

#smartctl -i
/dev/sdb: Unknown USB bridge [0x0bc2:0xa013 (0x100)]

Now, status reports the full drive and no loopback:

# cryptsetup -v status pjhomecrypt
/dev/mapper/pjhomecrypt is active.
  type:    LUKS1
  cipher:  aes-cbc-essiv:sha256
  keysize: 256 bits
  device:  /dev/sdb1
  offset:  4096 sectors
  size:    1953521008 sectors
  mode:    read/write
Command successful.

The filesystem was created successfully with ~ 1 TB.

Problem solved.
Thanks everyone!





More information about the dm-crypt mailing list