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

Tomasz Chmielewski mangoo
Mon Jul 28 14:01:28 CEST 2008


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

?


-- 
Tomasz Chmielewski 
http://wpkg.org




More information about the stgt mailing list