OS Manuals

/usr/bin/tgt-setup-lun

tgt target administration tools

From scsi-tgt-admin 1.0.98-r0 (enterprise-packages), captured 2026-11-08 by running tgt-setup-lun --help (exit 1). permalink

/usr/bin/tgt-setup-lun: illegal option -- -
usage:
	tgt-setup-lun -n tgt_name -d dev -b bs_name -B block_size -t transport -C control_port [initiator_IP1 initiator_IP2 ...]
defaults:
	backing store: rdwr
	transport: iscsi
	initiator: ALL
	control port: -
examples:
	tgt-setup-lun -n tgt-1 -d /dev/sdb1 192.168.1.2
	tgt-setup-lun -n tgt-2 -d /tmp/null -b null -t iser
	tgt-setup-lun -n tgt-3 -d ~/disk3.bin -b rdwr 192.168.1.2 192.168.1.3
WARNING:
	Please remember to set blocksize to 4096 for newer Advanced Format (4K) disks larger than 2TB. Otherwise, your existing filesystems will not be readable.
Examples (4) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.