TGTIMG(8) | [FIXME: manual] | TGTIMG(8) |
tgtimg - Linux SCSI Target Framework Image File Utility
tgtimg [-o --op <operation>] [-Y --device-type <device-type>] [-b --barcode <barcode>] [-s --size <size>] [-t --type <media-type>] [-f --file <path>] [-T --thin-provisioning]
tgtimg --help
Tgtimg is a utility to create and manage the image files used by the TGTD device emulation.
This command is used to initialize device image files with the additional metadata, such as barcode, list of blocks, total size, etc that the TGTD emulation needs.
-h, --help
-o, --op {new|show}
-Y, --device-type <type>
Supported device types are :
cd : to create media for a dvd device
disk : to create media for a disk device
tape : to create media for a tape device
-t, --type <media-type>
Supported media types for cd devices are :
dvd+r : create a blank writeable DVD+R disk Supported media types for disk devices are :
disk : create an empty disk Supported media types for tape devices are :
data : create a normal data tape
clean : create a cleaning tape
worm : create a worm
-b, --barcode <barcode>
-s, --size <size>
-f, --file <path>
-T, --thin-provisioning
Be careful when using thin-provisioning. If the filesystem fills up a iSCSI write to a thin-provisioned LUN can fail. Initiators generally do not handle "out of space" errors gracefully.
Thin-provisioning uses FALLOC_FL_PUNCH_HOLE which is only available on some linux filesystems. Thin-provisioning can only be used for DISK images.
To create a new 100MByte disk
tgtimg --op new --device-type disk --type disk --size 100 --file /data/hd001.raw
To create a new tape image
tgtimg --op new --device-type tape --barcode 12345 --size 100 --type data --file /data/tape001.img
To view the content of an existing image
tgtimg --op show --device-type tape --file /data/tape001.img
To create a new blank DVD+R image
tgtimg --op new --device-type cd --type dvd+r --file /data/dvd001.iso
tgtd(8), tgtadm(8), tgt-admin(8), tgt-setup-lun(8). https://github.com/fujita/tgt
Report bugs to <stgt@vger.kernel.org>
01/09/2023 | [FIXME: source] |