For those who plan on using LVM, I really recommend doing so on a RAID system, either hardware or software. Let me clarify!
The Drawback
* I would like plenty of storage for my TV!
* I don't wish to lose data if a disk crashes
* I need to add more disks later
The answers:
* Buy disks - a number of them
* Use RAID
* Use LVM
What's RAID?
RAID (Redundant Arrays of Cheap Disks) is about putting your data on 2 or extra disks in such a manner that if considered one of them crashes you do not lose your knowledge (it is as if all the pieces is saved twice - however cleverer!)
[comment: since I did this I've had one in every of my disks die and be RMA'd. No lost data OTOH, through the month that the drive was away I was 'unprotected' and had a minor learn error which caused a lot bother - but fortunately no information loss]
Observe that you should always have one spare matched drive in home for any RAID system, so if one fails, you can change it immediately.
You at all times lose some house - but we don't need to lose half (which is what occurs with simple 'mirroring') so we want to use raid5. That way we will buy four disks (or more!) and solely 'lose' 1 of them.
Why not simply use RAID?
If we run out of room then we have to allocate more. You possibly can't (presently) add disks to a RAID5 array.
That is now not true for users of the 2.6.17 and above linux kernel. To develop and present raid it's important to enable the following kernel choice:
System Drivers->Mutliple devices driver assist (RAID and LVM)->RAID support->RAID-4/RAID-5/RAID-6 mode-> Support including drives to raid-5 array (experimental)
Then to resize your raid5 simply run:
mdadm --add /dev/md1 /dev/sdb1
mdadm --develop /dev/md1 --raid-disks=four (new number of disks)
Observe: This causes the raid to restripe itself which took about 11 hours on my machine.
What's LVM?
What LVM lets you do is accumulate all your disks, raid arrays and what-not into an enormous 'box' of storage (known as a volume group). You'll be able to then make logical volumes from this space (- assume partitions). The great factor is that you can then simply add extra disks into the big collection and allocate space to existing logical volumes - ie grow them. Primarily you may have a partition that starts on one disk and ends on another (and should embody one other in the middle!)
Why not simply use LVM?
LVM only allows you to mirror or stripe - we wish resilience but mirroring is unhealthy - we need to buy twice as much storage as we would like (or more realistically - we solely end up using half of what we will afford ).
How many disks?
For raid5 you need a minimum of 3. You can go up from there, and every extra drive adds that much more space. You have to do a little pre-planning as it's not necessarily straightforward so as to add drives to the array after it is constructed. LVM also adds to this problem. There exists a utility raidreconf, however it's not well supported, and cannot operate while the drive is mounted. It is also doubtful you could resize the lvm bodily volume. As such to add drives, you'll have to copy the information off, and re-create the array. Maintain this in mind earlier than you retailer 600 Gb of data, after which might want to copy it off somewhere.
The Answer
Do both
* Create a raid5 array and add it to our 'box'.
* Then we make a filesystem from the area within the box.
* In the future we will add one other array and add that to the field too.
* Then we are able to 'grow' the filesystem.
Oh yes - that's one other thing. You could use a filesystem that can grow - so either Reiser or XFS. XFS cannot shrink so (despite having labored for SGI myself) I might use Reiser. (You want to set data=sorted as kernel parameter on pre 2.6.6 kernels so a power outage will not cause information loss). [Later edit: I changed my mind after having had just a few corruptions - I now have pure XFS]
Reiser shouldn't be a good choice for delusion, as it's good for small information, not very giant files. XFS is the most effective choice.