Recently i added a new SSD to my home lab hypervisor.
Xenserver does not detect new disks by default, so I had to add the drive manual, luckily this is not a complicated process (some command line experience is required).
First we need to find the device name of the new drive, for this we use following command:
fdisk -l
Usually the last shown device is the newly added one, in my case it was /dev/nvme0n1 as I was adding a NVME drive, normally it will be something like /dev/sdb, where b is the position of the drive (first drive is sda, second is sdb, etc.).
Now we know the which drive we are adding to the system we can choose how we want to format the drive. We can choose between EXT and LVM, in short LVM is faster but less flexible (no thin provisioning). Usually you will want to keep all your local repository’s the same.
In this case I have chosen to go with EXT because i need the flexibility and the speed is good enough for me.
Now we can add the repository, we will use the following command:
xe sr-create name-label=<your SR name> shared=false device-config:device=/dev/<device name> type=<lvm|ext> content-type=user