Hello everyone, Im starting to use Xen on a SUSE Linux Enterprise Server 10 SP2, but Im not quite happy yet with the virtual disk management. I still need to do a lot of research about that, but first I want to ask the community about a simple way to handle the guest machine disks. *Is there any way to increase/decrease a guest machine disk after the OS is installed? Can I have a dynamically expanding disk when I create a virtual machine?* Any best practices that you can give me regarding to that? Thanks in advance! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 07/07/2008 21:18, Augusto Alvarez wrote:> *Is there any way to increase/decrease a guest machine disk after the OS > is installed? Can I have a dynamically expanding disk when I create a > virtual machine?*if you use LVM, you can create an LV for each "disk" you want a domU to have, you can then expand the LV and then expand the filesystem iside it (or reduce the filesystem, then reduce the LV) Unfortunately the last time I checked xen doesn''t report the changed LV size "live" to the domU, so you''ll need a reboot of the domU. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> On 07/07/2008 21:18, Augusto Alvarez wrote: > > > *Is there any way to increase/decrease a guest machine disk afterthe OS> > is installed? Can I have a dynamically expanding disk when I createa> > virtual machine?* > > if you use LVM, you can create an LV for each "disk" you want a domUto> have, you can then expand the LV and then expand the filesystem isideit> (or reduce the filesystem, then reduce the LV) > > Unfortunately the last time I checked xen doesn''t report the changedLV> size "live" to the domU, so you''ll need a reboot of the domU. >Even if it did, can Linux handle it anyway? I added a disk to a RAID array recently and while I could use fdisk to add a new partition, I had to reboot before Linux could use it. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra Giraldez
2008-Jul-08 01:34 UTC
Re: [Xen-users] Handling virtual disks on Xen
On Monday 07 July 2008, James Harper wrote:> Even if it did, can Linux handle it anyway? I added a disk to a RAID > array recently and while I could use fdisk to add a new partition, I had > to reboot before Linux could use it.partprobe -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> On Monday 07 July 2008, James Harper wrote: > > Even if it did, can Linux handle it anyway? I added a disk to a RAID > > array recently and while I could use fdisk to add a new partition, Ihad> > to reboot before Linux could use it. > > partprobe >Please correct me if I''m wrong, but doesn''t partprobe just ask Linux to re-read the partition table? This is exactly what fdisk does, but it fails if the disk is already in use, which is the case we are discussing here. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Jul 7, 2008 at 6:38 PM, James Harper <james.harper@bendigoit.com.au> wrote:> > On Monday 07 July 2008, James Harper wrote: > > > Even if it did, can Linux handle it anyway? I added a disk to a RAID > > > array recently and while I could use fdisk to add a new partition, I > had > > > to reboot before Linux could use it. > > > > partprobe > > > > Please correct me if I''m wrong, but doesn''t partprobe just ask Linux to > re-read the partition table? This is exactly what fdisk does, but it > fails if the disk is already in use, which is the case we are discussing > here. > > James > > _ >I''m not entirely sure what partprobe does but I know you can get rid of 99% of the times that you would have to reboot after editing the partition table by using it. Very rarely will partprobe not update the partition table list in the kernel. It''s been a godsend. On the other hand you can go back in and edit a disk with fdisk after already previously editing it but you won''t be able to format the partitions without using partprobe or rebooting. Grant _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 08/07/2008 02:07, James Harper wrote:> Even if it did, can Linux handle it anyway?Windows certainly can, On VMware (would work on bare metal too) I have disks connected via the iSCSI initiator, can increase the size of the target, refresh within Disk Management or diskpart.exe and extend the volume without a reboot - provided it''s not a system disk. I haven''t tried it on Xen with an LVM/phy: disk to a Windows domU (yet). _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra Giraldez schrieb:> On Monday 07 July 2008, James Harper wrote: >> Even if it did, can Linux handle it anyway? I added a disk to a RAID >> array recently and while I could use fdisk to add a new partition, I had >> to reboot before Linux could use it. > > partprobeThis requires parted package to be installed. On bare system the same effect can be achieved by calling blockdev --rereadpt /dev/mydevice. blockdev is part of util-linux. The said methods do not work while the disk pt is open. Resizing LVM however doesn''t have the need for rebooting the dom0 as the changes are applied dynamically in the dom0. The domU however has still to be booted, AFAIK. There is xm block-reconfigure which might update the disk size, but that didn''t work for me as of Xen 3.2.0. MfG -Dimitri Puzin> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users