[Stgt-devel] [PATCH 2/7] Add option to delete all the targets

FUJITA Tomonori fujita.tomonori
Mon Jul 28 14:15:00 CEST 2008


On Mon, 28 Jul 2008 14:01:28 +0200
Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> FUJITA Tomonori schrieb:
> 
> (...)
> 
> >> Why are we touching the config file here anyway?
> >> IMO, "-d" flag should just remove all targets from a running tgtd; it 
> >> shouldn't try to backup or modify the config file.
> > 
> > Agreed, I prefer to have an explicit option to touch (update) my
> > ocnfiguration file; other options just change my running targets'
> > configurations.
> 
> What is the preferred approach to delete the targets via tgt-admin?
> 
> 1) delete only the targets which have no initiators connected - this is what we do right now; we offline them before we try to delete
> 
> 2) delete ALL targets, even if initiators are connected (supported since "support to close a connection by force and to shut down tgtd")
> 
> 
> Or, make it two separate options? I.e.:
> 
> - leave the first one (offline, try to delete) like it is now
> - add a new option - --delete-force - would forcibly remove all or specified targets; examples:
> 
> --delete-force ALL - will remove all targets
> --delete-force iqn.2008-06.com.example:blah.blah
> --delete-force tid=5

I have no preference here but I guess that people want two options.

I think that the majority of administrators will use a user-friendly
tool like tgt-admin (possible alternatives are web interface, or shell
interface as many appliances do). So I expect people want to do common
operations with it. The above two operations are often used, I guess.

Someone still needs A 'raw' tool like tgtadm but not many.

BTW, I think that we should rename either (or both). Those names,
tgt-admin and tgtadm are too similar and confuse people.



More information about the stgt mailing list