* [linux-lvm] Feature : Merge two LV
@ 2001-09-06 19:51 Henk Birkholz
2001-09-07 4:05 ` Andreas Dilger
0 siblings, 1 reply; 3+ messages in thread
From: Henk Birkholz @ 2001-09-06 19:51 UTC (permalink / raw)
To: linux-lvm
Hello dear Sirs,
Iam using LVM for the first time right now and i am already very fond of
it. Fast to understand, it creates a nice feeling to work with larger disk
capacities. I was at a point i already filled the storage ready sized and
partiotioned with data. Half full i recognized a conceptional problem with
my structure of lv and the best way to solve it would have been to merge
two lv. Instead i had to empty one of the lv (by moving data to other
space) remove it and then extend another lv over the space of the old one.
It would have been easier (without moving the date manually) if some kind
of lvmerge would exist, which would merge the lv and thier fs
automatically. Maybe there is ia wayto do it, i simply don't know.
In that case i would be glad to know that way from you. (and be added to
you FAQ). If there is no such way i only wanted to "ask for a missing
feature" as mentioned in your FAQ :)
Despite of that. Great tool. Thank you!
Regards,
Henk Birkholz / germany
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Feature : Merge two LV
2001-09-06 19:51 [linux-lvm] Feature : Merge two LV Henk Birkholz
@ 2001-09-07 4:05 ` Andreas Dilger
2001-09-06 23:14 ` Steven Lembark
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Dilger @ 2001-09-07 4:05 UTC (permalink / raw)
To: linux-lvm
On Sep 06, 2001 21:51 +0200, Henk Birkholz wrote:
> It would have been easier (without moving the date manually) if some kind
> of lvmerge would exist, which would merge the lv and thier fs
> automatically. Maybe there is ia wayto do it, i simply don't know.
> In that case i would be glad to know that way from you. (and be added to
> you FAQ).
What you ask for is very complex. It is not so much an issue of LVM (which
could do such a thing relatively easily), but a filesystem issue (which is
_very_ hard to do. Even with a tree-based filesystem like reiserfs or XFS,
there are all sorts of duplicate identifiers stored in the filesystem, like
block numbers, inode numbers, etc, which would make it complex to resolve.
You are far better off just to do (assuming you collapse /usr/local into /usr):
umount /usr/local
e2fsadm -L -(free space) /dev/vg/lvusrlocal # if needed, assuming ext2/ext3
e2fsadm -L +(needed space) /dev/vg/lvusr # if needed, assuming ext2/ext3
mount /dev/vg/lvusrlocal /mnt/tmp
tar cf - -C /mnt/tmp . | tar xf - -C /usr/local
umount /mnt/tmp
lvremove /dev/vg/lvusrlocal
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [linux-lvm] Feature : Merge two LV
2001-09-07 4:05 ` Andreas Dilger
@ 2001-09-06 23:14 ` Steven Lembark
0 siblings, 0 replies; 3+ messages in thread
From: Steven Lembark @ 2001-09-06 23:14 UTC (permalink / raw)
To: linux-lvm
-- Andreas Dilger <adilger@turbolabs.com>
> On Sep 06, 2001 21:51 +0200, Henk Birkholz wrote:
>> It would have been easier (without moving the date manually) if some kind
>> of lvmerge would exist, which would merge the lv and thier fs
>> automatically. Maybe there is ia wayto do it, i simply don't know.
>> In that case i would be glad to know that way from you. (and be added to
>> you FAQ).
>
> What you ask for is very complex. It is not so much an issue of LVM
> (which could do such a thing relatively easily), but a filesystem issue
> (which is _very_ hard to do. Even with a tree-based filesystem like
> reiserfs or XFS, there are all sorts of duplicate identifiers stored in
> the filesystem, like block numbers, inode numbers, etc, which would make
> it complex to resolve.
lvcreate -l somesize vgXX;
mkfs.ext2 -b4096 -i10240 /dev/vgXX/lvolY;
mount /dev/vgXX/lvolY /mnt;
find /lvolA/mount/point /lvolB/mount/point -xdev | cpio -pd --dot /mnt;
vi /etc/fstab;
<remove lvolA and lvolB, add in lvolY>
umount /mnt;
mount -a;
If at this point you have what you want then lvremove lvolA & lvolB.
Nice thing about it is that nothing gets removed until the new file
system looks clean.
If you're tight on space create a smaller volume, archive onto it
instead of tape w/ bzip2 -9 (i.e., seriously squish the data), blow
off the lvol's and recover from disk.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-09-07 4:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-06 19:51 [linux-lvm] Feature : Merge two LV Henk Birkholz
2001-09-07 4:05 ` Andreas Dilger
2001-09-06 23:14 ` Steven Lembark
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.