WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] How do I resize a Physical Partition in a Dom U that's

On Sat, May 2, 2009 at 4:43 AM, Simon Hobson <linux@xxxxxxxxxxxxxxxx> wrote:
> Bob Linkonij wrote:
>> I'm pretty foggy about the xvdc vs xvdc1 name differences but if I
>> understand what you're asking I did the first type.  I'm not even sure
>> how I'd do the latter, or if I should.
>
> What does it say in /etc/fstab ?
>
> If it has "/dev/xvdc" then the filesystem has been created in the whole
> disk, which I think is easiest.
>
> If it has "/dev/xvdc1" then the virtual disk has been partitioned and the
> filesystem created inside the partition.

fstab alone can be misleading, as you can actually map the disk as
xvda1 and not xvda.
Other than fstab, you'll also need domU's config file (or do "xm list
-l domU_name" from dom0) to find out what block devs are on domU.

Usually if the installation process is done using automated tools
(like virt-install) the block device will be xvda and it's
parititioned inside domU (possibly with LVM as well)

>> So it sounds like the 1st one is simpler.  And can be done live or hot.
>
> Actually, it can't be done live - you have to unmount the filesystem and
> fsck it before you can resize it. You'll struggle to unmount your root
> filesystem.

fileystem resize can be done on line (at least it's possible with ext3
on RHEL5). The problem is changing block device size (xvda) and
changing partition layout currently requires shutting down then
starting up domU. This is true regardless whether or not you use
partitions on domU.

>
> If you find that your root partition is /dev/xvdc1 then what I'd suggest is
> this :
> shutdown the guest
> boot up another guest with this LV attached as a disk. This can be an
> entirely different guest setup, or you could boot your current setup from
> one of the "live cd" distros such as Knoppix.

... or you could also assign the disk to dom0, using "xm block-attach 0 ... "

> It's a lot easier to not use partitions in the guest.

Correct.

> but you may
> find it hard to persuade the installer to accept that.

I haven't found any installer that could do that :)
It's usually a clone-based installation using domU image template.

At this point I believe you need to provide these info :
- domU's fstab
- output of "fdisk -l" on domU
- disk section from domUs config file (usually on /etc/xen), or the
vbd section output from "xm list -l domU_name"

Regards,

Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users