I have one 1.5Tb HDD with Debian Wheezy. I have also four 2Tb empty HDDs.

I want to configure the four 2Tb disks in Raid5 and install LVM. Then migrate the content of the 1.5Tb disk on the Raid5.

Before starting, I would like to know if the migration could be possible and, if yes, how to do it.

  • Is LVM used on the old HDD? Do you want to do the migration live (no shutdown or interruption of service)? Jan 8 '14 at 16:12
  • No, LVM is not used on the old HDD. Migration off line.
    – Bertaud
    Jan 8 '14 at 17:38

You could simply do a 'rsync' from the old disk to the new disk. Something like this should work:

rsync -rtv "/mnt/old_drive" "/mnt/new_drive"

You would replace the above locations with the mount points of your disks on your computer.

To find where your disks are mounted to or what device they are showing up as you can use:

df -h


cat /proc/diskstats

'df' will tell you where the disks are mounted and 'cat /proc...' will tell you what devices the disks are connected as in case you have to mount them manually or add them to fstab.

  • /mnt/mt0 for me ? and LVM ?
    – Bertaud
    Jan 8 '14 at 17:40
  • Not sure what you are asking. You would replace '/mnt/old_drive' and '/mnt/new_drive' with the location of your disks mount points. ...ill edit the answer a little to help with this.
    – Atari911
    Jan 8 '14 at 17:42
  • Here is a link to a tutorial on how to setup a LVM: ostechnix.wordpress.com/2013/02/03/…
    – Atari911
    Jan 8 '14 at 17:48

Safest solution might be to configure your RAID5/LVM disks then reboot the system using a live cd having gparted on it (see http://gparted.sourceforge.net/). You can then clone your partitions onto the LVM volumes quite easily.

  • good idea ! I will try that.
    – Bertaud
    Jan 9 '14 at 16:18
  • I don't know this tool but is it also possible to move a directory (i.e /var) into a LVM partition (i.e p_var) ?
    – Bertaud
    Jan 9 '14 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.