Monday, January 14, 2013

No Local Storage after XenServer installation

After installation of XenServer 6.0.2 the Local Storage SR doesn't appear.

Does running "fdisk -l" show you a device with 3 partitions
? Example:

root@xenserver /# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 499 4008186 83 Linux
/dev/sda2 500 998 4008217+ 83 Linux
/dev/sda3 999 19452 148231755 83 Linux

Then you should be able to create a Local Storage via the CLI (XenCenter
is for shared storage). You need to know the SCSI device associated with this 3rd partition. Listing /dev/disk/by-id via ls command will help. Example:

root@xenserver /# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Apr 5 12:51 scsi-SATA_ST3160815AS_9RX53PHQ -> ../../sda
lrwxrwxrwx 1 root root 10 Apr 5 12:51 scsi-SATA_ST3160815AS_9RX53PHQ-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr 5 12:51 scsi-SATA_ST3160815AS_9RX53PHQ-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr 5 12:51 scsi-SATA_ST3160815AS_9RX53PHQ-part3 -> ../../sda3

Now you can use the sr-create command. You need to first get the host universal unique Id via xe host-list

xe sr-create type=ext content-ty
pe=user host-uuid=<UUID of the XenServer host> shared=false name-label="Local Storage" device-config:device=/dev/disk/by-id/<SCSI ID>

In my case, SCSI ID would be: scsi-SATA_ST3160815AS_9RX53PHQ-part3 and the command to create would be:

xe sr-create type=ext content-type=user host-uuid=c9383181-27be-43dc-9a39-bf9b801582e8 shared=false name-label="Local Storage" device-config:device=/dev/disk/by-id/scsi-SATA_ST3160815AS_9RX53PHQ-part3

No comments:

Post a Comment