XenServer/Palielināt VM LVM partīcijas izmēru: Difference between revisions
From Mana zināšanu grāmata
No edit summary |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 10:41, 16 April 2026
df -h
lvs
lvextend -L+10G /dev/mapper/vg-lvroot
resize2fs /dev/mapper/vg-lvroot
df -h
This should be relatively easy, since you're using LVM:
- First, as always, take a backup.
- Resize the disk in Xen (you've already done this; despite this, please re-read step 1).
- Use parted to resize the extended partition (
xvda2); runparted /dev/xvda, then at the parted promptresizepart 2 -1sto resize it to end at the end of the disk (BTW:quitwill get out of parted).
Either (a) create another logical partition (
xvda6) with the free space, then:-
- reboot to pick up the partition table changes
pvcreate /dev/xvda6vgextend xenhosting-vg /dev/xvda6
or (b)
-
- extend xvda5 using
resizepart 5 -1s - reboot to pick up the partition table changes
pvresize /dev/xvda5
Finally, if you want to add that to your root filesystem,
lvextend -r -l +100%FREE /dev/xenhosting-vg/root. The -r option to lvextend tells it to call resize2fs itself.
