Closed arthurzenika closed 10 years ago
/backstores/fileio> ls o- fileio ..................................................................................................... [Storage Objects: 3] o- tmp-test3.raw ................................................................. [/tmp/test3.raw (50.0MiB) write-thru ACTIVATED] o- tmp-youpi.raw .................................................................. [/tmp/youpi.raw (1.0GiB) write-thru ACTIVATED] o- youpi ........................................................................ [/tmp/youpi.raw (1.0GiB) write-back DEACTIVATED] /backstores/fileio> delete tmp-test3.raw Traceback (most recent call last): File "/usr/bin/targetcli", line 100, in <module> main() File "/usr/bin/targetcli", line 90, in main shell.run_interactive() File "/usr/lib/python3/dist-packages/configshell/shell.py", line 948, in run_interactive self._cli_loop() File "/usr/lib/python3/dist-packages/configshell/shell.py", line 777, in _cli_loop self.run_cmdline(cmdline) File "/usr/lib/python3/dist-packages/configshell/shell.py", line 891, in run_cmdline self._execute_command(path, command, pparams, kparams) File "/usr/lib/python3/dist-packages/configshell/shell.py", line 866, in _execute_command result = target.execute_command(command, pparams, kparams) File "/usr/lib/python3/dist-packages/configshell/node.py", line 1413, in execute_command return method(*pparams, **kparams) File "/usr/lib/python3/dist-packages/targetcli/ui_backstore.py", line 150, in ui_command_delete child.rtsnode.delete() File "/usr/lib/python3/dist-packages/rtslib/tcm.py", line 235, in delete super(StorageObject, self).delete() File "/usr/lib/python3/dist-packages/rtslib/node.py", line 199, in delete os.rmdir(self.path) OSError: [Errno 16] Device or resource busy: '/sys/kernel/config/target/core/fileio_2/tmp-test3.raw'
Maybe this operation should generate an error instead of a traceback?
On an targetcli (not fb) install I seem to be able to delete an activated backend (it is removed from the iscsi lun that was using it).
thanks for catching this.
Maybe this operation should generate an error instead of a traceback?