Comments on: Xenserver, extend local storage repository even when using GPT Partition tablehttp://thingsandstuff.devide.ch/?p=72
Stuff and ThingsMon, 07 Mar 2016 14:15:34 +0000hourly1https://wordpress.org/?v=4.5.16By: admin_TaShttp://thingsandstuff.devide.ch/?p=72#comment-959
Mon, 01 Feb 2016 19:56:06 +0000http://thingsandstuff.devide.ch/?p=72#comment-959Hi RhysH
The Numbers you are referring to are the code names of the different partitions.
As you’ll notice, on the system I had for writing this tutorial, I had two partitions. A 4GB Partition for the xenserver os itself, and something like 500GB of Storage for VMs
What I was doing was to extend the VM Storage. That is why I extended the volume with the 8E00 Code.
If you would have worked on the Volume with the 0700 Code name, you would have actually extended the OS Partition of the xenserver.
That expanded storage would not be able to be used in VM storage if I’m right. Also, it should not be possible to expand the volume 0700 with the free space anyway, as the free space would have needed to be adjacent to the 8E00 volume.
What exactly was the outcome of your extension? Did the local storage actually extend? Did you have any VMS on the local storage?
Or am I really missing something? Thanks for the feedback.
]]>By: RhysHhttp://thingsandstuff.devide.ch/?p=72#comment-956
Sun, 31 Jan 2016 22:45:45 +0000http://thingsandstuff.devide.ch/?p=72#comment-956Hi,

One note, why are we changing the partition from 8E00 to 0700?

I performed this process and made it 8E00 instead of 0700 and it all worked perfectly fine. I can confirm that a xe-toolstack-restart does not work and you have to reboot the host.

As you can read in the about section, I do not claim that all this knowledge comes from me personally. I do collect it from other parts of the internet, and mainly put it here, so I can find it again, when facing a similar problem. However, I also hope that it can help others, such as you.

That said, let me try to answer a few of the questions you had.
a) The thing is, that with GPT, you cannot resize a partition. So you have to delete and recreate it. And yes, if all done right, the data will be preserved. I have done this process on 3 different Xenserver Systems, and on all three, I had no data loss whatsoever.
b) I would think that this might be possible. Those commands above are all standard linux stuff. Nothing to do with the xapi. So it should also work offline by using a live CD using something like parted. However, I haven’t done it, so I can’t really be sure. Plus if you work on a live system where uptime is crucial, you might not want to shut down the server if you don’t have to.
A quick google search turned up this gem, and I think it answers some of your questions about this.http://www.serenux.com/2013/11/howto-resize-an-lvm-partition-on-a-gpt-drive-after-expanding-the-underlying-array/
c) I honestly don’t know. But what I know is, that the process as it is works. So if you have a test system, why don’t you try it and let me know how it went 😉

a) I do not understand why I need to delete partition #3 and then recreate it using its startsector and the last usable sector as the end sector. Isn’t partition table expansion enought ? Are my data preserved and safe ?

b) Actually my Xen install use GPT part table. Can I use tools like gparted on a livecd to resize partition # 3 table instead of doing it inside xen cli (so skipping your GPT section).

c) Is correct to make lvm changes only after gpt editing ? Or I can try lvm resizing before gpt editing and then, if it fails, go to edit gpt table ?