创建1个 100k磁盘
第一个里程碑-创建100k点文件
[root@handsome-man ~]# dd if=/dev/zero of=/tmp/100k bs=1k count=100
dd: 打开"/tmp/100k" 失败: 是一个目录
[root@handsome-man ~]# ls -l /tmp/100k
总用量 0
[root@handsome-man ~]# rm -rf /tmp/100k
[root@handsome-man ~]# dd if=/dev/zero of=/tmp/100k bs=1k count=100
记录了100+0 的读入
记录了100+0 的写出
102400字节(102 kB)已复制,0.000689225 秒,149 MB/秒
[root@handsome-man ~]# ll -h /tmp/100k
-rw-r--r-- 1 root root 100K 5月 13 15:59 /tmp/100k
[root@handsome-man ~]# #第二个里程碑-格式化
[root@handsome-man ~]# file /tmp/100k
/tmp/100k: data
[root@handsome-man ~]# mkfs.ext4 /tmp/100k
mke2fs 1.42.9 (28-Dec-2013)
/tmp/100k is not a block special device.
无论如何也要继续? (y,n) y
文件系统小得无法记录日志
Discarding device blocks: 完成
文件系统标签=
OS type: Linux
块大小=1024 (log=0)
分块大小=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
16 inodes, 100 blocks
5 blocks (5.00%) reserved for the super user
第一个数据块=1
1 block group
8192 blocks per group, 8192 fragments per group
16 inodes per group
Allocating group tables: 完成
正在写入inode表: 完成
Writing superblocks and filesystem accounting information: 完成
[root@handsome-man ~]# /tmp/100k is not a block special device./tmp/100k is not a block special device.
-bash: /tmp/100k: 权限不够
[root@handsome-man ~]# file /tmp/100k
/tmp/100k: Linux rev 1.0 ext2 filesystem data, UUID=5064e05e-c074-41dc-a88d-ee1c1cc449d5 (extents) (64bit) (huge files)
[root@handsome-man ~]# #第3个里程碑-挂载
[root@handsome-man ~]# mkdir -p /app/log
[root@handsome-man ~]# mount /tmp/100k /app/log/
[root@handsome-man ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 19G 2.5G 17G 13% /
devtmpfs 476M 0 476M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 7.7M 479M 2% /run
tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/sda1 197M 133M 64M 68% /boot
tmpfs 98M 0 98M 0% /run/user/0
/dev/loop0 93K 14K 72K 17% /app/log
[root@handsome-man ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 19G 2.5G 17G 13% /
devtmpfs 476M 0 476M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 7.7M 479M 2% /run
tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/sda1 197M 133M 64M 68% /boot
tmpfs 98M 0 98M 0% /run/user/0
/dev/loop0 93K 14K 72K 17% /app/log
模拟inode满了
[root@handsome-man /app/log]# cd /app/log/
[root@handsome-man /ap