Find the answer to your Linux question:
Results 1 to 4 of 4
Hi friendz... Below is the information regarding Block Devices in /proc/devices file in my linux pc Block devices: 1 ramdisk 259 blkext 7 loop 8 sd 9 md 11 sr ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2

    Help needed regarding BlockDevices in /proc/devices file


    Hi friendz...

    Below is the information regarding Block Devices in /proc/devices file in my linux pc

    Block devices:
    1 ramdisk
    259 blkext
    7 loop
    8 sd
    9 md
    11 sr
    65 sd
    66 sd
    67 sd
    68 sd
    69 sd
    70 sd
    71 sd
    128 sd
    129 sd
    130 sd
    131 sd
    132 sd
    133 sd
    134 sd
    135 sd
    253 device-mapper
    254 mdp


    In that info, first number is the major number and I came to know that the IDE HDD will be having the major number 3 and SCSI disks will be having the major numbers 8, 65, 66, 67, 68, 69, 70 and 71(From the Internet Information). If I consider the entry "8 sd" as the SCSI HDD because /proc/partitions file is having the partition info of thd SCSI HDD with major number 8, then wat about the remainign entries with name "sd". But physically I can see only one HDD in my CPU Cabinet. Please help me in this asap.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    What exactly are you trying to find out? Reading stuff in /proc is really only for system gurus who need to really peer into the guts of the running system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2
    I want to know the no of hard disks attached in the linux system.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Quote Originally Posted by karthik537 View Post
    I want to know the no of hard disks attached in the linux system.
    Try
    Code:
    ls /dev/sd? | wc -w
    for the number of hard drives. For more information about partitions (file systems and other block-special stuff, like swap) try
    Code:
    ls /dev/sd*
    and for raw data, look at /proc/diskstats.

    You can also (as root) execute the command "fdisk -l" to get a full listing of all the hard drives and partitions on the system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •