Re: [PATCH 2/2] tgt-admin: check if device is mounted on /

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

 



FUJITA Tomonori schrieb:
On Wed, 10 Sep 2008 09:21:41 +0300
Doron Shoham <dorons@xxxxxxxxxxxx> wrote:

FUJITA Tomonori wrote:
On Thu, 04 Sep 2008 16:39:24 +0300
Doron Shoham <dorons@xxxxxxxxxxxx> wrote:

deny allocation of a device which
which mounted on the same device as rootfs.
also deny the allocation of swap devices.
add --allow-mounted flag for overriding this.
Do we really need a new option? Using the --force option is better for
me.
As I understand, --force option has a different rule when using it with --execute.

"The patch also changes the behaviour of --execute slightly - it now
 tries to delete the targets which are not in the config file; if the
 target is in use, it won't be touched (unless --force is used); if the
 target is not in use, it will be deleted."

So if we use it for allow-mounted also it can be ambiguous.

Hmm, for me, the force option always means that we do things that we
don't do by default and just give warning of.

For your change, without '--force', if an user tries to use a mounted
device, the tool gives warning of it and ignores the device.

With '--force', the tool uses any device even if it's mounted.


For me, it's pretty consistent. Anyone?

Of course there can be another possibility ;)

*Perhaps* it's a good idea if we don't allow to override config file options with command line options.

So, if we want to allow a given (mounted, in use) device to be made a target, say so in the config file explicitly:

<target ...>
   allow-mounted yes
   options...
</target>

This way, one has to think twice before making a potentially dangerous operation.


--
Tomasz Chmielewski
http://wpkg.org
--
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