Other gmirror - Which disk contains the most recent data?

honk

Active Member

Thanks: 13
Messages: 140

#1
I have two hard disks in my drawer which still contain data. I haven't used them for some years now. Initially they were running in a RAID-1 setup using gmirror. Before I put them in the drawer I used one of those disks individually for some time (i.e. without having the second one running in the gmirror, or lets say I was using the gmirror intentionally as DEGRADED).

Question(s): How can I find out which disk contains the most recent data (without looking at the data itself)? Is there anything within the gmirror metadata to distinguish? How will gmirror act in case I attach both disks to a system again? The manpage writes something about a priority value which depends on the order the disks were labeled during initialization.
 
OP
OP
H

honk

Active Member

Thanks: 13
Messages: 140

#3
Thanks, Bobi! Sounds like a reasonable approach.

But I still ask myself, how gmirror acts in this case. I mean it's the same situation when powering on a computer and having two disks (or consumers) mirrored which _should_ contain the same data (= rebuild not necessary). But what if the data is not identically? A rebuild would be necessary in this case, but _which_ disk holds the truth?
 

Bobi B.

Well-Known Member

Thanks: 106
Messages: 253

#4
I've also wondered this myself: what is the right approach if, during scrub, data on both disk differs. Same goes for RAID-5. Same goes for commercial (including hardware) solutions. I would love to know more about how "big" players handle such cases.

In the end I decided to spare myself all the trouble and to use ZFS for the data I care about =)
 

Phishfry

Son of Beastie

Thanks: 1,049
Messages: 3,092

#5
gmirror(8)
label Create a mirror. The order of components is important,
because a component's priority is based on its position
(starting from 0 to 255). The component with the biggest
priority is used by the prefer balance algorithm and is also
used as a master component when resynchronization is needed,
 

Phishfry

Son of Beastie

Thanks: 1,049
Messages: 3,092

#6
It looks to me like the gmirror configure option lets you set the priority:
-p priority Specifies priority for the given component prov.

gmirror list shows the gmirror consumers priority

gmirror does not seem to show which consumer has newer files.
 

kpa

Beastie's Twin

Thanks: 1,791
Messages: 6,303

#7
It won't be able to tell which one has newer files because it doesn't deal with files in the first place, it's only concerned about raw disk blocks and whether both providers have identical content on block-by-block basis or not.
 
Top