LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-26-2013, 09:55 AM   #1
mengoshmink
Member
 
Registered: Nov 2003
Distribution: Fedora
Posts: 42

Rep: Reputation: 3
Unhappy RAID1, LVM2 and a hard disk failure


Hi,

I'm hoping I have a simple problem but I can't figure out what to do.

Linux distrobution: CEntOS 6.4

Asus motherboard: M4A78LT-M
http://www.asus.com/Motherboards/M4A78LTM/

Original setup:
DVD-ROM via the IDE port
Two 1.5Tb drives on SATA1 and SATA2
RAID1 the two disks, with 3 partitions:
Quote:
sda1 ext4 / 20Gb
sda2 swap 2Gb
sda3 lvm /mnt/store
When hard disk space was running low I added two new 3.0Tb disks and did a fresh install of the latest version of CEntOS to one of them. I extended the LVM of the original disk(s) to include the new hard disk.
Quote:
sda1 ext4 not mounted 20Gb
sda2 swap 2Gb
sda3 lvm /mnt/store
sdc1 ext4 / 20Gb
sdc2 swap 2Gb
sdc3 lvm /mnt/store
Life was good until SMART warned me one of the original hard disks was failing.

My question:
How do I now replace the original 1.5Tb disks? Would this be a good time to migrate to OpenSUSE and BTrFS?

I really can not see a way forward so any questions, advise or help would be greatly received. I miss my server and the facilities it gave me :-(

mengo
 
Old 10-27-2013, 04:48 AM   #2
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Once you are familiar with one linux flawor, it is quite difficult to switch to another.

Read man for pvmove, vgsplit, vgmerge; probably this is what you looking for.
 
Old 11-03-2013, 08:23 AM   #3
mengoshmink
Member
 
Registered: Nov 2003
Distribution: Fedora
Posts: 42

Original Poster
Rep: Reputation: 3
You are right voleg. Although I have been happy in the Slackware and Red Hat camp I have never done that well in the Debian or SUSE camp. However I still may make the switch to SUSE in time, as I can see some benefits for what I do.

I did some reading and a little help from here and another forum I feel I am leaps and bounds ahead of where I was. Thank you.

What I have done is:
Mounted my old / and backed up all that I thought was important, forgetting my mythtv database - doh!

I then realised I had created volume groups and logical volumes with the same names as my original setup, creating a conflict. Unfortunately I couldn't remove the duplicates with the command line or gparted but I could with the Anaconda installer with Scientific Linux. I left Anaconda with any what I felt unnecessary RAID partitions removed and the important one left ready for lvm; this time with a blank physical volume but no volume groups created.

Back on the command line in my new install I extended my old volume group:
# vgextend -v vg_phantom /dev/md2
Then moved the data from my old disk to my new one(s)
# pvmove -v /dev/md126 /dev/md2
and finally removed the old disk:
# vgreduce -v vg_phantom /dev/md126

One of my remaining problems is my RAID seems to start at md12x not mdx but I believe I can fix this, reading here:
http://ubuntuforums.org/showthread.p...1#post10907831
http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/
http://askubuntu.com/questions/20970...-being-ignored
http://serverfault.com/questions/399...side-initramfs

Okay, I have lost m mythtv database but I maybe able to recover it from the old good disk. However the recordings are still intact so I may just manually re-encode them.

Finally I have found that the lvm on the new disk(s) is not using all of the available space, but I think some reading and I should be able to fix that too.

Last edited by mengoshmink; 11-03-2013 at 08:30 AM.
 
  


Reply

Tags
lvm2, raid1



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
raid1 disk failure chiendarret Linux - Hardware 1 03-03-2013 08:13 AM
[SOLVED] Converting from RAID1 to a single disk, after failure x3nn3x Linux - Software 1 04-05-2011 11:11 PM
Recovering lost files on LVM2 + RAID5 following disk failure & re-assembly? cloudon7281 Linux - Server 0 09-21-2010 11:21 AM
How to recover a raid1 over nbd after failure of local disk? adrian_stephens Linux - Server 1 05-22-2009 12:16 PM
RAID1 LVM disk failure - can't restore ngibsonn Linux - Software 2 03-13-2007 07:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:18 PM.

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