rsync of a reflink from OCFS2

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Wed Mar 14 12:48:53 UTC 2018


Hi,

i have some virtual machines running on logical volumes formatted with OCFS2. I'd like to snapshot the running guests
to backup them easily afterwards. The files of the guests are big (100 - 300GB), but the content changes only slowly.
So i thought that rsync would be a great benefit because it justs transfers the difference between the current file and
the one backuped one day before. I was wrong.
Some more information:
The file which hosts the disk from the vm is a dynamic one, that means it grows with the need from the guest os, up to a limit.
While creating the guest the file is not completely allocated, although "ls -la" shows already the maximum size.
The snapshot OCFS2 creates (in Oracle terms a reflink) has immediately after creation also the maximum size.
Indeed it allocates at the creation no disk space, and grows with changes in the source file (COW).

A reflink shares in the beginning the sectors with the source file.

Just to illustrate:

ha-idg-1:/cluster/guests/servers_alive # ls -ls
total 47409860
       0 drwxr-xr-x 2 root root         3896 Mar 13 13:25 lost+found
47409860 -rwxr-xr-x 1 root root 107374182400 Mar 14 10:57 sa.raw

ha-idg-1:/cluster/guests/servers_alive # reflink -v sa.raw sa.raw.snap
`sa.raw.snap' => `sa.raw'

ha-idg-1:/cluster/guests/servers_alive # ll
total 94820568
drwxr-xr-x 2 root root         3896 Mar 13 13:25 lost+found
-rwxr-xr-x 1 root root 107374182400 Mar 14 11:37 sa.raw
-rwxr-xr-x 1 root root 107374182400 Mar 14 11:37 sa.raw.snap

ha-idg-1:/cluster/guests/servers_alive # ls -li
total 94837904
558594 drwxr-xr-x 2 root root         3896 Mar 13 13:25 lost+found
558595 -rwxr-xr-x 1 root root 107374182400 Mar 14 13:36 sa.raw
558596 -rwxr-xr-x 1 root root 107374182400 Mar 14 11:37 sa.raw.snap

ha-idg-1:/cluster/guests/servers_alive # ls -ls
total 94837904
       0 drwxr-xr-x 2 root root         3896 Mar 13 13:25 lost+found
47427620 -rwxr-xr-x 1 root root 107374182400 Mar 14 13:36 sa.raw
47410284 -rwxr-xr-x 1 root root 107374182400 Mar 14 11:37 sa.raw.snap

ha-idg-1:/cluster/guests/servers_alive # df -h
Filesystem                Size  Used Avail Use% Mounted on
...
/dev/dm-9                 115G   49G   67G  42% /cluster/guests/servers_alive

You see that just 49GB are allocated, because the source has not grown to the maximum, and the reflink occupies no space
in the beginning. Maximum size is 100GB.


I would now expect a rsync from the snap would transfer just some megay bytes to the file from the day before.
But it doesn't:

ha-idg-1:/cluster/guests/servers_alive # time rsync -av --stats sa.raw.snap /mnt/idg-2/SysAdmin_AG_Wurst/backup/cluster/test
sending incremental file list
sa.raw.snap

Number of files: 1
Number of files transferred: 1
Total file size: 107374182400 bytes
Total transferred file size: 107374182400 bytes
Literal data: 107374182400 bytes
Matched data: 0 bytes
File list size: 29
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 107387289677
Total bytes received: 31

sent 107387289677 bytes  received 31 bytes  98385056.99 bytes/sec
total size is 107374182400  speedup is 1.00

real    18m10.879s
user    10m48.205s
sys     7m2.250s

It transfers the complete file. I'm i doing something wrong or is the desired behviour not possible ?


Bernd
-- 

Bernd Lentes 
Systemadministration 
Institut für Entwicklungsgenetik 
Gebäude 35.34 - Raum 208 
HelmholtzZentrum münchen 
[ mailto:bernd.lentes at helmholtz-muenchen.de | bernd.lentes at helmholtz-muenchen.de ] 
phone: +49 89 3187 1241 
fax: +49 89 3187 2294 
[ http://www.helmholtz-muenchen.de/idg | http://www.helmholtz-muenchen.de/idg ] 

no backup - no mercy
 

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Heinrich Bassler, Dr. Alfons Enhsen
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671





More information about the rsync mailing list