Jürgen Keil
2007-Feb-05 12:07 UTC
[zfs-discuss] zfs legacy filesystem remounted rw: atime temporary off?
I have my /usr filesystem configured as a zfs filesystem, using a legacy mountpoint. I noticed that the system boots with atime updates temporarily turned off (and doesn''t record file accesses in the /usr filesystem): # df -h /usr Filesystem size used avail capacity Mounted on files/usr-b57 98G 2.1G 18G 11% /usr # zfs get atime files/usr-b57 NAME PROPERTY VALUE SOURCE files/usr-b57 atime off temporary That is, when a zfs legacy filesystem is mounted in read-only mode, and then remounted read/write, atime updates are off: # zfs create -o mountpoint=legacy files/foobar # mount -F zfs -o ro files/foobar /mnt # zfs get atime files/foobar NAME PROPERTY VALUE SOURCE files/foobar atime on default # mount -F zfs -o remount,rw files/foobar /mnt # zfs get atime files/foobar NAME PROPERTY VALUE SOURCE files/foobar atime off temporary Is this expected behaviour? It works if I remount with the "atime" option: # mount -F zfs -o remount,rw,atime files/foobar /mnt # zfs get atime files/foobar NAME PROPERTY VALUE SOURCE files/foobar atime on default This message posted from opensolaris.org
Chris Kirby
2007-Feb-05 17:00 UTC
[zfs-discuss] zfs legacy filesystem remounted rw: atime temporary off?
J?rgen Keil wrote:> I have my /usr filesystem configured as a zfs filesystem, > using a legacy mountpoint. I noticed that the system boots > with atime updates temporarily turned off (and doesn''t record > file accesses in the /usr filesystem): > > # df -h /usr > Filesystem size used avail capacity Mounted on > files/usr-b57 98G 2.1G 18G 11% /usr > > # zfs get atime files/usr-b57 > NAME PROPERTY VALUE SOURCE > files/usr-b57 atime off temporary > > > That is, when a zfs legacy filesystem is mounted in > read-only mode, and then remounted read/write, > atime updates are off: > > # zfs create -o mountpoint=legacy files/foobar > > # mount -F zfs -o ro files/foobar /mnt > > # zfs get atime files/foobar > NAME PROPERTY VALUE SOURCE > files/foobar atime on default > > # mount -F zfs -o remount,rw files/foobar /mnt > > # zfs get atime files/foobar > NAME PROPERTY VALUE SOURCE > files/foobar atime off temporary > > > Is this expected behaviour?I suspect it''s related to this bug: http://bugs.opensolaris.org/view_bug.do?bug_id=6498096 which is "zfs noatime broken with legacy mount". I started fixing this a while back but never finished it. Is this causing you pain, or is it just something you noticed? -Chris
Juergen Keil
2007-Feb-05 17:44 UTC
[zfs-discuss] zfs legacy filesystem remounted rw: atime temporary off?
> > That is, when a zfs legacy filesystem is mounted in > > read-only mode, and then remounted read/write, > > atime updates are off: > > > > # zfs create -o mountpoint=legacy files/foobar > > > > # mount -F zfs -o ro files/foobar /mnt > > > > # zfs get atime files/foobar > > NAME PROPERTY VALUE SOURCE > > files/foobar atime on default > > > > # mount -F zfs -o remount,rw files/foobar /mnt > > > > # zfs get atime files/foobar > > NAME PROPERTY VALUE SOURCE > > files/foobar atime off temporary > > > > > > Is this expected behaviour? > > > I suspect it''s related to this bug: > > http://bugs.opensolaris.org/view_bug.do?bug_id=6498096 > > which is "zfs noatime broken with legacy mount". > > I started fixing this a while back but never finished > it. Is this causing you pain, or is it just something > you noticed?I noticed that, and the atime remount behaviour doesn''t seem to be intuitive. I had a look at access time stamps to determine if a certain command from /usr has recently run, when I found out that - for the above reason - access time stamps didn''t work at all on my zfs /usr filesystem. Note that /usr is mounted early in read only mode by /lib/svc/method/fs-root, and later remounted read/write by /lib/svc/method/fs-usr I guess I could hack around the issue by adding an "atime" option to /etc/vfstab for the /usr mount, but I havn''t tried this yet.