0 votes
Hi to everyone,

Recently i've set up LVM on my clearos server. Took a little bit time to get used to the commands on the commandline but i've managed.

Soon there will be arriving a new 4TB disk that i'm going to add to my system and it will be part of my Volume group.
One of my Logical Volumes is spread over 3 physical disks, sdc, sde and sdg total size of this LV is 3TB. The concerning 3 physical disks are partially in use by the LV ( so not the whole disk is used for this LV

I want to move this LV over to the new 4TB disk. This disk should be part of the VG and will be used 100% for this LV that i want to move on to it.

Is there anyone who can me provide with steps necessary?
I've read an article that is using pvmove command, but in their example they're moving from 1 disk to 1 other disk. I'm a bit troubled how this should work when my LV is spread over 3 physical disk.
They are using this command: pvmove -n /dev/vg01_data/lv_data /dev/sdb1 /dev/sdc1, where sdb1 is the source and sdc1 is the destiny.
Can i replace the source part with 3 sources?
Or should i move at first the 1st source, then the 2nd source and then the 3rd source, all to the same destiny?

Off course all the moving needs to "safe for the data" which is present in the LV. My LV is jyst holding data, it's not a home-dir or anything substantial to the clearos system. It's just holding movies and tv series.

Any help much appreciated.

Monday, November 16 2020, 08:08 PM
Share this post:
Responses (2)
  • Accepted Answer

    Tuesday, November 17 2020, 02:29 PM - #Permalink
    0 votes
    I've done this by creating a new volume and copying the old volume onto it then unmounting the old volume and mounting the new volume in fstab. I found a document online walking through this.

    I'd be concerned about building a server where if any one of several drives goes down you have a broken server.

    If I were you I'd get one, two or three more 4TB drives and build a brand new ClearOS following the ClearOS documentation on MDADM software RAID on LVM setting up the various volumes at different RAID levels. For example very important stuff like the OS can use a 4 disk mirror for 4x security but your TV shows can use a 4 disk stripe for 4x capacity. Normal stuff on RAID 5. LVM + MDADM can do all this. Once the new machine was running I'd use configuration backup to transfer the settings. Install the apps and rsync over the files. You can probably mount the old drives in the new system if you can figure out how to rename the VG.

    Don't be put off by the term 'Software RAID'. All RAID is software RAID except that hardware RAID is an add in PowerPC card running software RAID internally. Modern CPUs are so powerful that MDADM RAID is actually faster.

    I built such a system with 4x 4TB Seagate drives a year and a half ago and I've had no complaints.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 17 2020, 09:43 AM - #Permalink
    0 votes
    All I can do is google. At a guess you can move each source one by one. Alternatively, if you can, perhaps create a new LV on your new disk and sync all your old data to it then bring it live by manipulating the binds in /etc/fstab. You may need to be offline to do this, but it would save you having three LV's on a single disk, not that it is a big issue.
    The reply is currently minimized Show
Your Reply