You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Matthew Midgett <cl...@trick-solutions.com.INVALID> on 2014/12/13 21:50:36 UTC
Status of Root Disk Resize for XenServer
I sent this to the Dev list but didn't get a response. If you know anything
that can help me with this road block I'd appreciate it.
Root disk resize during deployment is a huge advantage when you don't have
10GB networking. Who should we contact to see if some sponsorship could be
put together to make the code happen for XenServer and ACS 4.4. The XAPI can
resize the root disk so we only need code to tell it that it can. Once the
disk is resized then it's up to cloud-init or the administrator to take care
of resizing the partitions.
I've been watching
https://issues.apache.org/jira/browse/CLOUDSTACK-6181?jql=text%20~%20%22root
%20disk%20resize%22 and it says resolved but it not for all hypervisors.
Will someone direct me on to the correct path?
Matthew Midgett
Trick Solutions
143 Jenny Marie Rd
Mooresville NC,28115
336-618-7425 Office
704-728-5644 Cell
www.trick-solutions.com
RE: Status of Root Disk Resize for XenServer
Posted by Matthew Midgett <cl...@trick-solutions.com.INVALID>.
Thanks but to all the other I had the returns in the wrong place
#!/bin/bash
#
# Short script to add the unpartitioned disk to the current root volume.
fdisk /dev/xvdb <<EOF
n
p
1
t
8e
w
EOF
pvcreate /dev/xvdb1
vgextend vg_centos /dev/xvdb1
lvextend -l 100%FREE /dev/vg_centos/lv_root
resize2fs /dev/mapper/vg_centos-lv_root
-----Original Message-----
From: Erdősi Péter [mailto:fazy@niif.hu]
Sent: Saturday, December 13, 2014 9:37 PM
To: users@cloudstack.apache.org
Subject: Re: Status of Root Disk Resize for XenServer
2014.12.14. 3:02 keltezéssel, Matthew Midgett írta:
> I'd have to say that if the customer didn't ask for a data disk it would just error and quit. Someone with some better scripting skills could possible make it look for a un-partitioned drive and the only run the scrip if it found one.
You can check disk existance like this:
[fazy(d:0)] <~> cat check
#!/bin/bash
if [ -e /dev/$1 ]; then
echo "Found"
else
echo "Not Found"
fi
And you can run: ./check xvdb
Regards,
Peter
Re: Status of Root Disk Resize for XenServer
Posted by Erdősi Péter <fa...@niif.hu>.
2014.12.14. 3:02 keltezéssel, Matthew Midgett írta:
> I'd have to say that if the customer didn't ask for a data disk it would just error and quit. Someone with some better scripting skills could possible make it look for a un-partitioned drive and the only run the scrip if it found one.
You can check disk existance like this:
[fazy(d:0)] <~> cat check
#!/bin/bash
if [ -e /dev/$1 ]; then
echo "Found"
else
echo "Not Found"
fi
And you can run: ./check xvdb
Regards,
Peter
RE: Status of Root Disk Resize for XenServer
Posted by Matthew Midgett <cl...@trick-solutions.com.INVALID>.
For anyone who can expand on this here is what I did to get the disk added to my root volume disk . There is two return lines between the w and the pvecreate command. Do not remove them as it takes the double enter to use the first bit of the drive to the last bit of the drive. Run on first boot and have it remove the script. I'd have to say that if the customer didn't ask for a data disk it would just error and quit. Someone with some better scripting skills could possible make it look for a un-partitioned drive and the only run the scrip if it found one. Also it could use some variables but this will work for me until official support for single disk and resize on XenServer.
#!/bin/bash
#
# Short script to add the unpartitioned disk to the current root volume.
fdisk -u -p /dev/xvdb <<EOF
n
p
1
t
8e
w
pvcreate /dev/xvdb1
vgextend vg_centos6 /dev/xvdb1
lvextend -l 100%FREE /dev/vg_centos6/lv_root
resize2fs /dev/mapper/vg_centos6-lv_root
EOF
-----Original Message-----
From: Matthew Midgett [mailto:cloudstck@trick-solutions.com.INVALID]
Sent: Saturday, December 13, 2014 7:49 PM
To: users@cloudstack.apache.org
Subject: RE: Status of Root Disk Resize for XenServer
I've done that with LVM on a physical hd, so I guess that I just need to script it and make it first boot and leave the issue alone. Thanks
-----Original Message-----
From: Erdősi Péter [mailto:fazy@niif.hu]
Sent: Saturday, December 13, 2014 6:33 PM
To: users@cloudstack.apache.org
Subject: Re: Status of Root Disk Resize for XenServer
2014.12.13. 21:50 keltezéssel, Matthew Midgett írta:
> Will someone direct me on to the correct path?
It's just workaround, but if it's unix system, lvm can solve the problem, if you add the datadisk to a same volume group.
Another method, - which can be risky and you need write permission to CS database - is: you just extend the xen LV size, and update the new in CS db. the last step needed to CS, to calculate remaining space on a storage.
Regards:
Peter
RE: Status of Root Disk Resize for XenServer
Posted by Matthew Midgett <cl...@trick-solutions.com.INVALID>.
I've done that with LVM on a physical hd, so I guess that I just need to script it and make it first boot and leave the issue alone. Thanks
-----Original Message-----
From: Erdősi Péter [mailto:fazy@niif.hu]
Sent: Saturday, December 13, 2014 6:33 PM
To: users@cloudstack.apache.org
Subject: Re: Status of Root Disk Resize for XenServer
2014.12.13. 21:50 keltezéssel, Matthew Midgett írta:
> Will someone direct me on to the correct path?
It's just workaround, but if it's unix system, lvm can solve the problem, if you add the datadisk to a same volume group.
Another method, - which can be risky and you need write permission to CS database - is: you just extend the xen LV size, and update the new in CS db. the last step needed to CS, to calculate remaining space on a storage.
Regards:
Peter
Re: Status of Root Disk Resize for XenServer
Posted by Erdősi Péter <fa...@niif.hu>.
2014.12.13. 21:50 keltezéssel, Matthew Midgett írta:
> Will someone direct me on to the correct path?
It's just workaround, but if it's unix system, lvm can solve the
problem, if you add the datadisk to a same volume group.
Another method, - which can be risky and you need write permission to CS
database - is: you just extend the xen LV size, and update the new in CS
db. the last step needed to CS, to calculate remaining space on a storage.
Regards:
Peter