Re: Cannot delete qla2xxx acl from configfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/07/2015 01:08 PM, Ryan Hulsker wrote:
I am working on a script that maps and unmaps LUNs from qla2xxx
target interfaces directly via configfs.  I have been pretty
successful so far using the LIO target start up scripts as a guide
but I cannot figure out how to properly remove an acl.

I looked at the source for lio_node and it looks like the procedure
with iSCSI targets is to remove the LUN symlink from the acl
directory first and then recursively remove the entire acl directory,
but this does not work for me with qla2xxx targets.

I can delete the symlink with rm
/sys/kernel/config/target/qla2xxx/50:01:43:80:03:ad:df:dc/tpgt_1/acls/21:00:00:1b:32:15:a7:28/lun_0/<symlink
to lun>

but when i follow up with rm -rf
/sys/kernel/config/target/qla2xxx/50:01:43:80:03:ad:df:dc/tpgt_1/acls/21:00:00:1b:32:15:a7:28/lun_0

 I get the following error for all of the remaining files rm: cannot
remove ‘lun_0/statistics/scsi_att_intr_port/port_ident’: Operation
not permitted

Even if I chmod all the files 777 i cannot delete them, however
targetcli has no trouble removing the acls.

Am I missing a step?

Configfs is magic, you don't need to rm all the individual files underneath, just rmdir the things you mkdir-ed. So, rmdir /sys/kernel/config/target/qla2xxx/50:01:43:80:03:ad:df:dc/tpgt_1/acls/21:00:00:1b:32:15:a7:28/lun_0 , then rmdir the acl.

See Documentation/filesystems/configfs/configfs.txt for more info.

Regards -- Andy
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux