I have one desktop with 6x1TB HDD's. What's the best way to manage these?
I'm about to reinstall and I want to know the best way to manage all these fucking discs. Is there a better way than having one disc with the necessary system partitions (/, /home, /boot, swap) and five 1TB discs all formatted as ext4 and mounted under /media? I'm unfamiliar with RAID and LVM, but they seem enticing; what's it like when a disc crashes, and how's the recovery process usually go?
I'd love to have a better solution than the current one, but I know next to nothing about this stuff, so any helpful tips and links are greatly appreciated.
Also, what filesystem is the best choice at the moment? Most my files are movies (all 5GB or more) and music; stability is greatly preferred, since I have no way of backing everything up.
About this post
- Posted
- Archived
- Score
- 12 · 100% up
- Kind
- Text
- ID
- rx500
20 comments
You really need to read up on RAID and LVM to make an informed decision, It's not something I can explain in a single post.
I would recommend software RAID, read up on it and remember, more parity is good and your RAID parity should not be considered a backup.
As for filesystem, I would recommend EXT4. Brtfs is going to be awesome, but it's not nearly ready yet. ZFS is also great under a UNIX OS like FreeBSD or Solaris but due to licensing issues it can't be included in the Linux Kernel and the method of getting it working under Linux is problematic and removes many of the main features of running ZFS.
TD;DR : Read up on RAID & LVM, you need to work out what's best for you yourself.
Don't count out ZFS. Have you seen http://zfsonlinux.org/ ? It works very well for me although I'm just using it for my personal desktop.
Hey, don't knock btrfs. I'm using it at home for more than 2 years. Never had any problems. I wish it would support raid 5, 6. Then those 5 disks would be ideal.
My computer froze, I had to restart, and btrfs was all fscked up :(
That being said, it works normally, but obviously there are issues. I would probably count on it now though; they just released btrfsck.
Thanks for the reply. Yea I guess I'll be doing a lot of reading this weekend, since there doesn't seem to be a single 'best' solution.
A lttle late, but: My preferred way to set up a system like this is to put 3 partitions on each disk. Make one partition 150MB, the next one around 20-50GB and the rest for the last partition.
Put all 6 150MB partition into one RAID1, this will be /boot (yes, this is a 6-way mirror but the space "wasted" is negligible and this way every disk "works" on it's own).
The 2nd partitions go into one RAID10, so that you have either 3x the space alloted per disk in a 2-way mirror, or 2x the space in a 3-way mirror, depending on your needs. Put a SYSTEM lvm on this and carve out lvs for /,swap,/tmp,etc according to your prefences.
The last partition per disk goes into a RAID5 or RAID6 (again, depending on how much space you want/need) and from there into a DATA lvm with one huge lv (the lvm layer is kind of redundant but I like some "consistency") which I usually mount as /home.
For filesystems I usually use ext2 for /boot, ext4 for everything in SYSTEM and ext4/xfs/jfs for DATA depending on mostly gut feeling. Remember to put a bootloader on every disk and you're pretty much safe from hardware-failures. As disks get cheaper or your needs grow it's relatively easy to just replace every disk one by one, and rebuild and resize accordingly.
LVM and mdadm.
Understand that RAID is for availability, not for backup.
mdadm ftw!
That can store a lot of Oriental midget porn.
I currently have my drives formatted ext4 and mounted under media. I have them all symlinked to /data/{ripped,music,movies} and I share this directory over my network to a boxee box. I have been super lazy and have not setup lvm + mdadm. What I am really waiting for the fsck tool in btrfs then I am going to go that route.
The btrfsck tool is available. Granted I haven't used this yet, but at the moment I only use btrfs for things I don't need to worry about losing.
It's not precisely what you asked, but it sounds like you want a shitload of reliable storage, what with the movies and all. I'd recommend you grab another box and set up FreeNAS on it. It's not Arch, hell, it's not even Linux (it's FreeBSD), but it'll work with a minimum of fuss. It's also got ZFS, which can take atomic snapshots of the filesystem for quick online backups.
Unless, of course you want to get your hands dirty, which I suspect might be the case because you're running Arch. Either way, it sounds like fun.
MDADM raid-5 will give you 5 TB of storage with 1 disk redundancy (i think it is striped across all disks). if you setup the mailer right then you can get an email when a disk dies. if one goes you just remove it, pop in a new one, and have the array rebuild itself. there are plenty of docs online on how to do this. its not terribly complicated either. newer versions of mdadm can even add disks to an existing array. remember you cannot do this while the array is live though.
if you want to do some advanced partitioning with the disks toss LVM on top of the md raid device.
as for filesystems, like others have said, ext4 is great. ext3 is also a good choice. personally i dont see anything wrong with ext4 but i built m array back before most distros had support for it so i used ext3.
if you are looking for something that combines the concepts of lvm and raid together zfs is good but you need a lot of memory on the box. i tried it once with 2 gigs of ram in a server and the system would kernel panic every time i wrote to it over samba. btrfs is going to be the future for linux but it is no where near ready for prime time.
are you looking to boot off the raid or do you just want it as additional storage?
here are some helpful links:
MDADM: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID
LVM: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch27_:_Expanding_Disk_Capacity#Expanding_Partitions_With_LVM
MDADM Replace Drive (post 5): http://www.linuxquestions.org/questions/linux-server-73/mdadm-raid-5-single-drive-failure-644325/#post3173822
Depends on what you want to do. Do you want to have all 6TB available to write to? or do you want to have a RAID array with redundancy in case a disk fails you wont lose data.
Backups are for data loss prevention. Raid is for availability.
in budget situations, raid can also be for a primitive form of loss prevention against disk failures.
personally, i bought an inexpensive raid contoller from newegg (open box, cost about $130) and put my 3x1.5tb drives in a RAID5 config.
that's where i store all my precious datas.
OS is on the first drive, /home and /incoming (file dump) is the second, and /storage is the RAID array.
but, i did this because that's what i wanted.
if you don't want all of your drives presented as a single drive, then you probably don't want RAID5 or anything similar, probably not even mirrored or striped.
so really, how do you want to access your drives?
figure that out first, and then you'll be able to figure out what you need to do in order to accomplish it.
JBOD
Depending on how adventurous you are I would either go with a btrfs setup or a traditional software raid with lvm and/or xfs on top setup. RAID 10 in both cases unless you need the extra space provided by RAID 5/6 in which case btrfs is a no go as RAID 5/6 hasn't made it to mainline just yet. I think it may be close though, kernel 3.5 maybe?
btrfs is not production ready yet though many people are using it, just make sure you have good backups. :) Hopefully a real fsck for btrfs is not too far away.
zfs is a nice file system thougn I have not played with the non fuse implementation mentioned by jeffutter below.
I think your best plan is to send them to me and let me manmage them.