[CentOS] LVM change disk

Tue Dec 7 22:16:49 UTC 2010
muhammad panji <sumodirjo at gmail.com>

On Mon, Dec 6, 2010 at 9:23 PM, Adam Tauno Williams
<awilliam at whitemice.org> wrote:
> On Sat, 2010-12-04 at 10:29 -0800, John R Pierce wrote:
>> On 12/03/10 10:47 PM, muhammad panji wrote:
>> > Dear all,
>> > I have a 4,1TB Logical volume consist of four disks with size of 2TB,
>> > 1TB, 1TB, and 500GB. The LV currently full. I plan to change the 1Tb
>> > disks and 500Gb disks. I plan to remove one 1TB disk or the 500GB so
>> > that I can replace it with 2TB disk. most LVM tutorial ask to use
>> > pvmove to move phisical extent to the new disk. The problem is that I
>> > have no SATA port left so that I can't move PE to the new disk. How to
>> > migrate the data safely so that I can replace the disk? Thank you in
>> > advance
>
> Attach the drive to the system using a USB caddy.
> Do the the pvmove
> Remove the old physical volume from the volume group
> Shutdown
> Remove the drive from the caddy
> Install the drive into the system in place of the old drive.
> Boot.
Hi all,
Thanks for the reply. I know I didn't plan well when I setup for the
first time, even the PE size is 128MB so that I can only have a 8TB
LV.

I have moved around 1,3Tb data to another computers, is it save to
resize the LV filesystem and then resize the volume group so that I
can remove one of the disks? I plan to do more less like this tutorial
http://www.tcpdump.com/kb/os/linux/lvm-resizing-guide/shrink.html

After removing the disk, I can attach the new disks, add it to the VG
and then resize the LV and the filesystem.

Second alternative is to buy and use SATA-to-USB cable and do pvmove etc

The third is, I have similar machine that will be used to hold the
removed disk from the first machine. At the end the first machine will
have 4x 2Tb disks and the second machine will have 2x1Tb disks + 500Gb
disk. So I will attach the new disks to the second machine, move all
the data from the first machine, and remove the 2Tb disk from the
first machine and attach it to the second machine.

Any Suggestion which one is the best way to do this? Thank you in advance
regards,





-- 
-----
Muhammad Panji
http://www.panji.web.id                         http://www.kurungsiku.com
http://sumodirjo.wordpress.com          http://www.kurungsiku.web.id

http://www.linuxbox.web.id