df -hT
-T, --print-type print file system type
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
一、看分区的格式:
root@192.168.137.159:~# df -hT
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
ext4 29G 23G 4.0G 86% /
tmpfs tmpfs 250M 0 250M 0% /dev/shm
/dev/sda1 ext4 485M 38M 422M 9% /boot
.host:/ vmhgfs 100G 94G 5.6G 95% /mnt/hgfs
.host:/ vmhgfs 100G 94G 5.6G 95% /mnt/hgfs
二、加上-H显示用了多少:
[root@ZWCLC6X-7198 /]# df -hTH
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/sda3 ext4 15G 3.2G 11G 24% /
tmpfs tmpfs 3.1G 0 3.1G 0% /dev/shm
/dev/sda1 ext4 529M 45M 457M 9% /boot
/dev/sdb ext4 101G 197M 96G 1% /data
三、ext4减少inode,mkfs.ext4格式化大容量磁盘:
减小inode总数,可以减小inode占用的磁盘空间,减少磁盘浪费。
例如:指定1m空间分配一个inode来格式化2TB磁盘
mkfs.ext4 -i 1048576 -n /dev/sdc #1024*1024=1048576
mkfs.ext4有参数-i,可以指定:多大磁盘空间分配一个inode
man mkfs.ext4
-i bytes-per-inode
Specify the bytes/inode ratio.
mke2fs creates an inode for every bytes-per-inode bytes of space on the disk.
The larger the bytes-per-inode ratio, the fewer inodes will be created.
This value generally shouldn’t be smaller than the blocksize of the filesystem,
since in that case more inodes would be made than can ever be used.
Be warned that it is not possible to expand
the number of inodes on a filesystem after it is created,
so be careful deciding the correct value for this parameter.
From:https://www.cnblogs.com/micmouse521/p/8064568.html
-T, --print-type print file system type
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
一、看分区的格式:
root@192.168.137.159:~# df -hT
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
ext4 29G 23G 4.0G 86% /
tmpfs tmpfs 250M 0 250M 0% /dev/shm
/dev/sda1 ext4 485M 38M 422M 9% /boot
.host:/ vmhgfs 100G 94G 5.6G 95% /mnt/hgfs
.host:/ vmhgfs 100G 94G 5.6G 95% /mnt/hgfs
二、加上-H显示用了多少:
[root@ZWCLC6X-7198 /]# df -hTH
文件系统 类型 容量 已用 可用 已用%% 挂载点
/dev/sda3 ext4 15G 3.2G 11G 24% /
tmpfs tmpfs 3.1G 0 3.1G 0% /dev/shm
/dev/sda1 ext4 529M 45M 457M 9% /boot
/dev/sdb ext4 101G 197M 96G 1% /data
三、ext4减少inode,mkfs.ext4格式化大容量磁盘:
减小inode总数,可以减小inode占用的磁盘空间,减少磁盘浪费。
例如:指定1m空间分配一个inode来格式化2TB磁盘
mkfs.ext4 -i 1048576 -n /dev/sdc #1024*1024=1048576
mkfs.ext4有参数-i,可以指定:多大磁盘空间分配一个inode
man mkfs.ext4
-i bytes-per-inode
Specify the bytes/inode ratio.
mke2fs creates an inode for every bytes-per-inode bytes of space on the disk.
The larger the bytes-per-inode ratio, the fewer inodes will be created.
This value generally shouldn’t be smaller than the blocksize of the filesystem,
since in that case more inodes would be made than can ever be used.
Be warned that it is not possible to expand
the number of inodes on a filesystem after it is created,
so be careful deciding the correct value for this parameter.
From:https://www.cnblogs.com/micmouse521/p/8064568.html
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/6248/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2019-10-7 20:41
评论列表