Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 1Tb drive with LVM on it. Now I've installed another 1Tb hard drive. And I want to make RAID1 without losing data on the first disk. Is there any way to do that without backing up data and then restoring it? OS: Debian 5

share|improve this question
    
I would recommend you back up the disk drive if you have anything important on it that you can't afford loosing. –  sammyg Jun 13 '12 at 22:51
    
Just did that, following these instructions: howtoforge.com/… –  starblue Jan 19 '13 at 21:13

1 Answer 1

up vote 0 down vote accepted

Yes.

Create a new RAID1 specifying your new disk device and "missing" for the second disk device. This will start up a degraded RAID1 which will be fully working. You can the configure LVM on the resulting md device and get it all working how you like, copy your data across onto it.

Once convinced that you have everything working just right, and have backups of your data just in case, blow away your old drive (unmount it, vgchange -an to deactivate LVM, may need to overwrite the disk with dd or similar to obliterate any LVM metadata..). Now add your old drive into the RAID1, thus healing it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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