From owner-freebsd-bugs Fri Mar 27 02:46:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA04090 for freebsd-bugs-outgoing; Fri, 27 Mar 1998 02:46:22 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA04076 for ; Fri, 27 Mar 1998 02:46:18 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id VAA16525; Fri, 27 Mar 1998 21:40:49 +1100 Date: Fri, 27 Mar 1998 21:40:49 +1100 From: Bruce Evans Message-Id: <199803271040.VAA16525@godzilla.zeta.org.au> To: bde@zeta.org.au, dwmalone@maths.tcd.ie Subject: Re: bin/6124: Getting md5 to reset access times. Cc: freebsd-bugs@hub.freebsd.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> No, it corrupts the more important inode change times. Mount read-only >> to avoid corruption of both the access time and the inode change times, >> not to mention the data. > >I presume mounting "noatime" while checksumming would have the same >effect and leave the filesystem more useable? Yes, I mentioned that in a reply to a reply to the PR, but then I decided that mounting read-only would be better (more secure and more portable). >The trickest bit of this procedure is preserving the current >mount options after mounting noatime. Is there a better way than: > >device=`df -n $directory | tail -1 | awk '{ print $1 }'` >mountpoint=`df -n $directory | tail -1 | awk '{ print $NF }'` >options=`mount -p | awk '{ if( $1 == "'$device'" ) print $4 }'` >... I think this is essentially the only way for a normal file systems. If nullfs worked then you could use it. `mount -t null -o ro' already sort of works. It prevents file creation and file modification but not file atime update. This is probably a bug. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message