我正在设置一台运行Ubuntu Precise的服务器,并试图validationSSD TRIM是否正在工作。
fstrim失败:
~ sudo fstrim -v / fstrim: /: FITRIM ioctl failed: Operation not supported
所以我试图在hdparm中使用wiper.sh:
wiper-3.5 sudo ./wiper.sh --verbose --commit /dev/sda1 wiper.sh: Linux SATA SSD TRIM utility, version 3.5, by Mark Lord. rootdev=/dev/sda1 fsmode2: fsmode=read-write /: fstype=ext4 freesize = 169502088 KB, reserved = 1695020 KB Preparing for online TRIM of free space on /dev/sda1 (ext4 mounted read-write at /). This operation could silently destroy your data. Are you sure (y/N)? y Creating temporary file (167807068 KB).. Syncing disks.. Beginning TRIM operations.. get_trimlist=/sbin/hdparm --fibmap WIPER_TMPFILE.11503 /dev/sda: trimming 3211263 sectors from 64 ranges succeeded trimming 3571713 sectors from 64 ranges succeeded trimming 3915776 sectors from 64 ranges succeeded (...) trimming 3657913 sectors from 60 ranges succeeded Removing temporary file.. Syncing disks.. Done.
这似乎是工作,但我想知道如果是真的。 有没有什么情况下,当fstrim没有时,wiper.sh应该工作? 有什么方法可以检查TRIMing是否成功(除了信任wiper.sh-log)?
内核版本:Linux 3.2.0-31-generic#50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU / Linux
你正在运行什么版本的内核? FITRIM ioctl 是在2010年8月左右添加的 ,所以老的内核不会有这个function。 我的猜测是,wiper.sh使用了一种不同的修剪方法,这就是为什么没有ioctl就能工作。