use*_*507 19 linux filesystems kernel stat
我试图知道是否在文件系统上设置了 relatime 或 noatime,但我没有在 /etc/fstab 中找到信息,也没有在内核启动选项中找到。
首先,很明显我没有“正常”的行为:
root@antec:/tmp# rm -f test.txt; echo a>test.txt
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:30.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# date
Mon Aug 1 21:55:00 CEST 2011
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200 <--- atime not modified
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp#
Run Code Online (Sandbox Code Playgroud)
我有两个问题:
- noatime 或 relatime 是默认挂载选项,如果是,来自哪个内核版本?
- 有没有办法查看默认安装选项(即:我怎么知道为什么我没有“正常”的 atime 行为?)
很多问题,但我认为它们是相关的。如果您有更明确的标题,请随意编辑标题。
| 归档时间: |
|
| 查看次数: |
17846 次 |
| 最近记录: |