Follow the Australian Telecommunications scene NEWSLETTER- FREE TRIAL
The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow Adding a new hard disk to Linux, and why the Linux filesystem trounces Windows' butt
Adding a new hard disk to Linux, and why the Linux filesystem trounces Windows' butt E-mail
by David M Williams   
Thursday, 02 October 2008
One distinctive of Linux is that its filesystem is completely hierarchical. Everything spans down from the top-level root directory called “/”.

As you’ve seen from the output of df –k and from your own mount commands you attach hard drives at various points in the file system. It does not matter if /home is on a completely separate disk to /bin. Linux will continue to operate completely fine. All it cares about is that /home and /bin are somewhere and that they are mounted and have sufficient disk space.

Here’s where Linux lets you really administer your system how you want, and respond to changing requirements.

Imagine your personal directory under /home is filling up. You need more disk space. You buy a 500GB hard drive and install it.

For the moment, you can mount it anywhere you like – such as our /mnt/MyDisk example. Copy everything from /home/david (or whatever) over to /mnt/MyDisk. Be careful to preserve all the security settings like owner, group and access permissions. Be careful too to copy all the ordinarily hidden files – the ones whose names begin with “.” Like .bashrc.

Once you have done this, and are absolutely sure you didn’t miss anything, you can remove all the files and folders in the original directory. You’ve now freed up space on the original drive.
Now for the magic. Unmount the hard drive and then remount it, but this time specify /home/david as the mount point. Suddenly all your files and settings are back but with so much disk space to spare.

Run df –k and you will see the new hard drive mounted as your home area but with 500GB of space available, in this example. Edit /etc/fstab so the hard drive always mounts on startup.

That’s a truly wonderful feature of Linux. You can move your folders around from drive to drive as your system expands, keeping ahead of storage demands. Provided you keep the overall file hierarchy intact you won’t suffer any losses or problems and Linux really won’t care over how many disks you spread yourself.

There’s no need to muck around with distinct drive letters, and uninstall or reinstall applications just to move them from one disk to another.

So that’s disks! What’s something you would like to know to do in Linux? What bugs you about the operating system? Let’s make this a month of “I didn’t know you could do that in Linux.

Powered By Joomla Tags

Please enable JavaScript in your browser to post your comment!



 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
694,279
Subscribers 15,210
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff

- Advertisement -

Featured Whitepapers

Follow iTWire on Twitter

About iTWire

iTWire is all about technology news, information, jobs and community for the IT and telecommunications industry professional. Subscribe to our free ICT daily newsletter