Since XenServer 5.6 has some sort of bug which won't let it boot when you have linux raid partition, and I haven't found a way around it, I'm going to make this short and sweet. We will just delete the existing LVM SR and recreate it as ext3. This will allow us to do sparse provisioning.

First we will need to delete the current Local Storage, which involves quite a few steps.

view plain print about
1# xe pbd-list
2uuid ( RO) : 4960a8ab-d46f-270c-645d-c697263972c4
3 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
4 sr-uuid ( RO): e768c14b-e452-78fa-4fc6-7b2bbafd3fd4
5 device-config (MRO): location: /opt/xensource/packages/iso; legacy_mode: true
6 currently-attached ( RO): true
7
8
9uuid ( RO) : a71c0a52-4d5a-fb22-01f7-63924ce0066f
10 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
11 sr-uuid ( RO): 01655c83-5668-c05b-7031-c33c032d7af0
12 device-config (MRO): device: /dev/disk/by-id/scsi-3600137206653cb001394e1bf5e3adfc5-part3
13 currently-attached ( RO): true
14
15
16uuid ( RO) : c00deda7-a064-903e-19cc-657a16eb1a1a
17 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
18 sr-uuid ( RO): cf8f5d45-2c85-e4c4-49bf-c6dab40a1e29
19 device-config (MRO): location: /dev/xapi/block
20 currently-attached ( RO): true
21
22
23uuid ( RO) : e2e20fa4-0d5b-acf9-2f22-5d3a3cd89593
24 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
25 sr-uuid ( RO): 9cb77bf4-1ccf-53bb-0a8b-ddc8ec9c3ee4
26 device-config (MRO): location: /dev/xapi/cd
27 currently-attached ( RO): true

As you can see it's the second one on the list (the one that start with /dev/disk/by-id). Now we unplug it and destroy it.

view plain print about
1# xe pbd-unplug uuid=a71c0a52-4d5a-fb22-01f7-63924ce0066f
2# xe pbd-destroy uuid=a71c0a52-4d5a-fb22-01f7-63924ce0066f

Now lets destroy the storage repository attached to it. First we get a list of the repositories.

view plain print about
1# xe sr-list
2# xe sr-list
3uuid ( RO) : 01655c83-5668-c05b-7031-c33c032d7af0
4 name-label ( RW): Local storage
5 name-description ( RW):
6 host ( RO): <not in database>
7 type ( RO): lvm
8 content-type ( RO): user
9
10
11uuid ( RO) : 9cb77bf4-1ccf-53bb-0a8b-ddc8ec9c3ee4
12 name-label ( RW): DVD drives
13 name-description ( RW): Physical DVD drives
14 host ( RO): xen2
15 type ( RO): udev
16 content-type ( RO): iso
17
18
19uuid ( RO) : cf8f5d45-2c85-e4c4-49bf-c6dab40a1e29
20 name-label ( RW): Removable storage
21 name-description ( RW):
22 host ( RO): xen2
23 type ( RO): udev
24 content-type ( RO): disk
25
26
27uuid ( RO) : e768c14b-e452-78fa-4fc6-7b2bbafd3fd4
28 name-label ( RW): XenServer Tools
29 name-description ( RW): XenServer Tools ISOs
30 host ( RO): xen2
31 type ( RO): iso
32 content-type ( RO): iso

We will delete the one called local storage.

view plain print about
1# xe sr-forget uuid=01655c83-5668-c05b-7031-c33c032d7af0

At this point it will be forgotten and disappear from XenCenter.

Now, lets delete it from LVM.

view plain print about
1# vgdisplay
2 --- Volume group ---
3 VG Name VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0
4 System ID
5 Format lvm2
6 Metadata Areas 1
7 Metadata Sequence No 3
8 VG Access read/write
9 VG Status resizable
10 MAX LV 0
11 Cur LV 1
12 Open LV 0
13 Max PV 0
14 Cur PV 1
15 Act PV 1
16 VG Size 1.81 TB
17 PE Size 4.00 MB
18 Total PE 474747
19 Alloc PE / Size 1 / 4.00 MB
20 Free PE / Size 474746 / 1.81 TB
21 VG UUID sR7JWl-k6sF-QU0Z-2Tkh-XNX5-mfuE-Pr7uKF

