System check : lsscsi Vs df

0

Runnning lssci I get 3 disks infos :

$ lsscsi
[0:0:0:0]    disk    ATA      Samsung SSD 850  EMT0  /dev/sda 
[2:0:0:0]    disk    ATA      VB0250EAVER      HPG0  /dev/sdb 
[3:0:0:0]    disk    ATA      VB0250EAVER      HPG0  /dev/sdc 

But when I do df-H I only have data about /dev/sda :

$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       467G  147G  297G  34% /
none            4,1k     0  4,1k   0% /sys/fs/cgroup
udev             13G  4,1k   13G   1% /dev
tmpfs           2,6G  1,4M  2,6G   1% /run
none            5,3M     0  5,3M   0% /run/lock
none             13G  930k   13G   1% /run/shm
none            105M   46k  105M   1% /run/user

Why don't we see /dev/sdb & /dev/sdc on the df output ? How can I know the disk usage of /dev/sdb & /dev/sdc ?

Romain Jouin

Posted 2015-11-01T12:03:05.440

Reputation: 229

Answers

0

df (disk free) only shows information about filesystems that are currently mounted. Theoretically, there could also be sda2 and sda3, which are not listed.

df does not directly interface with filesystems. It relies on the kernel to provide this information. Because filesystem statistics are relatively irrelevant for unused partitions, there’s most likely no interface to query them.

The GParted GUI can show you the information you want, because it has its own filesystem drivers. The parted command (essentially the text-only version of GParted) does not display this information, though.

Or you could simply mount the partitions you want the info of.

Daniel B

Posted 2015-11-01T12:03:05.440

Reputation: 40 502