Tell hardrive size and type from command prompt

I have a remote linux box.  I would like to know how to tell the type of harddrive inside it and get the total harddrive space from the command prompt.  Just the commands I mean.  I dont know where to begin.
Who is Participating?
Darshan_JadavConnect With a Mentor Commented:
Switch to /proc/ide or scsi depending on the HDD u r using, and then to the device directory, in my system i have an Seagate IDE HDD, so /proc/ide/hda, here u have all the info u need for the HDD like driver, model, settings, cache etc. For checking the disk usage nuthin better then df -h  

[root@linuxserv hda]# pwd
[root@linuxserv hda]# ls
cache     driver    identify  model     smart_thresholds
capacity  geometry  media     settings  smart_values

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             4.8G  2.2G  2.3G  48% /
/dev/hda2              19G  1.9G   16G  11% /opt
none                  251M     0  250M   0% /dev/shm
/dev/hda5             3.8G  3.5G  187M  95% /usr
/dev/hda3             4.8G  1.8G  2.8G  38% /var

U can tweak yr IDE HDD paramters with HDPARM, or get the HDD parameters with

[root@linuxserv hda]# hdparm -i /dev/hda


 Model=ST340810A, FwRev=3.99, SerialNo=5EX13311
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=78165360
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: unknown setting
 Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6

JammyPakConnect With a Mentor Commented:
how about this:

type 'df -h'

this will output to you all of the partitions that are in use, and how big they are you'll see a line like this:
Filesystem   Size  Used  Avail Use% Mounted On  
/dev/sda1   10G    2G    8G    20%      /
/dev/sda2   10G    5G    5G    50%      /usr

 sda represents the first SCSI disk. If it's hda, then it's an IDE disk. hdb is the second IDE drive, sdb is the second SCSI drive, etc.

So - I have one SCSI drive called sda - it has 2 partitions of 10GB each...

If you want to see more details on each drive, then run 'fdisk /dev/hda' or 'parted /dev/hda' to see info on hda. There could be space on hda that's unpartitioned, and fdisk would help see that. Be careful, cause those commands can be used to delete your partitions...

> I have a remote linux box.
If you have Xwindow running, then you can type
to see the harddrive and the disk controller.
RebelnorthAuthor Commented:
I split the points between 1 and 3 because I couldnt do 2 because its only accessible through the command prompt.
Thanks :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.