System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

List all disk drives on system

Ratzie
Super Advisor

List all disk drives on system

How do I list all the disk drives on my system? Including the size.
I have LVM running, and I can find out how big the Volume group is, but what I would like is a quick list of all the drives, both internally, and in my disk array.
8 REPLIES
Ivan Ferreira
Honored Contributor

Re: List all disk drives on system

The command is:

fdisk -l
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ratzie
Super Advisor

Re: List all disk drives on system

No it does not list the drives
Disk /dev/sdd: 1199.9 GB, 1199906488320 bytes
255 heads, 63 sectors/track, 145880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 145880 1171781068+ 8e Linux LVM


I have numerous drives that make up a tera byte worth of space
Andrew Campagnola
Occasional Visitor

Re: List all disk drives on system

$ df -h
$ mount

Do you want to list mounted filesystems, or all hardware regardless of whether they are mounted or formatted?
Ratzie
Super Advisor

Re: List all disk drives on system

The hardware
Victor Semaska_3
Esteemed Contributor

Re: List all disk drives on system

Try command:

# sfdisk -s

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
sshakthi
Advisor

Re: List all disk drives on system

use this command


fdisk -l | grep Disk | nl
Heironimus
Honored Contributor

Re: List all disk drives on system

It looks to me like sdd is a volume on a disk array. You'll need to use whatever management software your array supplies to query the physical drives. All the OS will really see and work with is the volume the array presents.
Matti_Kurkela
Honored Contributor

Re: List all disk drives on system

/proc/partitions will display all detected disks and all filesystems on them, plus all LVM logical volumes, md RAID devices and the like.

To filter out the partitions... how about filtering out every line that ends with a number:

$ grep -v '[0-9]$'
major minor #blocks name

8 0 156290904 sda
8 16 160836480 sdb
8 32 500472 sdc
MK