Create iSCSI volume with Parted and Format with XFS

This is a follow on from the following post: http://www.jordansphere.co.uk/add-iscsi-target-with-multipathing-in-rocky-8/

In this guide I will be formatting a 100TB XFS volume

List block devices

lsblk

Output

NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
 sda                   8:0    1  29.7G  0 disk
 └─sda1                8:1    1  29.7G  0 part
 sdb                   8:16   0 222.6G  0 disk
 ├─sdb1                8:17   0   600M  0 part  /boot/efi
 ├─sdb2                8:18   0     1G  0 part  /boot
 └─sdb3                8:19   0   221G  0 part
   ├─rl-root         253:0    0   110G  0 lvm   /
   ├─rl-swap         253:1    0     4G  0 lvm   [SWAP]
   └─rl-home         253:2    0   107G  0 lvm   /home
 sdc                   8:32   0   100T  0 disk
 └─VEEAM-REP01 253:3    0   100T  0 mpath
 sdd                   8:48   0   100T  0 disk
 └─VEEAM-REP01 253:3    0   100T  0 mpath
 sde                   8:64   0   100T  0 disk
 └─VEEAM-REP01 253:3    0   100T  0 mpath
 sdf                   8:80   0   100T  0 disk
 └─VEEAM-REP01 253:3    0   100T  0 mpath

Run Parted on volume

parted /dev/mapper/VEEAM-REP01

Label the partition

mklabel GPT

Create XFS filesystem at 100% size

mkpart primary xfs 0% 100%
quit

Make mount point

mkdir /BACKUP

Make XFS filesystem on partition

mkfs.xfs /dev/mapper/Veeam_Repo_01p1

Mount filesystem

mount /dev/mapper/VEEAM-REP01p1 /BACKUP

Edit FSTAB and add following line

vi /etc/fstab
/dev/mapper/VEEAM-REP01p1    /BACKUP xfs     _netdev,x-systemd.requires=iscsi.service        0 0

Note:

_netdev tells fstab this is a network device

x-systemd.requires=iscsi.service confirms the order of startup. This should mean the order is network -> ISCSI -> Mount and then the same in reverse when shutting down.