misc/76209: geom metadata/label ambiguity with last slices -
mirror, label etc
Cyril Vechera
cv-c at fluid.ru
Thu Jan 13 08:40:25 PST 2005
>Number: 76209
>Category: misc
>Synopsis: geom metadata/label ambiguity with last slices - mirror, label etc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 13 16:40:24 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Cyril Vechera
>Release: 5.3
>Organization:
Net Ltd.
>Environment:
FreeBSD 2.tester.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Jan 13 15:35:36 UTC 2005 root at tester.local:/usr/obj/usr/src/sys/GENERIC i386
>Description:
When geom based subsystems writes metadata on a hard disk there is possible ambiguity with nested slices. Becouse of geom label is stored in the last sector of provider's slice, it can beloing to either parent or child slice, for example to ad0 and ad0s4 and ad0s4h. This ambiguity can result a problems with geom system configuration, rebuilding and data loss.
>How-To-Repeat:
2# disklabel ad1s2
# /dev/ad1s2:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 480008592 0 unused 0 0 # "raw" part, don't edit
e: 134217728 0 unused 0 0
f: 345790864 134217728 unused 0 0
2# gmirror label block1 ad1s2e
2# gmirror label block2 ad1s2f
2# gmirror list
Geom name: block2
State: COMPLETE
Components: 1
Balance: split
Slice: 4096
Flags: NONE
SyncID: 1
ID: 4101347184
Providers:
1. Name: mirror/block2
Mediasize: 177044921856 (165G)
Sectorsize: 512
Mode: r0w0e4
Consumers:
1. Name: ad1
Mediasize: 250059350016 (233G)
Sectorsize: 512
Mode: r0w0e6
State: ACTIVE
Priority: 0
Flags: NONE
SyncID: 1
ID: 637386526
Geom name: block2.sync
Geom name: block1
State: COMPLETE
Components: 1
Balance: split
Slice: 4096
Flags: NONE
SyncID: 1
ID: 1722957731
Providers:
1. Name: mirror/block1
Mediasize: 68719476224 (64G)
Sectorsize: 512
Mode: r0w0e0
Consumers:
1. Name: mirror/block2s2e
Mediasize: 68719476736 (64G)
Sectorsize: 512
Mode: r0w0e0
State: ACTIVE
Priority: 0
Flags: NONE
SyncID: 1
ID: 4201844369
Geom name: block1.sync
We have mirror/block2 thinking that his consumer is ad1 instead of ad1s2f
>Fix:
Maybe we have to store a name of provider as a hint in a label written on a disk.
Quick workaround to avoid the problem is to shrink last nested slice on 1 sector to make different the last sector of a "geomed" slice and last sector of parent slice.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list