LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   adding a drive to raid 0 and LVM without data loss (https://www.linuxquestions.org/questions/linux-newbie-8/adding-a-drive-to-raid-0-and-lvm-without-data-loss-4175444094/)

Adol 01-04-2013 01:17 AM

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.

jschiwal 01-04-2013 02:24 AM

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.

Adol 01-04-2013 03:56 AM

Quote:

Originally Posted by jschiwal (Post 4862659)
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.

chrism01 01-06-2013 08:12 PM

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

jschiwal 01-09-2013 06:16 PM

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.


All times are GMT -5. The time now is 04:37 PM.