Closed nak3 closed 8 years ago
Sure. This patch solves two issues:
torusblk nbd <VOLUME> /dev/nbdN
as background process, we need to stop the process with kill command.torusblk nbd
process failed to clean up device during its exit, there are no way to clean up the device by users.This patch still keep the life cycle, attached during running process and detached during the exit. I am thinking that administrators need this command for above two reason.
I see. would it be possible to make "attach" the default action for torusblk nbd
?
Sure, I updated. One reason why I wanted to add attach
subcommand is that, torusblk nbd
's help output conflict with --detach
option.
It says that the command need VOLUME
, but --detach
option needs only NBD-DEV
.
Usage:
torusblk nbd VOLUME [NBD-DEV] [flags]
So, I added the example in Flag
output.
Flags:
-d, --detach string detach an NBD device from a block volume. (e.g. torsublk nbd -d /dev/nbd0)
Perhaps you could help explain the desired lifecycle? Right now, as long as the process is running, it is attached, and it detaches on exit.