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

FUJITA Tomonori fujita.tomonori
Tue Jul 29 15:43:24 CEST 2008


On Tue, 29 Jul 2008 12:38:01 +0200
Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> FUJITA Tomonori schrieb:
> 
> (...)
> 
> >> 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")
> 
> (...)
> 
> > 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.
> 
> IMHO it would make sense to make two "delete" options then:
> 
> --delete <ALL|tid=|targetname>
> 
> It would only touch the target if it is not in use.
> ALL would delete all targets which are not in use; the targets which have initiators connected would not have its state changed (some informational message would be displayed to the user).
> 
> --forcedelete <ALL|tid=|targetname>
> 
> It would delete the targets irrespectively of their use.

How about the followings?

(--force) --delete <ALL|tid=|targetname>

It would only touch the target if it is not in use. If an active
target (or targets due to ALL) is specified, the warnings shows up.

If --force option is enabled, it would delete the targets
irrespectively of their use.



More information about the stgt mailing list