[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Managing DomU partitions in XEN+LVM systems?


  • To: Derek <xen@xxxxxxxxxxxxxxxx>
  • From: "Jordi Segues" <jordisd.mailing@xxxxxxxxx>
  • Date: Thu, 19 Apr 2007 15:06:42 +0200
  • Cc: xen ml <xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 19 Apr 2007 06:05:29 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JokRlwFAporbGERqdF28d/zc67ckMRgQCtp3EyKgKzgYnwhIaquMLXgu8S/XmYQKesFkxvMk5uVVam6zR9/HjeTA4iVh9VyG+G0lbLCiZMJGJgerIZZEUQPlkl2Vdav3av8K+fhvkykb6gDKkZe4lEoLFvIPOr+DE7hirNCRPnQ=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Hello,

I have a similar problem:

I have a Windows 2003 domU in an LVM partition.
I want to enlarge this partition in order to have more space for windows 2003.

So in your post you say:

That would seem trivial to do, from within dom0 (while the domU is not
running of course.)  Just use:
  - lvextend to enlarge the volume
  - fdisk (or parted) to enlarge the partition
 - ntfsresize to enlarge the filesystem

but for me the problem is that fdisk can't enlarge a partition! It
says you must delete it and then recreate it, but if I do this I lose
all my 2003 system.

How can I enlarge my 2003 partition (and update the MBR for windows to
recognize it)?

ntfsresize tells me:

Current volume size: 10470748672 bytes (10471 MB)
Current device size: 10470749184 bytes (10471 MB)
New volume size    : 10470744576 bytes (10471 MB)
Nothing to do: NTFS volume size is already OK.

So my LVM partition have been enlarged, but ntfsresize don't see it.
You solved it with fdisk? and how?

Windows 2003 is in one big partition, so it will need to boot after
the resize :)

Thanks for your help!

Jordi.S

On 1/31/07, Derek <xen@xxxxxxxxxxxxxxxx> wrote:
Hi all,

This is more an LVM question than a XEN one.   But hopefully not too far off
topic for the Xen list...

I am running an HVM domU partitions (WinXP).  I assigned a root drive that
is an LVM logical volume as seen by the Dom0, in other words:

  disk = [ 'phy:/dev/mapper/main-root_disk_winxp,hda,w' ,
... others ... ]

WinXP's installer sees the logical volume as a whole disk, and promptly
partitions it.  So, it ends up with a partition table and one large NTFS
filesystem partition.

Now later, I decided to enlarge the logical volume, it's associated
partition, and it's associated NTFS filesystem.

That would seem trivial to do, from within dom0 (while the domU is not
running of course.)  Just use:
  - lvextend to enlarge the volume
  - fdisk (or parted) to enlarge the partition
 - ntfsresize to enlarge the filesystem

The first two steps work flawlessly.  The third step is problematic, because
ntfsresize wants to be told the device path to the _partition_, not to the
_whole_disk_.  Well, /dev/mapper/main-root_disk_winxp is
the whole disk, but there's no corresponding
/dev/mapper/main-root_disk_winxp1 for the paritition on
it.  LVM+UDEV+DM don't give you one.

I'm not stuck, I have a workaround yet to try:   linux in a domU, and run
fdisk+ntfsresize there.  The linux DomU will presumably contain a device
nodes for the partition, and I can run ntfsresize within it.  But I'm asking
this because I'm sure there's  a more elegant solution, and someone on this
list probably knows it.  Surely there's a way to persuade LVM+UDEV+DM to
produce device nodes for each partition within each logical volume?  (I know
roughly how to write UDEV rules, but this problem goes beyond that, and I
definitely don't understand the device mapper).

Thanks,
Derek.

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


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.