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)
There's a good LVM howto http://tldp.org/HOWTO/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).
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.
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.
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: https://help.ubuntu.com/community/In...n/SoftwareRAID
grow(add more disks) raid5 array: http://linux-raid.osdl.org/index.php/Growing
raid1\raid5 setup: http://www.gagme.com/greg/linux/raid-lvm.php
lvm setup: http://www.gentoo.org/doc/en/articles/lvm-p2.xml
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.
|All times are GMT -5. The time now is 01:35 AM.|