Проверка системы: lsscsi Vs df

214
Romain Jouin

Runnning lssci Я получаю 3 диска информации:

$ 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  

Но когда я делаю df-H, у меня есть только данные о / 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 

Почему мы не видим / dev / sdb & / dev / sdc на выходе df? Как узнать использование диска / dev / sdb & / dev / sdc?

0

1 ответ на вопрос

0
Daniel B

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.