Linux 命令学习笔记

硬盘操作命令

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 列出所有磁盘分区
lsblk
# 列出磁盘分区UUID
blkid
# 分区
fdisk /dev/sda
# 格式化
mkfs.ext4 -m 0.05 -T largefile /dev/sda1
# 自动挂载分区
nano /etc/fstab
# 挂载所有分区
mount -a
# 卸载分区
umount /dev/sda1
-T 参数 inode_size inode_ratio blocksize
默认 256 16k 4k
small 256 4k 1k
new 256 4k 4k
floppy 256 8k 1k
big 256 32k 4k
huge 256 64k 4k
largefile 256 1M 4k
largefile4 256 4M 4k
hurd 128 4k 4k

自己统计的参考数据

类别 inodes/GB (每GB使用的 inode 数量)
系统盘 10k-60k
数据盘 10-6k
使用 Hugo 构建
主题 StackJimmy 设计