bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] tar1.22 complains when backing up a read-only filesystem


From: Andreas Dilger
Subject: Re: [Bug-tar] tar1.22 complains when backing up a read-only filesystem
Date: Wed, 09 Dec 2009 13:35:49 -0700

On 2009-12-09, at 06:55, Hill, Shannon wrote:
using tar1.22 built on Centos 5.4  x86_64

sim8/root@/tmp# /usr/local/bin/tar --version
tar (GNU tar) 1.22
...with these options:

time /usr/local/bin/tar         \
         --create               \
         --format=pax           \
         --blocking-factor 2048 \
         --totals               \
         --multi-volume         \
         --ignore-failed-read   \
         --exclude .snapshot    \
         --new-volume-script /root/bin/eot \
         --file ${TAPE}        .


yields this output (for every file), when . resides on a read-only file system:

/usr/local/bin/tar: ./tcaputo/views/eclipse/.metadata/.plugins/ org.eclipse.core.resources/.root/.indexes/properties.index: Cannot utime: Read-only file system


Ironically, it doesn't need to do utime (to set the atime backward) when the filesystem is mounted read-only. tar should probably check a "skip_utime" boolean (default = 0) before calling utime(), and if utime() fails with EROFS that flag is set...

On Linux at least there is also a "O_NOATIME" flag that prevents the atime from being changed in the first place, just to avoid the need to write (twice!) to the filesystem for every file touched (once to update atime, once to revert it). It appears that tar 1.22 has support for O_NOATIME, but it isn't being used for some reason.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]