Operating System - Linux
1829712 Members
2032 Online
109992 Solutions
New Discussion

Re: on linux AS3, how do I know the list of disks?

 
Hanry Zhou
Super Advisor

on linux AS3, how do I know the list of disks?

I am HPux admin, but new to Linux,

What is the command to list all disks on the server?
none
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: on linux AS3, how do I know the list of disks?

You can use fdisk -l. This will lists all disk on your server and the partitions that they heve.

You can see /dev/sd is a for the first SCSI disk detected, b for the second and so on. is the partition number. If you want to modify the partition table, use fdisk with the disk name:

fdisk /dev/sd

You can also have IDE devices, that would be /dev/hda, /dev/hdb, /dev/hdc, /dev/hdd for primary master, slave, secondary master, slave.

You may also need to know lvm commands, like pvscan, pvdisplay, vgdislplay and lvdisplay. This may be fammiliar to you.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Silver_1
Regular Advisor

Re: on linux AS3, how do I know the list of disks?

You may see them using this command.

cat /proc/partitions

regards.
Stuart Browne
Honored Contributor

Re: on linux AS3, how do I know the list of disks?

/proc/partitions is the more reliable list. However, if the disks are in a hardware RAID array, this won't show the individual disks, just the container presented to the OS.

If you need to see that next level deeper, you'll need to tell us what RAID controller is in the machine so we can tell you which tool you need to use.

The 'lspci' command should give you an idea as to what controller is in use.
One long-haired git at your service...
Vipulinux
Respected Contributor

Re: on linux AS3, how do I know the list of disks?

Hi

The command will vary if u are using LVM or simple disk partitioning.
Usually you will get the required info by giving the foll commands:

fdisk
pvdisplay

Cheers
Asif Sharif
Honored Contributor

Re: on linux AS3, how do I know the list of disks?

Hi Zhou,

Use the command "cat /proc/partitions" to see full list of disks and partitions that your system can see.

Regards,
Asif Sharif
Regards,
Asif Sharif