1754313 Members
2792 Online
108813 Solutions
New Discussion юеВ

Redhat Linux

 
PVR
Valued Contributor

Redhat Linux

How to find out how many Hard disks are there in one Redhat Linux system ??
Thanks in advance !!
Don't give up. Try till success...
11 REPLIES 11
Alexander Chuzhoy
Honored Contributor

Re: Redhat Linux

If the RedHat is installed on server with raid that comes with managemenet software- you can use that software to see how many disks are there.

You can also try the hwbrowser utility-under hard drives -it shows all the drives it founds.


HGN
Honored Contributor

Re: Redhat Linux

Hi

If the RAID you are using is a hardware raid then you can find with the fdisk command. If there are multiple array you need to run fdisk on the other device to find free space. to find the device do a df -k and use the device name to find free space on the first array where the OS resides(fdisk /dev/dsk/c0t0d*) and do a p for print.
This will display the partion details. You can have only upto 15 partions on a single array.

Rgds

HGN
Steven E. Protter
Exalted Contributor

Re: Redhat Linux

Physical hard disks?

num=$(ll /dev/dsk | grep hd| wc -l)

That should give the number of disks but might include the cd-rom

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
xyko_1
Esteemed Contributor

Re: Redhat Linux

Hi PVR,

try dmesg | grep disk

The output will show you all disks that your system can see.

The disks may be a "real" disk or a virtual disk, i.e., a disk that is configured in a raid controller with two or more real disks.

Disk may also be a lun on a external storage like EMC Clarion.

Hope it helps.
Xyko
Ross Minkov
Esteemed Contributor

Re: Redhat Linux

cat /proc/partitions
fdisk -l
Marco Di Ianni
Frequent Advisor

Re: Redhat Linux

You can use also
#cfdisk

This is a semi-grafic tool for manage disks and partition.

If you use IDE disks you can type:

# dmesg | grep hd

or, for SCSI disks:

# dmesg | grep sd


By!
PVR
Valued Contributor

Re: Redhat Linux

Steven

ll /dev/dsk is not working. I can't see dsk folder is /dev

OS is redhat Enterprise Linux AS 3.
Don't give up. Try till success...
Dinesh_15
Frequent Advisor

Re: Redhat Linux

Hi

fdisk -l works

Rgds
Dinu
Johannes Krackowizer_1
Valued Contributor

Re: Redhat Linux

hi,

have a look at directory /proc/ide there are all ide-controllers and ide-drives that your kernel found. for example if there is a link called hda then you know there is a primary master ide-drive. look at /proc/ide/hda/driver to see if it is a disk, cdrom, ...

have a look at /proc/scsi/scsi to see all attached scsi devices that are found by the kernel.

best regards

johannes
"First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture." (Linus Torvalds)