[mdlug] file copy
Adam Tauno Williams
awilliam at whitemice.org
Mon Dec 30 11:08:44 EST 2013
On Mon, 2013-12-30 at 11:03 -0500, Carl T. Miller wrote:
> Adam Tauno Williams wrote:
> > On Mon, 2013-12-30 at 09:48 -0600, Bob wrote:
> >> The big question is, can I create a vol, add the 2tb drive to it WITH
> >> OUT losing any data, add the new 4tb drive and then move the vol 2tb >
> >> 4tb?
> > Absolutely, yes. I do this all the time.
> Adam, enlighten me. How do you do this? I thought you had
> to run the pvcreate command to join a device to a volume
> group, and that the pvcreate would erase whatever former
> contents had been there.
I have cheated in the past.
Create a logical volume of the correct size of the current
non-volume/partition - actually it could be bigger, shouldn't hurt.
UNMOUNT the non-volume/partition.
dd if=/dev/NONVOLUME of=/dev/VGNAME/VOLUMENAME bs=512
mount /dev/VGNAME/VOLUMENAME /wherever
It should work. Once it works you can discard whatever stupid
non-volumne unmanaged-partition you have. Maybe recreate it as a PV and
just move the `new` logical volume back.
The filesystem is delightfully oblivious concerning its container.
If your target volume was bigger just run the filesystem's resize tool
and you should get the extra space [resize2fs for ext2/3/4].
Or better yet - just use volume management from the get-go.
--
Adam Tauno Williams <mailto:awilliam at whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
More information about the mdlug
mailing list