Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-12-2009, 09:32 PM   #1
Registered: Jun 2008
Distribution: Fedora, RHEL, Ubuntu
Posts: 33

Rep: Reputation: 15
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.
Old 01-13-2009, 03:25 PM   #2
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
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.


lvm, mdadm, raid, software, upgrade

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add new drive to existing software RAID 0 without losing the data? superbo Linux - Hardware 2 06-12-2007 09:04 AM
LVM without losing data daihard Linux - Software 12 05-28-2007 01:27 AM
Need to recover data from a LVM volume deyv Linux - General 13 07-25-2005 05:43 PM
Can I switch RAID controller cards without losing data? BrianK Linux - Hardware 2 10-04-2004 09:14 PM
Upgrade to RH 9.0 without losing data? habadash Linux - Newbie 3 07-31-2003 05:41 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration