adding a drive to raid 0 and LVM without data loss
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.