Technology news and Jobs
The Linux distillery
Adding a new hard disk to Linux, and why the Linux filesystem trounces Windows' butt
The Linux distillery
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 |
|
| by David M Williams | |
| Thursday, 02 October 2008 | |
|
Page 2 of 5 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.Featured Whitepaper
5 Best Practices for Smartphone Support
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 > |
|---|









