First we need to detect the drives we want to add. This we do by running a "fdisk -l". In my case I see several disks, but the ones I am interested in is my datadisk and a non-Raid backupdisk:
Disk /dev/sdb: 3000.4 GB, 3000409915392 bytesFrom this listing I can see that it is /dev/sdb and /dev/sdc that I want to add.
255 heads, 63 sectors/track, 364779 cylinders
Units = cylinders of 16065 * 512 = 8225280 byte
Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
I then run pvcreate on these disks:
pvcreate /dev/sdbThen you need to find the disks id string in the /dev/disk/by_id folder. Listing my folder reviles my disks
scsi-27f1dad4b7c900104 -> ../../sdbAs you can see scsi-27f1dad4b7c900104 is id for sdb and scsi-SATA_SAMSUNG_HD252HJS17HJ90S401838 is id for sdc. The reason we do this is that incase we change the order of our disks or controllers (for instance adding a local SATA disk may add a new sdb and push the other disks down to sdc and sdd).
scsi-SATA_SAMSUNG_HD252HJS17HJ90S401838 -> ../../sdc
Ok, next we do some XenServer magic to add the storage repositories.
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-27f1dad4b7c900104 name-label="DATA SR"
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_SAMSUNG_HD252HJS17HJ90S401838 name-label="BACKUP SR"
That is it.
In my next blog, I will add a local ISO repos to hold the most used ISOs I use to install servers.