On Mon, 06 Oct 2008 16:59:08 +0200 Tomasz Chmielewski <mangoo at wpkg.org> wrote: > Right now, tgt-admin looks into /etc/mtab, /proc/swaps etc. to determine > if the device it wants to allocate is in use. This is a good way to > prevent the user from corrupting filesystems (i.e., mounting the device > locally to correct a config file, forgetting to unmount it, and > allocating it as a target), but unfortunately, it doesn't check all > kinds of "device-in-use" scenarios. > > The following patches add a full support for detecting "used devices": > - used by the system: mounted, swap devices, parts of RAID array, LVM, > dm-crypt, etc. > - used by userspace, i.e. dd, e2fsck, existing tgtd target etc. > > For "userspace" tests, lsof is needed. If it's not present, a warning > will be shown, informing the user that we can't check reliably if the > device is in use. > > > The check can be overridden by using --force command line option or > "allow-in-use yes" config option. Applied, thanks a lot! -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |