Linux (Ubuntu) hard disks, partitions

[2008-08-24]
Depending on what drivers are used even IDE hard disks are displayed as sda, etc. Use the following to see the names of the hard disks

$ ls /dev|grep '[s|h]d[a-z]'

[from http://linuxplanet.com/linuxplanet/tutorials/6472/1/]

==========

There are lots of excellent complete articles by experts on the web – which can be found by doing a search with terms like – linux hard drive install partition

Basic steps

  1. ls /proc/ide => will show the available hard disks currently on the system
  2. connect the new hard disk
  3. its important to know where and how its connected (IDE primary, secondary, master, slave, etc), knowing this will let you know how to locate the file used to indicate your new hard disk
    • IDE disks
      • hda – Master on primary interface on 1st IDE controller
      • hdb – Slave on primary interface on 1st IDE controller
      • hdc – Master on secondar interface on 1st IDE controller
      • hdd -Slave on secondary interface on 1st IDE controller
  4. check if the drive is seen
  5. mount the partitions in the drive
  6. Access the contents

In Linux all devices are mounted as folders. Folders /dev and /proc are some of the key folders.

# ls /dev/hd* => will list the disk names in the system

# ls /proc/ide – can be used to see the list of ide drives available to the system

ide    ide exists on systems with the ide bus.  There  are  directories
	      for each ide channel and attached device.	 Files include:

cache		 buffer size in KB
	      capacity		 number of sectors
	      driver		 driver version
	      geometry		 physical and logical geometry
	      identify		 in hexidecimal
	      media		 media type
	      model		 manufacturer's model number
	      settings		 drive settings
	      smart_thresholds	 in hexidecimal
	      smart_values	 in hexidecimal

The  hdparm(8)  utility provides access to this information in a
	      friendly format.

tools, utilities:

  • fdisk  – partition management
    • #fdisk -l  /dev/hda    =>lists the partitions on first disk
  • df – file system disk free space
  • du – disk usage

One of the links that I used was http://www.linuxplanet.com/linuxplanet/tutorials/4232/1/

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s