Re: [PATCH 0/2] tgt-admin: check if device is in use before allocating it

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

 



On Mon, 06 Oct 2008 16:59:08 +0200
Tomasz Chmielewski <mangoo@xxxxxxxx> 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.

Sounds a reasonable option.

Doron, you wrote the patch to check device in use? Any comments on
this?
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux