open-iscsi / rtslib-fb

Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
Apache License 2.0
73 stars 90 forks source link

saveconfig: add hw_block_size support in control string #150

Closed lxbsz closed 5 years ago

lxbsz commented 5 years ago

$ targetcli /backstores/user:glfs create name=block size=1048576 \ cfgstring=hosting-volume@192.168.195.164/block-store/d85244f7-88e9-4b28-922d-373fa9f59f24 \ control=max_data_area_mb=64,hw_block_size=1024 wwn=d85244f7-88e9-4b28-922d-373fa9f59f24

$ targetcli / saveconfig

$ cat /etc/target/saveconfig.json { "storage_objects": [ { "alua_tpgs": [], "attributes": { ... }, "config": "glfs/hosting-volume@192.168.195.164/block-store/d85244f7-88e9-4b28-922d-373fa9f59f24", "control": "max_data_area_mb=64,hw_block_size=1024", "hw_max_sectors": 128, "name": "block", "plugin": "user", "size": 1048576, "wwn": "d85244f7-88e9-4b28-922d-373fa9f59f24" } ], "targets": [] }

Signed-off-by: Xiubo Li xiubli@redhat.com

lxbsz commented 5 years ago

@pkalever @maurizio-lombardi @mikechristie Please review, thanks. BRs