PDA

View Full Version : [all variants] How Linux makes larger 'file systems' using /etc/fstab



Hedgehog1
March 13th, 2011, 02:11 AM
From the desk of The Hedge


I have noticed the (understandable) tendency of new Linux users to think about disk drives in the 'Windows way'; their first thought is to exchange a new drive for an existing one, rather than combine both drives for a larger 'file system'.

There are times when replacing one drive with another is indeed the correct action (aging drive, failing drive, slow drive, etc). But in other cases it may be preferable to use the inherent strength of the fstab (file system table) file to combine physical drives to become a larger 'file system'.

Lets first look at a user with an 8 gig netbook who is running out of space. Rather than replace the 8 gig flash drive with a 32 gig device, the old and new devices can be combined to yield a 40 gig 'file system':

http://img863.imageshack.us/img863/6315/netbooksd.png

This same principle can be applied to a user with a computer using an 80 gig hard drive, and who 'adds' a new 320 gig drive instead of replacing the 80 gig drive with the 320 gig drive:

http://img840.imageshack.us/img840/4129/laptophd.png

This same principle can also be applied to building a massive 'file system' without the requirement of using RAID:

http://img853.imageshack.us/img853/6228/serverhd.png

The above 12 terabyte system can be built using a basic motherboard with four open SATA ports and four 3tb hard drives. No server based equipment is needed; no raid hardware or software is required. This is just something that Linux does (and does very well).

I hope these examples give you feel for the power of Linux 'file system' design. Next time someone asks 'what is the big deal about the fstab file, anyway?', you can grin knowingly and say: "I will tell you when you are older."


The Hedge

:KS

mörgæs
March 13th, 2011, 11:16 PM
Thanks. It sounds interesting, but how do I do this?

A step-by-step list of commands would be good to have.

Hedgehog1
March 14th, 2011, 01:34 AM
A step-by-step list of commands would be good to have.

mörgæs,

Oh, like making the pretty pictures wasn't hard enough? :D

Are you thinking a step-by-step of all three? Oddly enough, the 12tb one is the easiest (no moving of '/home' on that one). The netbook example is from a real post a few days ago, where I found I wished I had a picture to help explain (although the poster got it working without a pretty picture).

I had been thinking of showing how individual hard drives can instead be separate banks of RAID arrays ('/payroll' array, '/payables' array, '/receivables' array, '/inventory' array) that can be mounted and unmounted for servicing without shutting down the main Linux box. But I think that is more than the 'typical user' needs to know. But it is cool.

OK, I will add the step-by-step lists after the introduction area. Thanks for the feedback.

The Hedge

:KS