[EMAIL PROTECTED] wrote:

On 11/04/07, Toomas Aas <[EMAIL PROTECTED]> wrote:


It seems that gmirror devices get a different 'device number' on each boot
(each time the gmirror is created). Since the device number is stored in
GNU tar's snapshot file, it effectively means that after rebooting GNU tar
sees all files as having been changed since previous backup. This causes
huge incremental backups.

Is there a way to force a gmirror device to have a 'fixed' device number?

Not to sound too thick, but what do you mean
by "device number"?  Is this the Geom name:
or ID: field when you type:
gmirror list

First, I may have to take back some of what I said. I've rebooted the server twice in last two days, and the results are different.

First time, the server actually lost power accidentally (faulty UPS) and the gmirror volume was rebuilt. The device numbers had changed after that. Second time I rebooted the server myself (gmirror remained healthy), and device numbers remained unchanged.

Now to your question. By "device number" I mean the numbers 81, 83, 84 etc as displayed here:

# ls -l /dev/mirror/gm0*
crw-r-----  1 root  operator    0,  81 Apr 11 18:18 /dev/mirror/gm0
crw-r-----  1 root  operator    0,  83 Apr 11 18:18 /dev/mirror/gm0s1
crw-r-----  1 root  operator    0,  84 Apr 11 18:18 /dev/mirror/gm0s1a
crw-r-----  1 root  operator    0,  85 Apr 11 18:18 /dev/mirror/gm0s1b
crw-r-----  1 root  operator    0,  86 Apr 11 18:18 /dev/mirror/gm0s1c
crw-r-----  1 root  operator    0,  87 Apr 11 18:18 /dev/mirror/gm0s1d
crw-r-----  1 root  operator    0,  88 Apr 11 18:18 /dev/mirror/gm0s1e
crw-r-----  1 root  operator    0,  89 Apr 11 18:18 /dev/mirror/gm0s1f
crw-r-----  1 root  operator    0,  90 Apr 11 18:18 /dev/mirror/gm0s1g
crw-r-----  1 root  operator    0,  91 Apr 11 18:18 /dev/mirror/gm0s1h

When, for example, the / filesystem that resides on /dev/mirror/gm0s1a is backed up with GNU tar 1.15.1 and a snapshot file is created (using --listed-incremental), the snapshot file contains lines such as:

84 4165 ./etc/bluetooth
84 22 ./root/.cpan/sources/authors/id
84 12486 ./media
84 8323 ./boot
84 169 ./root/.cpan/build/Tree-R-0.05/blib/arch
84 4169 ./etc/mtree

The first number here is device number. If this number changes, GNU tar considers all files as having been changed next time it is run, and as a result the incremental backup backs up all files.

--
Toomas Aas
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to