On Wed, Mar 28, 2012 at 11:48:48AM +0200, Thomas Bächler wrote: > Okay, I am late to this party.
You missed all the beer and the strippers, but I sweeped up some broken pretzels that you're welcome to. > Am 25.03.2012 21:11, schrieb Dave Reisner: > > > + # this can sometimes fail on stopped md devices, when the > > + # sysfs node doesn't go away as quickly as i'd like it to. > > + devtype=$(lsblk -drno TYPE "/dev/$1" 2>/dev/null) || return 1 > > + case $devtype in > > + crypt) > > + read devname <"$1/dm/name" > > + cryptsetup luksClose "$devname" > > + ;; > > This should be "cryptsetup remove". Although the two are identical > operations, the "luksClose" keyword seems to indicate that something > LUKS-specific is happening here, which it isn't. > Yup, good call. > > + dmraid) > > + # XXX: i have no idea how dmraid works > > + dmraid -an > > + ;; > > > According to the manpage, you can use the name of the dmraid set to only > deactivate this specific dmraid set only. Determining this name from the > device name seems to be harder than with LVM, but I don't have any > dmraid-capable hardware to give you specifics. That's as far as I got... I would love to see the hierarchy under /sys/class/block/dm* and the contents of some choice nodes from someone who actually has this hardware. > > Is there any way to make something similar work with loop devices? You > would need to disable the loop device before umounting the underlying > file system. If we could solve this as well, then archiso probably > wouldn't need its special shutdown hook anymore. > sure, lsblk loudly declares loop devices to be type loop. Hrmmm, archiso does a lot of weird stuff... in particular, the squashfs mounts are confusing me and/or lsblk. I'll get myself a newer image and poke around at what Gerardo is doing on setup... I'm sure it's possible, I just need to understand what's happening. d
