[gpfsug-discuss] GPFS snapshot cron job

Jonathan Buzzard jonathan at buzzard.me.uk
Wed Feb 6 19:40:49 GMT 2013


On 06/02/13 18:38, Stuart Barkley wrote:
> I'm new on this list.  It looks like it can be useful for exchanging
> GPFS experiences.
>
> We have been running GPFS for a couple of years now on one cluster and
> are in process of bringing it up on a couple of other clusters.
>
> One thing we would like, but have not had time to do is automatic
> snapshots similar to what NetApp does.  For our purposes a cron job
> that ran every 4 hours that creates a new snapshot and removes older
> snapshots would be sufficient.  The slightly hard task is correctly
> removing the older snapshots.
>
> Does anyone have such a cron script they can share?
>

Find attached a Perl script that does just what you want with a range of 
configurable parameters. It is intended to create snapshots that work 
with the Samba VFS module shadow_copy2 so that you can have a previous 
versions facility on your Windows boxes.

Note it creates a "quiescent" lock that interacted with another script 
that was called to do a policy based tiering from fast disks to slow 
disks. That gets called based on a trigger for a percentage of the fast 
disk pool being full, and consequently can get called at any time. If 
the tiering is running then trying to take a snapshot at the same time 
will lead to race conditions and the file system will deadlock.

Note that if you are creating snapshots in the background then a whole 
range of GPFS commands if run at the moment the snapshot is being 
created or deleted will lead to deadlocks.

> Or did I miss something in GPFS that handles automatic snapshots?

Yeah what you missed is that it will randomly lock your file system up. 
So while the script I have attached is all singing and all dancing. It 
has never stayed in production for very long.

On a test file system that has little activity it runs for months 
without a hitch. When rolled out on busy file systems with in a few days 
we would a deadlock waiting for some file system quiescent state and 
everything would grind to a shuddering halt. Sometimes on creating the 
snapshot and sometimes on deleting them.

Unless there has been a radical change in GPFS in the last few months, 
you cannot realistically do what you want.

IBM's response was that you should not be taking snapshots or deleting 
old ones while the file system is "busy". Not that I would have thought 
the file system would have been that "busy" at 07:00 on a Saturday 
morning, but hey.


JAB.

-- 
Jonathan A. Buzzard                 Email: jonathan (at) buzzard.me.uk
Fife, United Kingdom.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadowcopy.pl
Type: application/x-perl
Size: 5787 bytes
Desc: not available
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20130206/831ad099/attachment-0003.bin>


More information about the gpfsug-discuss mailing list