Help answer threads with 0 replies.
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 09-24-2009, 08:46 AM   #1
LQ Newbie
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
Setup up lvm raid1(boot,root,home),raid5(media)


I will be receiving a new 1.5TB harddisk tomorrow(hopefully), and I would like to set up lvm and raid-5 for data, and raid-1 for home,root and boot.

I have no experience whatsoever with lvm or raid in linux, but I have a pretty good idea how raid works.

This is my current system:
Disk /dev/sda: 300.0 GB, 300069052416 bytes
Disk /dev/sdb: 400.0 GB, 400088457216 bytes
Disk /dev/sdc: 200.0 GB, 200049647616 bytes
Disk /dev/sdd: 750.1 GB, 750156374016 bytes
Disk /dev/sde: 500.1 GB, 500107862016 bytes
Disk /dev/sdf: 750.1 GB, 750156374016 bytes

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 278G 258G 6.2G 98% /mnt/Movies
/dev/sdb1 370G 344G 7.2G 98% /mnt/TV/TV-2
/dev/sdc1 49G 23G 24G 50% /
/dev/sdc3 135G 119G 9.7G 93% /mnt/ISO
/dev/sdd1 694G 607G 53G 93% /mnt/TV/TV-1
/dev/sde1 463G 292G 148G 67% /mnt/x264/x264-2
/dev/sdf1 694G 608G 51G 93% /mnt/x264/x264-1
total used 2249gb

I will add a 1.5TB disk, and remove the 200gb,300gb and 400gb (When data has been transferred)

My plan is this:
2x750gb 750 036 374 016
1 "000 120 000 000" /boot (lvm-raid1) ext2
2 "000 500 000 000" swap
3 "049 308 512 000" / (lvm-raid1) reiserfs
4 "200 000 000 000" /home (lvm-raid1) reiserfs
5 "500 107 862 016" ? (lvm-raid5) ?

1x1500gb 1 500 000 000 000
1 "1500 000 000 000" /mnt/data ?

1x500gb 500 107 862 016
1 "500 107 862 016" ? (lvm-raid5) ?

As you can see I want is:
raid-5 on 3x500GB partitions for data (xfs?)
raid-1 on 2x120MB partitions for boot (ext2)
raid-1 on 2x49GB partitions for root (reiserfs)
raid-1 on 2x200GB partitions for home (reiserfs)

Then all I have left is the new 1.5TB disk which I want to use lvm with raid-5 on later when I can afford 2 more 1.5TB disks. but for now it will just be a single disk.

How should I set this up? Please provide as much info as you can.

Another question: Which filesystem do you recommend for data, and how should it be set up? I will be storing many large files on the lvm(average of 200MB or so) There will also be some small textfiles, so I don't want a 1KB file to eat 1MB or something crazy like that

I was thinking about using the xfs filesystem, but I'm not convinced yet.

Thanks for any replies.

edit: Forgot to mention, I am able to delete\move some of the data to another pc, however I would like to avoid it if possible. Can probably free up 500GB if necessary.
Also I will be installing xubuntu 8.04 LTS (I'm downloading the alternate cd as I type this)

Last edited by wallbunny; 09-24-2009 at 09:16 AM. Reason: typo
Old 09-24-2009, 11:14 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,395

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
There's a good LVM howto . Note you've almost definitely got LVM v2.
You can put LVM on top of raid. Do the raid first, then assign the /dev/mdX to a PV (see lvm howto).
Old 09-25-2009, 07:27 AM   #3
LQ Newbie
Registered: Jul 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the link chrism01, It turned out it wasnt as hard as I thought.. the xubuntu install did all the work for me.
If anyone else finds this thread here's the howto I used.

note: I havent actually done this yet. I only tested in vmware, but it seemed to work without any problems.
Old 09-30-2009, 11:57 AM   #4
LQ Newbie
Registered: Sep 2009
Distribution: OpenSUSE 11.1
Posts: 8

Rep: Reputation: 0
Using OpenSUSE

I was in almost the same situation as you and I decided to use OpenSUSE 11.1 with RAID under LVM. If you make the switch let me know how you like Ubuntu. I've never used Ubuntu, but I know that from what I've found using other distributions they only have a good GUI for editing RAID in the installer, but once they were installed the GUI's for working with RAID and LVM were horrible. That's why I use OpenSUSE, with SUSE you can actually set up the RAID 5 and LVM post install which I've found somewhat hard to do on other distributions. If you decide to give OpenSUSE a spin check here's a tutorial that I wrote on how to setup RAID under LVM on OpenSUSE 11.1 (GNOME) with a GUI. If you stick with Ubuntu let me know how you like it as I always like to give distributions a test.
Old 10-01-2009, 04:59 AM   #5
LQ Newbie
Registered: Jul 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I've been using ubuntu about 3 years now(before that gentoo).
I've never been happier with my choice.
I did make a switch from regular ubuntu to xubuntu tho (I prefer xfce)

The installer on the alternate installer cd works very well for setting up raid before install. It took about 5 minutes to set up my raid1 boot partition + raid1 root partition + raid5 data partition.
When install was done, I set up lvm on the raid5 one, which took another 5 minutes of reading - then 3-4 hours to sync.
In the last few days i've set up the same thing for my other pc which has 200gb+200gb+200gb+300gb+400gb disks.
raid5 for 200gb on each drive. 100gb backup space on the 400gb disk.
and raid1 for root\boot partition between 300 and 400gb disks.

Here's some helpful sites which helps you setting up raid 1\5(+lvm):

xubuntu raid install:
grow(add more disks) raid5 array:
raid1\raid5 setup:
lvm setup:

When creating the VG I chose to use extentsize of 128mb for my main server with the larger disks, and 64mb for the one I'm setting up with the old disks.
So far I'm very happy with the performance.


lvm, raid, ubuntu

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
lvm ontop of raid10 or combine two raid1 via lvm? okar Linux - Server 3 09-11-2009 02:37 PM
Want to move LVM installation to RAID5 array - how do I get it to boot? nethbar Linux - Software 0 05-29-2007 10:49 AM
HW raid5 or raid1, & how many drives? hank43 Linux - Enterprise 2 12-18-2006 09:03 AM
RAID5 and RAID1 causing high system load on Suse 10.1 with no activity desibeli Linux - General 11 06-10-2006 01:50 PM
Raid5 root, lilo won't install boot GregLee Linux - Software 4 12-05-2004 08:13 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:29 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