Re: u?mount (8) helper script for luks encrypted disks

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

 



Well, if you want use such mount helper script, you can.

But I do no think this should be part of upstream package.

On 30.8.2013 1:56, .. ink .. wrote:
On unmounting.
1. Look at the path to be unmounted,if it starts with "/dev/mapper/"
then it could an mdraid path or a cryptsetup mapper path or
something else.Its easy to check which one is it.

Nope.

You have /dev/VG/LV or /dev/mpath/NAME (aka friendly mpath names) etc.
These are symlinks, or on non-udev system directly device nodes.

If you want to check for dm device, you should check for major
number of device. Ditto for MD (note md can be some fake
raid as well as replacement for dmraid.)

In shell script, I would use lsblk to detect it (that should have all
"known" tricks included :)

2. If its
encrypted mapper path,then unmount the mapper and then call
cryptsetup to unmap the mapper.If its not encrypted then just
unmount.

Not sure if it works for lazy umount (device is still in use).

Also udev can perform blkid "scan on close" blocking the device
but this one problem should be already solved inside libdevmapper
(retrying removal).

Milan
_______________________________________________
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