Managing the LUNs
To create a LUN with the specified name and size
- To create a LUN with the specified name and size on the specified file system, enter the following:
Target> iscsi lun create lun-name target-name size option=dense|sparse
lun-name
Name of the LUN which is to be created on the store that is associated with an iSCSI target.
target-name
Name of the iSCSI target at which SCSI LUNs are available. target-name should conform to the naming rules defined in RFC3721.
size
Size of the LUN that you want to create.
option
Name of the LUN type such as Dense or Sparse. By default, Sparse is selected.
To destroy a specific LUN
- To destroy a specific LUN, enter the following:
Target> iscsi lun destroy lun-name target-name [force]
lun-name
Name of the LUN which is to be destroyed from an iSCSI target.
target-name
Name of the iSCSI target at which SCSI LUNs are available. target-name should conform to the naming rules defined in RFC3721.
Note:
You can use this command to destroy a clone of a specified LUN as well.
To list the details of all the LUNs present in all targets
- To list the details of all the LUNs present in all targets, enter the following:
Target> iscsi lun list
To list the details of all the LUNs present in a specific target
- To list the details of all the LUNs present in a specific target, enter the following:
Target> iscsi lun list target-name
target-name
Name of the iSCSI target at which SCSI LUNs are available. target-name should conform to the naming rules defined in RFC3721.
To grow LUN size to specified size
- To grow LUN size to specified size, enter the following:
Target> target iscsi lun growto lun-name target-name size
lun-name
Name of the LUN for which size is to be increased on the store that is associated with an iSCSI target.
target-name
Name of the iSCSI target at which SCSI LUNs are available. target-name should conform to the naming rules defined in RFC3721.
size
A new size that is to be specified for the LUN.
To shrink LUN size to specified size
- To shrink LUN size to specified size, enter the following:
Target> target iscsi lun shrinkto lun-name target-name size
lun-name
Name of the LUN for which, size is to be decreased on the store that is associated with an iSCSI target.
target-name
Name of the iSCSI target at which SCSI LUNs are available. target-name should conform to the naming rules defined in RFC3721.
size
A new size that is to be specified for the LUN.
To create a clone of a specified LUN
- To create a clone of LUN, enter the following:
Target> iscsi lun clone create lun-name clone-name
lun-name
Name of the LUN for which a clone is to be created on the store that is associated with an iSCSI target.
clone-name
Name of the clone of a LUN.
To list details of all clones
- To list details of all clones, enter the following:
Target> iscsi lun clone list
To list details of the specified clone
- To list details of the specified clone, enter the following:
Target> iscsi lun clone list clone-name
To create a snapshot of LUN
- To create a snapshot of LUN, enter the following:
Target> iscsi lun snapshot create lun-name snapshot-name
lun-name
Name of the LUN for which a snapshot is to be created on the store that is associated with an iSCSI target.
snapshot-name
Name of the snapshot of a LUN.
To destroy a snapshot of LUN
- To destroy a snapshot of LUN, enter the following:
Target> iscsi lun snapshot destroy lun-name snapshot-name
lun-name
Name of the LUN for which a snapshot is to be destroyed from an iSCSI target.
snapshot-name
Name of the snapshot of a LUN.
To restore a snapshot of specified LUN
- To restore a snapshot of specified LUN, enter the following:
Target> iscsi lun snapshot restore lun-name snapshot-name
lun-name
Name of the LUN for which a snapshot is to be restored on the store that is associated with an iSCSI target.
snapshot-name
Name of the snapshot of a LUN.
To list details of all the snapshots
- To list details of all the snapshots, enter the following:
Target> iscsi lun snapshot list
To list details of a specified snapshot
- To list details of a specified snapshot, enter the following:
Target> iscsi lun snapshot list snapshot-name
where snapshot-name is the snapshot name for which details are displayed.