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
There are a lot of things under /dev. You’ll find tty devices (physical terminals), pty devices (pseudo terminals, for remote logins), modems, all sorts of things.

The hard drives are the devices whose names begin with either hd or sd. A hd device is an IDE hard drive, and an sd device is something more modern like a SATA or SCSI drive.

Following the letters hd or sd there will be another letter (or two in some distributions) which is assigned in a way reflective of how the hard drive has been connected. For IDE drives the letter a represents the master disk on the primary interface of the first IDE controller and b is the slave disk. Letters c and d represent the master and slave disks on the secondary interface of the first IDE controller and on and on. So, if you connected a new hard drive as the master disk on the secondary IDE interface it would be identified as /dev/hdc (with a number following, as below.)

For the non-IDE disks the letter is assigned in an incremental fashion as disks are added, much like how Windows assigns increasing disk letters to new disks.

Finally, a number ends the device name. This number represents the partition number on the hard disk. So, the first partition on the IDE disk used above would be /dev/hdc1. This is true even if you only have one partition.

Call up a terminal session on your computer and enter the command df –k. This lists your connected drives as well as other information about them, such as how much of the disk is unused. Most of you will see /dev/sda1 and no other disk names, which most typically indicates your computer or laptop has a single SATA disk with a single usable partition.

There will be partitions you cannot directly use; one of these is marked as tmpfs and is the part of disk Linux reserves for virtual memory when it has to swap running processes to disk. Windows uses a file called pagefile.sys for its virtual memory whereas Linux uses a dedicated disk partition.

Let’s look at three specific situations and then how Linux has it all over Windows as far as disk management is concerned.

First, you may be using a hard disk which has been previously used and has already been formatted. Perhaps it was used in a Windows computer. Secondly, we’ll work with a completely unused, unpartitioned, unformatted disk. Thirdly, we’ll plug in an external USB hard drive.

CONTINUED







 
< 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