LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2013, 01:17 AM   #1
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Rep: Reputation: 6
adding a drive to raid 0 and LVM without data loss


Hello,

Currently I have 2 1TB WD-black hdds in Raid 0 and 1 2TB WD-Green.

Everything is setup in LVM and formatted with ext4.

I want to eventually expand my storage and want to buy 2 more 1TB drives, put them in raid 0 and add them to my LVM. Or buy another 2TB drive, create a raid with my existing 2TB drive and add it to the LVM.

I have also been considering raid 5 for a little more reliability.

Is it possible to do this without losing data? My main system is on another 200GB hdd.

Also I am using mdam raid for the raid. Not hardware raid.

Last edited by Adol; 01-04-2013 at 01:23 AM.
 
Old 01-04-2013, 02:24 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
In my opinion, don't use raid-0 for so many drives. Get two more 2TB drives and use raid 5 if you want a 4 TB file system.
Here is a howto on incorporating LVM and raid 5 configurations together. http://wiki.tldp.org/LVM-on-RAID
You could also use Yast2's partition program. But don't expect to convert the 1 TB drives to raid-5 without backing up or moving the data first.

Consider not using LVM and just use RAID 5.

Last edited by jschiwal; 01-04-2013 at 04:00 AM.
 
Old 01-04-2013, 03:56 AM   #3
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by jschiwal View Post
http://wiki.tldp.org/LVM-on-RAID

In my opinion, don't use raid-0 for so many drives. Get two more 2TB drives and use raid 5 if you want a 4 TB file system.
Here is a howto on incorporating LVM and raid 5 configurations together. http://wiki.tldp.org/LVM-on-RAID
You could also use Yast2's partition program. But don't expect to convert the 1 TB drives to raid-5 without backing up or moving the data first.

Consider not using LVM and just use RAID 5.
Thank you.

I’m going to look into that. The system is basically a home server for files, video and music(maybe web and email in the future) so raid 0 is not really required. I was, actually, leaning toward raid 5 because speed is not so much of an issue and its more reliable.

Since my 2TB drive is already being used as part of the LVM(not raid), can I create a raid 5 volume with 2 new disks and my existing disk without losing data. I think that’s going to be a little bit of a problem.

Last edited by Adol; 01-04-2013 at 03:59 AM.
 
Old 01-06-2013, 08:12 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Generally you need a minimum of 3 disks for RAID5
https://en.wikipedia.org/wiki/Standa..._levels#RAID_5
https://en.wikipedia.org/wiki/RAID
 
Old 01-09-2013, 06:16 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I though I already responded to this post, but it wasn't posted due to wifi issues.

Raid 1 mirroring is often used for home NAS devices. It will drop the capacity to 1/2.

Raid 5 uses 3 drives minimum. For hot swap devices, it's possible to replace a bad drive without shutting down.
1/3 of the space is used for parity. So you can create a 4 T partition using 3 2 T drives.

You will need to move the data off the 2T drive before you create the raid device.

Backing up is still needed. You could still have file system corruption, or accidentally delete files. Redundancy won't help there.
Another potential problem is if you one drive go bad, and while rebuilding the array, on of the other drives encounters some bad blocks.
 
  


Reply



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
Draft data loss mitigation method for spanned LVM (would like suggestions) ACiD GRiM Linux - General 1 10-18-2009 03:17 AM
LVM Reducing LVs Without Data Loss centos82 Linux - Newbie 3 10-04-2008 01:58 AM
Reduce LVM Partition size without any data loss viral_Ahire Linux - Software 1 04-11-2008 03:42 PM
Need to mount LVM volume and save Data -- Recovering from power loss. chuckcom Linux - General 1 02-09-2008 07:57 PM
LVM - possible data loss zdenisl Linux - Software 0 05-11-2006 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:56 AM.

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