luks encryption

Hi
I am trying to create an encrypted luks partition on my system. My first attempt worked, but the next time I wanted to use the encrypted partition
I didn’t work, I later found that the name i called it was missing from the /dev/mapper/ directory.

So I started again after wiping the partition, I went through the process when it come to formatting mkfs.ext4 /dev/mapper/name
I got this message

“Device size reported to be zero. Invalid partition specified or partition table wasn’t reread after running fdisk due to a modified partition being busy and in us. You need to reboot to reread your partition table.”

Questions
Why does the file disappearing from the mapper directory?
fdisk shows that it is a valid partition the size is not zero. I did reread the partition with the ‘w’ and rebooted the computer, any ideas?

Thank you for your help

There is not enough information here to pinpoint a problem. How did you create the partition, what commands did you use to encrypt and open it etc?

What is the partition type? Is it lvm or a plain partition? What happens when you luksOpen it? A name missing from /dev/mapper usually means that the device/partition was not opened with that name, if it was opened at all.


cryptsetup -v isLuks /dev/<partition>
cryptsetup -v luksDump /dev/<partition>
cryptsetup -v status <name>
cryptsetup -v luksOpen /dev/<partition> <name>
cryptsetup -v status <name>

Thanks, markdd I have solved the problem