我有一台联想笔记本电脑,配有 M.2 NGFF 插槽。我装了一张 128 GB 的 ZTC SSD 卡。这张卡是 GPT 分区,被视为 sdb。我将其用于 EXT4 格式的 /。然后我全新安装了 Ubuntu 14.04LTS,/tmp 和 /var 位于硬盘 (sda) 上。
我很惊讶地发现 / 没有在启用修剪的情况下挂载。因此,我在 fstab mount 命令中添加了丢弃选项。但是,每次我进行手动修剪时,它仍然会得到许多要修剪的块。我还修改了 Cron 修剪脚本,以便检查 ZTC 卡,但无济于事。
问题:我做错了什么?我该如何解决?
root@eroot@espineux:~# fstrim -v /
/: 75904069632 bytes were trimmed
root@espineux:~# mount
/dev/sdb2 on / type ext4 (rw,errors=remount-ro,discard)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /sys/firmware/efi/efivars type efivarfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
....
/dev/sda7 on /tmp type ext4 (rw,errors=remount-ro)
/dev/sda4 on /home type ext4 (rw,errors=remount-ro)
/dev/sda8 on /var type ext4 (rw,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat (rw)
.......
root@espineux:~# tune2fs -l /dev/sdb2
tune2fs 1.42.9 (4-Feb-2014)
Filesystem volume name: <none>
Last mounted on: /
Filesystem UUID: 7b2f1cb8-9a3a-4586-9a04-a4c4127f50aa
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 5234688
Block count: 20915968
Reserved block count: 1045798
Free blocks: 18531778
Free inodes: 4802146
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1019
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Sun Jul 5 11:13:57 2015
Last mount time: Thu Oct 29 03:35:43 2015
Last write time: Thu Oct 29 03:35:43 2015
Mount count: 152
Maximum mount count: -1
Last checked: Sun Jul 5 11:13:57 2015
Check interval: 0 (<none>)
Lifetime writes: 1189 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: fba5200e-8dcd-4a78-b50f-8e5ecb516cf5
Journal backup: inode blocks