Slack 13 on NAS - LVM/RAID Questions
I'm building a NAS, based on the Intel SS4200. There are 4 drive bays in the machine for use with SATA disks, two of which I plan on filling now, the other two which I plan on filling later. The box also includes an IDE connector to which I will connect an 8GB Disk on Module onto which I will install Slackware.
I wish to have all drives in the box show up as one contiguous volume. What partitioning/LVM/RAID configuration can I use which will allow me to:
1. Add a disk and transparently grow the available space of the volume?
2. Replace a disk with a larger disk and transparently grow the available space of the volume?
3. Lose a disk to hardware failure and replace it with a new one with no data loss?
If I use RAID 5, I'm pretty certain I can get numbers 1 and 3 above, but I'm not sure about number 2. The downside is that I'd have to start with 3 disks in the machine, and I'm unsure if adding a 4th disk whose size is larger than each of the 3 starting disks would lead to wasted space. For instance, if I start with three 1TB drives in RAID 5, and then add a 2TB 4th drive, would my available size go from 2TB to 3TB? Or from 2TB to 3.xTB? Is it important in a RAID 5 setup to have all disks the same size?
With LVM, I can certainly get number 1 above, but what about 2 and 3? I know you can use LVM to present many disks or partitions as one contiguous volume, but if I have two 1TB drives in one volume, and only have 300GB of data, then would the second drive remain empty until I broke the 1TB barrier? In this case, it's wasted space from the get go.
I suppose another option would be to start with RAID 1 until I can afford a third disk. When adding the new disk, could I switch to RAID 5 without data loss?
I'm planning on maintaining a full mirror of the NAS on some USB disks as a backup, so if configuration changes to the NAS require wiping the disks and restoring from backup, it's not a total loss. However, it certainly makes me nervous to be in a state where only one copy of the data exists, so I'd rather find a solution where I can add and upgrade disks in the NAS without relying on the backup copies.
Any insight/experience you can share would be greatly appreciated!
I had a similar situation with my servermachine; went for the RAID1 with LVM on top solution:
Started out with 2 x 1 TB disks which I joined in a RAID1 array.
Then I put an LVM array on top.
Later when I bought two additional 1 TB disks, I joined those two in another RAID1 array, and added that array in the existing LVM.
As for your questions in your third paragraf, IIRC all disks in an RAID5 array has to be the same size.
Adding a forth disk in a three disk RAID5 array of 1TB disks, would increes size from ~2TB to 3TB.
It may be possible to partition a 2TB disk into 2 x 1TB parts. (guess it depends on total usable space on the 2TB disk...), and add both partitions to the RAID5 array, essensialy adding two TB disks to the array and the size from ~2TB too 4TB, but I personaly don't like the idea of mixing disks and partitions in an array.
|All times are GMT -5. The time now is 02:15 PM.|