![]() |
Setting up NAS with Slackware
Hi,
I have been running FreeNAS on my server but lately it has proven to be too limited by it's features and upgrades are a bit too complex in my taste. Well, I have 3x500GB and 1x2TB hdd and I need some advice how to RAID these devices. I used ZFS before with the 3x500GB drives in "RAIDZ" mode and last week I added 2TB drive but I didn't have a clue how to add it to the pool. I know (now) that I can only add same size of disks to the raid setup and with ZFS I think I could setup 3x500GB drives as one virtual device and 2TB drive in stripe mode as another virtual device and create one pool from those virtual devices and they would appear as one big device. Yeah, but that was before. Now I'm changing my system to Slackware because it offers the flexibility I'm looking for. And the question is, how should I setup my hard drives and which RAID modes so that I could have maximum capacity and one disk as a spare one, like in RAID5 mode. And which filesystem do you recommend? I'm planning to use -current, because it has newer mdadm than current stable and 13.2 is just around the corner (planning to stick with it when released). Let's say that I would like to add another 2TB drive in the future. How easy it is to set up for example to mirror (raid1) mode with the old 2TB drive? I'd like to thank everyone who replies to my questions in advance because I'm really lost with this case! |
|
Okay, let's forget that. There are 80gb hdds for about 5-10 euros so I can buy one of those instead.
How about other questions? |
You can only make a RAID setup when all the components are of equal size, that is if you want to use all the disk space available of course...
The space of each component of the RAID will be limited to the size of the smallest component. In other words, if you have 3 hard drives of different sizes (100GB, 120GB and 150GB) and decide to make a RAID0 out of them, you would end up with a logical drive of 300GB size, because only 100GB (the size of the smallest drive) would be used from the 120GB and 150GB drives. As long as you use same size drives, you can always increase the size of the RAID by adding more drives and "growing" the filesystem. In your case, you can make a RAID5 using the 3 drives of 500GB, which will give you 1TB (you loose a drive worth of space to parity data) or a RAID0 which will give you the full space of 1.5TB for data. Keep in mind that RAID0 has no fault tolerance: if any one of the 500GB drive fails you loose all the RAID0 data (the 1.5TB). I strongly suggest you read this first: http://en.wikipedia.org/wiki/RAID |
Get two additional 2TB drives and replace the existing 3x500GB drives on a RAID5. You can also keep the existing 3x500GB and run an additional RAID array (great the play around with mdadm with a spare RAID).
If the additional 2TB drives are not currently in your budget, then create a RAID5 array with the 3x500GB drives as your primary storage. Use the 2TB drive to store non-critical data. You can setup the 2TB drive as a degraded RAID1. Once you get additional 2TB drive(s) you can added it to the degraded RAID1 and migrate your data. You can also migrate to additional RAID levels when you add additional drives. As for file system, I personally am only familiar and comfortable to ext file systems. I am running ext4 on my RAID6 array with 9x1.5TB drives with a mixture of ext3/4 on the other independent drives. Ext4 is quite fast and stable. Plus the online expansion now works flawlessly. |
Quote:
Quote:
Quote:
Thanks tux_dude, your answer was just what I was looking for. Any other thoughts? |
Quote:
If you must have a single mount point /mnt/storage then the safest option is to add the 2TB drive to the 3x500GB RAID5. This will only expand the array by 500GB, meaning you will loose a whole 1.5TB from the 2TB drive (quite a waste). Here is how I would proceed for future expansion (especially if you have limit ports to connect the drives). 1. Create RAID5 with 3x500GB drives for 1GB usable space 2. Create degraded RAID1 with 1x2TB for 2TB usable space (non-redundant) 3. Mount RAID5 in 1 on /mnt/storage 4. Mount RAID1 in 2 on /mnt/storage/non-critical 5. Months later add another 2TB drive to RAID1 in 2. Usable space still at 2TB but now with redundancy 6. You can copy all the data from the 3x500GB RAID5 to the 2x2TB RAID1 which has double the storage. Assuming you have sufficient space for the critical and non-critical data 1TB. 7. At this point you can get rid of the RAID5 array (if you have limited drive ports) or re-purpose it for other storage. 8. Many more months later add another 2TB drive to the 2x2TB RAID1 and migrate to RAID5. This gives you 4TB of usable space. 9. Rinse and repeat as you purchase larger drives. |
You could always create an LVM on top of the 3x500GB Raid 5 array and 2x1TB Raid 1 array (initially degraded). Make each RAID array a PV (physical volume) and you can add both arrays to a VG (volume group) and create LVs (logical volumes) as you please. I have two RAID 1 arrays acting in an LVM on my server without trouble. I'm not sure if creating a degraded RAID 1 array would place extra burden on the disk, so that's something to look into, but that aside an LVM on top of two RAID arrays seems to be what you're looking for.
|
Quote:
Quote:
But to be clear I ask this question: Let's say that I have one 80GB drive for root, home and swap paritions. I have 3x500GB RAID5 array. I have 2x2TB RAID1 array (which I would later extend with another 2TB drive and migrate it to RAID5.) It's possible to create from those two RAID arrays one big LVM partition which would be 3TB of size? Thanks for your answers and happy new year! I'll look into this tomorrow. |
Quote:
|
Ok, I have created two RAID arrays /dev/md0 (3x500GB RAID5) and /dev/md1 (1x2TB RAID1).
Quote:
Quote:
Quote:
After that I just checked vgdisplay and I got: Quote:
Quote:
What now? |
Quote:
Code:
lvcreate -l 100%FREE -n Varasto varastoQuote:
|
Quote:
Quote:
|
| All times are GMT -5. The time now is 06:56 AM. |