Sometimes out of the vlue a "shadow LUN" appears, producing messages in logs similar to "LUN modification error: LUN X is not managed by the block backend".The lun mentioned is visible in the ctladm output abnd is stated to be of a type "block". ctladm remove on it is successful but usully doesn't resolve the problem. This usually happens on aproduction system with properly configured targets. The workaround is to issue ctladm remove -b block -l X statements, then comment out all the targets that kernel complains about, issue killall -HUP ctld reload until there will be no messages like that. Then uncomment all the targets back, resume operations. last time 4 targets were affected. ===Cut=== Mar 2 16:40:49 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 16:40:49 san01 ctld[560]: LUN modification warning: error opening /dev/zvol/gamestop/worker02-ver11_662: 2 Mar 2 16:40:49 san01 ctld[560]: failed to reload configuration Mar 2 16:41:41 san01 ctld[560]: LUN modification warning: error opening /dev/zvol/gamestop/worker02-ver11_662: 2 Mar 2 16:49:24 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 16:49:24 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 16:49:24 san01 ctld[560]: failed to reload configuration Mar 2 16:55:33 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 16:55:33 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 16:55:33 san01 ctld[560]: failed to reload configuration Mar 2 16:57:34 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 16:57:34 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 16:57:34 san01 ctld[560]: failed to reload configuration Mar 2 17:07:36 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:07:36 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 17:07:36 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:07:36 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:games-worker01,lun,1", CTL lun 11 Mar 2 17:07:36 san01 ctld[560]: failed to reload configuration Mar 2 17:09:03 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:09:03 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 17:09:03 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:09:03 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:games-worker01,lun,1", CTL lun 11 Mar 2 17:09:03 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:09:03 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:games-worker16,lun,1", CTL lun 11 Mar 2 17:09:04 san01 ctld[560]: failed to reload configuration Mar 2 17:09:41 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend Mar 2 17:09:41 san01 ctld[560]: failed to modify lun "iqn.2016-04.net.playkey.iscsi:gamestop-reference,lun,0", CTL lun 11 Mar 2 17:09:41 san01 ctld[560]: LUN modification error: LUN 11 is not managed by the block backend ===Cut===
*** Bug 252425 has been marked as a duplicate of this bug. ***
I encountered the same problem in a build based on stable/13 from last September. But in my case "ctladm remove" did not work; it failed with the same error. And since there are only two backends to choose from, I tried "-b ramdisk" as well, which failed with the same error again. There was also one remaining iSCSI session, connected to the faulty LUN, but "ctladm isterminate -a" had no effect. I could only resolve the problem by rebooting. $ sudo ctladm remove -b block -l 133 ctladm: LUN removal error: LUN 133 is not managed by the block backend