lshw
并df -h
查看我的计算机 (Ubuntu 14.04.4 LTS x64) 的一个分区的不同分区大小(5.5 TB 与 200 MiB)。我非常确定df -h
这是正确的,因为当我使用 创建分区时parted
,我将分区大小配置为 5.5 TB。 (这里是我用来创建分区的说明(如果重要的话)。另外,我尝试将超过 200 MiB 的文件放入该分区,效果很好。
怎么lshw
看起来和尺寸不一样df -h
?
下面是两个命令的输出(有问题的分区是/dev/sdb1
,安装到/crimea
)
username@server:/crimea$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 63G 12K 63G 1% /dev
tmpfs 13G 1.7M 13G 1% /run
/dev/dm-2 923G 54G 823G 7% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 63G 0 63G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/mapper/vg_system-openafs 2.9G 49M 2.7G 2% /var/cache/openafs
AFS 2.0T 0 2.0T 0% /afs
/dev/sdb1 5.5T 58M 5.2T 1% /crimea
username@server:/crimea$ sudo lshw -C volume
*-volume:0
description: LVM Physical Volume
vendor: Linux
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
serial: S3pp6Q-ZaaU-1Y3I-DE05-0cdd-xYZZ-4WvaKP
size: 953GiB
capabilities: multi lvm2
configuration: name=primary
*-volume:1
description: BIOS Boot partition
vendor: EFI
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
serial: ce1dec5b-2888-49fd-a770-1f159765f7c5
capacity: 1023KiB
capabilities: nofs
configuration: name=primary
*-volume
description: EXT4 volume
vendor: Linux
physical id: 1
bus info: scsi@1:0.0.0,1
logical name: /dev/sdb1
logical name: /crimea
version: 1.0
serial: c3552308-705b-99db-9855-8e456c96a1ce
size: 200MiB
capacity: 5589GiB
capabilities: journaled extended_attributes huge_files dir_nlink extents ext4 ext2 initialized
configuration: created=2016-06-24 14:56:55 filesystem=ext4 lastmountpoint=/boot modified=2016-07-01 17:15:55 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2016-07-01 17:07:19 name=primary state=mounted
答案1
但它们确实显示了相同的内容,就在lshw
输出中:capacity: 5589GiB
。现在,更好的问题是 lshwcapacity
和lshw 之间有什么区别size