Operating System - HP-UX
1836456 Members
2504 Online
110101 Solutions
New Discussion

OnlineJFS (snapshot) & rsync

 
Mark Di Donato
Advisor

OnlineJFS (snapshot) & rsync

Just wondering if it is at all possible to use rsync and/or rdist on a snapshot lv. I believe you can use tar and the likes of cpio to backup the snapshat but I would like to rsync or rdist the changes over to another server. Is it possible?

Thanks.

Mark.
7 REPLIES 7
Alzhy
Honored Contributor

Re: OnlineJFS (snapshot) & rsync

Yep.

Treat snapshot Filesystems as you would any other normal FS..

Hakuna Matata.
Alzhy
Honored Contributor

Re: OnlineJFS (snapshot) & rsync

Forgot to ask.. Are you using VxFs (aka Onlne JFS) snapshots? Are you using Ojfs 3.3 or 3.5?
Hakuna Matata.
Mark Di Donato
Advisor

Re: OnlineJFS (snapshot) & rsync

Thanks Nelson,

No, just planning for the future. I'll be upgrading in the future and planning to install OnlineJFS (including Hardware Mirroring). At the moment using MirrorDisk/UX and using a script to split the LV several times a day rsyncing to a remote server.

Thanks again Nelson.
Cesare Salvioni
Trusted Contributor

Re: OnlineJFS (snapshot) & rsync

Hi
nelson is right, with jfs snapshot you have a new fs which appear as the copy of the original one. It's faster, more then splitting/merge because there is nothing to resync at the end.
The snapshot can be used in reading exactly as the original fs, while it is, of course, not writable.

The only cons is that you need unused space in the vg to hold the copy. You should thing about 75% of the original fs, even if the total umount needed depends on how much time you will leave the snapshot active and how much activity on the original fs is done during this period.

Hope it helps
Steven E. Protter
Exalted Contributor

Re: OnlineJFS (snapshot) & rsync

My understanding:

Lets say you have a filesystem called /data
its /dev/vg01/lvol22

Online JFS snapshot redirects all block changes to a temporary logical volume which is created by the command. This allows you to back up /data, /dev/vg01/lvol22 with any utility you want.

When you shutdown the snapshot all changed blocks are written to the original filesystem/logical volume.

Example.

/data is an oracle database.

I shut down the database.
I create the snapshot.

I start the database and can get a cold backup of the database.

All writes go to the snapshot area and the database is available to users.

When i shut down the snapshot the blocks get written to the original logical volume.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alzhy
Honored Contributor

Re: OnlineJFS (snapshot) & rsync

Yep SEP,

Ain't JFS (aka VxFS) snapshots great? And storage checkpoints too?

It is supposed to be much improved and more robust under VxFS 3.5 (aka Online JFS 3.5).. We've been using it on Solaris systems for years...

Hakuna Matata.
Cesare Salvioni
Trusted Contributor

Re: OnlineJFS (snapshot) & rsync

Steven, just a little correction to your description.

The snapshot hold the original data, not the modified. This means that modifications are not redirected to the snapshot but done on the original fs. Before the change, the original block is copied to the snapshot.

This means that when you stop the snapshot there is no need to copy anything, just trash the original data: no wasting of time at all !!

Also, with most database, oracle for instance, you don't even need to stop the db, if it can, as oracle, sync all buffered data and make the files complete as the db was closed. All new transactions are kept only in memory, in few seconds you start the snapshot and immediately release the database to work normally.

At the end snapshot is really great, if you have enough space on disk to hold original blocks that will be modified during snapshot

hope it helps