-   Linux - General (
-   -   upgrade system with lvm on software raid-1 data volume w/o losing data (

BinWondrin 01-12-2009 09:32 PM

upgrade system with lvm on software raid-1 data volume w/o losing data
I found many similar posts but nothing that quite fits my situation:
  • HW: 64bit (dual-code atom on mini itx)
  • OS: CentOS 5.2 64 bit
  • Issue: Upgrade (Install) to Fedora 10

Base System on partitioned disk using lvm. Can be blown away, no problem here!

Problem: I have about 1 terabyte of data in a software raid-1 disk which forms a large volume group (vg01) with one logical volume consuming the whole volume group. I can unmount this any time. It is not part of the OS.
  • I would like to detach the 2 terabyte drives that form the volume group.
  • I would then re-OS with Fedora 10.
  • Finally I would re-add the 2 drives.

I realize however that I would probably loose all my data.
Losing the data would be really, really bad!

I thought about breaking the mirror. I did that. I removed the superblock from the removed drive and then tried to mount it at a different mount point.
I did not work, :-( I assume this has to do with the fact that I had layered lvm over top of the software raid.

Are their any recipes out there for doing this?
If I had to do this again I would stay away from lvm, especially since I allocated the whole disk to one logical volume.

eco 01-13-2009 03:25 PM

I guess a dirty wait of doing this would be to:

1) Break the raid
2) Format the 'broken raid disk'
3) Copy the content of the degraded RAID to the formated disk.
4) reinstall with a degraded disk (disconnect the one holding your data for extra safety)
5) copy the data back to the degraded raid, when all is there, sync the disk back into the new RAID.

In short

disk1 | disk2
2) RAID1 ext3
3) cp d1-> d2
4) RAID1 ext3
5) cp d1 <-ext3

Hope this helps. Make sure you do a backup first though.

All times are GMT -5. The time now is 12:21 AM.