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/
Home Products Support Community News


Re: [Xen-users] LVM and resize2fs

Jonathan Tripathy wrote:

No I can't be sure. That's what I was worried about. Do you think it's an issue? I guess I could not specify the size, however when I want to shrink a disk for a customer, then this becomes a bit trickier, as I have to resize2fs first and then lvresize. What would I do in this case?

What I do is resize the filesystem to slightly smaller than I want, resize the volume, and then resize the filesystem to match.

But I have another question about this. I know almost nothing about the internals of ext2/3 filesystems - if you create a small one and grow it, does that in any way affect any options or optimisations ? I know in days of old, there were issues where the allocation chunk size was directly related to filesystem size - but I also know that ext2/3 is somewhat more intelligent than that.

Also, if you use dd to create your cloned filesystem, does that result in any duplicate identifiers ? Or are things like UUIDs create at partitioning time ?

An alternative approach would be to create the filesystem the size you want it (ie create the volume, create a new filesystem on it), and then use something like rsync (or just a recursive option to cp) to copy the contents of the base filesystem into it.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>