Now lets remove it.

view plain print about
1# vgremove VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0
2Do you really want to remove volume group "VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0" containing 1 logical volumes? [y/n]: y
3 Logical volume "MGT" successfully removed
4 Volume group "VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0" successfully removed

Now we remove the physical volume.

view plain print about
1# pvdisplay
2 "/dev/sda3" is a new physical volume of "1.81 TB"
3 --- NEW Physical volume ---
4 PV Name /dev/sda3
5 VG Name
6 PV Size 1.81 TB
7 Allocatable NO
8 PE Size (KByte) 0
9 Total PE 0
10 Free PE 0
11 Allocated PE 0
12 PV UUID 3KA4t0-rX04-0aa9-mP6c-EkOr-rPmg-BiGncU

view plain print about
1# pvremove /dev/sda3
2 Labels on physical volume "/dev/sda3" successfully wiped

Now we change the partition type to Linux.

view plain print about
1# fdisk /dev/sda
2
3The number of cylinders for this disk is set to 243133.
4There is nothing wrong with that, but this is larger than 1024,
5and could in certain setups cause problems with:
61) software that runs at boot time (e.g., old versions of LILO)
72) booting and partitioning software from other OSs
8 (e.g., DOS FDISK, OS/2 FDISK)
9
10Command (m for help): p
11
12Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
13255 heads, 63 sectors/track, 243133 cylinders
14Units = cylinders of 16065 * 512 = 8225280 bytes
15
16 Device Boot Start End Blocks Id System
17/dev/sda1 * 1 523 4194304 83 Linux
18Partition 1 does not end on cylinder boundary.
19/dev/sda2 523 1045 4194304 83 Linux
20/dev/sda3 1045 243133 1944577183 8e Linux LVM
21
22Command (m for help): t
23Partition number (1-4): 3
24Hex code (type L to list codes): L
25
26 0 Empty 1e Hidden W95 FAT1 80 Old Minix bf Solaris
27 1 FAT12 24 NEC DOS 81 Minix / old Lin c1 DRDOS/sec (FAT-
28 2 XENIX root 39 Plan 9 82 Linux swap / So c4 DRDOS/sec (FAT-
29 3 XENIX usr 3c PartitionMagic 83 Linux c6 DRDOS/sec (FAT-
30 4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c7 Syrinx
31 5 Extended 41 PPC PReP Boot 85 Linux extended da Non-FS data
32 6 FAT16 42 SFS 86 NTFS volume set db CP/M / CTOS / .
33 7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set de Dell Utility
34 8 AIX 4e QNX4.x 2nd part 88 Linux plaintext df BootIt
35 9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access
36 a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e3 DOS R/O
37 b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor
38 c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS eb BeOS fs
39 e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee EFI GPT
40 f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/
4110 OPUS 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b
4211 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f1 SpeedStor
4312 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f4 SpeedStor
4414 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f2 DOS secondary
4516 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot fb VMware VMFS
4617 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
4718 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
481b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
491c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
50Hex code (type L to list codes): 83
51Changed system type of partition 3 to 83 (Linux)
52
53Command (m for help): p
54
55Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
56255 heads, 63 sectors/track, 243133 cylinders
57Units = cylinders of 16065 * 512 = 8225280 bytes
58
59 Device Boot Start End Blocks Id System
60/dev/sda1 * 1 523 4194304 83 Linux
61Partition 1 does not end on cylinder boundary.
62/dev/sda2 523 1045 4194304 83 Linux
63/dev/sda3 1045 243133 1944577183 83 Linux
64
65Command (m for help): w
66The partition table has been altered!
67
68Calling ioctl() to re-read partition table.
69
70WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
71The kernel still uses the old table.
72The new table will be used at the next reboot.
73Syncing disks.

Now we reboot to make sure that the kernel picks up our changes.

view plain print about
1#reboot
Now lets add it to XenServer.
view plain print about
1# xe sr-create host-uuid=d805a419-6dab-437a-ab3c-abba07209574 content-type=user name-label="Local SR" shared=false device-config:device=/dev/sda3 type=ext
2fece93d6-503e-991c-2076-ac4e148f8630

Now we reboot and everything should come up fine.