xfs
[Top] [All Lists]

RE: Zero filled files

To: "'Steve Lord'" <lord@xxxxxxx>
Subject: RE: Zero filled files
From: Murthy Kambhampaty <murthy.kambhampaty@xxxxxxxxx>
Date: Mon, 12 May 2003 17:11:29 -0400
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
OK, here's another ;-). 

On a couple of machines (xfs-1.2, xfs-2.4.20 from not-quite-the-latest
patches), I back up the postgresql system files (the so-called PGDATA
directory) with: 
- xfsfreeze -f ...
- LVM snapshot create and mount
- rysnc ... ...
- LVM snapshot remove
(I do a preliminary rsync on $PGDATA to reduce the time the snapshot is
operational.)

This operation is run every 3 hours. Every few days to a week, lvcreate
hangs on xfs_check_frozen, and an xfs_freeze -u ... returns the server to
normal operations, though it ruins that backup.

I ran xfstest/068 (with dd-generated load) on one of the machines that
exhibits this behavior, and it completes 100 iters successfully. I am
attributing the success of xfstest/068 to the syncs after dd (it could be
other things), and on that basis I am wondering if the xfs sync rework will
"solve" this problem (particularly the periodic sync). Any chance it will?
(I have stuck "sync; sync; sync" at the top of the script, and am updating
our test server to today's CVS to see if my speculation is borne out.)

Also, has anyone been looking at this problem, or is it considered solved?
In the meanwhile, I have a loop that tests processes spawned by the script
for "D" state, with ps option wchan=xfs_check_frozen, every couple of
minutes, and if found, the loop kills the backup with xfs_freeze -u and
lvremove <snapshot dev> (thanks Greg Freemyer and the XFS developers for
xfstests/068).

Thanks,
        Murthy

PS: Some suggestions on killing sleeps in xfstest/068, or elsewhere (can I
take a pass on the joke regarding loss of sleep due to a certain commercial
operating system ... almost):

1.) create a unique numeric identifier MySleep (MySleep=$$ works for me,
mostly) and put it in the fractional part of the sleep time with "sleep
600.$MySleep" in the clean function. Then a "kill -INT $(ps ax | grep sleep
| grep $MySleep | awk 'BEGIN{FS=" "}{print $1}')" just before the line
"sleep "$DELAY_BETWEEN_ITERATIONS" kills off the "expired" sleep
2.) to kill all the sleeps spawned by a script, put 
MySession=$$
at the top of the script and
"for tPID in $(ps -eo pid,session,command | grep $MySession | grep sleep |
awk 'BEGIN{FS=" "}{print $1}'); do kill -INT $tPID; done"
where needed in the script.










-----Original Message-----
From: Steve Lord [mailto:lord@xxxxxxx]
Sent: Monday, May 12, 2003 15:22
To: kris buggenhout
Cc: linux-xfs@xxxxxxxxxxx
Subject: Re: Zero filled files


On Mon, 2003-05-12 at 13:45, kris buggenhout wrote:

> 
> great,
> 
> I havent followed xfs development lately, but is the problem where xfs
> umount would hang on shutdown related to this ?
> 
> because that is one of the things that still annoyed me about xfs ... no
> damage was done, but at times, the system would hang on umount..
> 
> kind regards, Kris

Yep, should be, same class of problem really.

Steve

-- 

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


<Prev in Thread] Current Thread [Next in Thread>