Re: Failure to encrypt a big disk - missing kernel module?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-04-14 16:39, Milan Broz wrote:
> On 04/14/2017 04:10 PM, Carlos E. R. wrote:
>>
>> Hi,
>>
>> I'm new in this mail list, but I have been using encrypted disks on Linux for many years.
>>
>> But this time I get when trying to initalize a 4TB partition (on openSUSE Leap 42.2):
>>
>>
>> Isengard:~ # time cryptsetup luksFormat /dev/sdc2
> 
> ...
> 
> [601377.447317] device-mapper: table: 254:2: crypt: Device lookup failed
> 
> This is probably the problem - something is wrong with /dev/sdc2.
> Check if you can access that partition (old partition table? already used?).

It is a new partition on a new disk (but tested), not mounted.

Isengard:~ # mkdir /data/new
Isengard:~ # mount -v /dev/sdc2 /data/new
mount: /dev/sdc2 mounted on /data/new.
Isengard:~ # ls /data/new
Isengard:~ # dd if=/dev/zero of=/data/new/testfile count=100
100+0 records in
100+0 records out
51200 bytes (51 kB, 50 KiB) copied, 0,000709367 s, 72,2 MB/s
Isengard:~ # l /data/new
total 56
drwxr-xr-x 2 root root    22 Apr 14 18:50 ./
drwxr-xr-x 7 root root  4096 Apr 14 18:49 ../
-rw-r--r-- 1 root root 51200 Apr 14 18:50 testfile
Isengard:~ #


> 
> Also output of lsblk command could help.

Isengard:~ # lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0 111,8G  0 disk
├─sda1          8:1    0   156M  0 part  /boot/efi
├─sda2          8:2    0     9G  0 part  [SWAP]
├─sda3          8:3    0     9G  0 part
├─sda4          8:4    0    20G  0 part  /
└─sda5          8:5    0    70G  0 part
  └─cr_home   254:0    0    70G  0 crypt /home
sdb             8:16   0   1,8T  0 disk
└─sdb1          8:17   0   1,8T  0 part
  └─cr_hoard2 254:1    0   1,8T  0 crypt /data/hoard
sdc             8:32   0   3,7T  0 disk
├─sdc1          8:33   0   250M  0 part  /run/media/cer/Initial_4T
└─sdc2          8:34   0   3,7T  0 part  /data/new
Isengard:~ #


But when I umount it, systemd mounts it again behind my back!
That was it, I umounted it again from

└─sdc2          8:34   0   3,7T  0 part  /run/media/cer/WaterHoardR

and this time cryptsetup suceeded.




> (device-mapper ioctl error reporting is limited, we can usually just guess
> what is wrong, so the userspace message is here perhaps misleading)
> 
> Anyway, if reporting cryptsetup problems, please always post command output
> with added --debug switch. There is a lot of info that is required to analyse
> problems.

Thanks. This time it doesn't seem to be necessary, but you gave me the
clue where to look (lsblk) :-)


-- 
Cheers / Saludos,

		Carlos E. R.
		(from 42.2 x86_64 "Malachite" at Telcontar)

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux