Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 09:02:31 -0500
From:      Brent Hostetler <brenthostetler@gmail.com>
To:        freebsd-geom@freebsd.org
Subject:   Setup problem with multiple mirrored devices
Message-ID:  <aadbc3580601270602s39a147b4x123dea6332067d27@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I have been trying to setup a series of mirrors of disk partitions
with mixed results. I have multiple ide disks on multiple ide
controllers. Each controller has only a master drive no slaves.

Ultimately I want to end up with something like:
gmroota -> ad0s1, ad0s2     [ mirrored ]
 M1         -> ad0s2, ad2s2     [ mirrored ]
 M2         -> ad4s1, ad6s1     [ mirrored ]
 M3         -> ad8s1, ad10s1   [ mirrored ]
 M4         -> ad12s1, ad14s1 [ mirrored ]
gmdata  -> M1, M2, M3, M4  [ concat ]

ad0 and ad2 same size disks sliced into two parts. ad0s1 and ad2s1 are
mirrored as gmroot. gmroot is bsdlabel partitioned: /, swap, var, tmp,
usr with the last partion 1 sector smaller then size of partition c: .
System boots fine.

ad0s2 and ad2s2 are bsdlabeled as one partition a: that is 1 sector
smaller then c:.
   bsdlabel -w ad0s2
   bsdlabel -w ad2s2
   bsdlabel -e ad0s2
   bsdlabel -e ad2s2
   gmirror label -v -b round-robin M1 ad0s2
   gmirror configure -a M1
   gmirror insert M1 ad2s2

This appears to work fine.

So then I move on to ad4 and ad6.
   fdisk -I ad4
   fdisk -I ad6
   bsdlabel -w ad4s1
   bsdlabel -w ad6s1
   bsdlabel -e ad6s1
   bsdlabel -e ad4s1
   gmirror label -v -b round-robin M2 ad4s1
   gmirror configure -a M2
   gmirror insert M2 ad6s1

gmirror picks up ad6 as the provider instead of ad6s1.

I have also tried

  fdisk  -I ad4; fdisk -I ad6
   gmirror label -v -b round-robin M2 ad4s1
   bsdlabel -w /dev/mirror/M2
   bsdlabel -e /dev/mirror/M2    # make a: on sector smaller then c:
   gmirror configure -a M2
   gmirror insert M2 ad6s1

Same results. ad6 is picked up a provider instead of ad6s1. What am I doing=
?

Seems like a meta-data problem. If I hardcode providers name with -h it wor=
ks
as expected.

Please enlighten me to my errorrs!

Brent

relevant output:

files# gmirror status
         Name    Status  Components
mirror/gmroot  COMPLETE  ad0s1
                         ad2s1
    mirror/M1  COMPLETE  ad0s2
                         ad2s2
    mirror/M2  DEGRADED  ad4s1
                         ad6 (19%)

files# diskinfo ad4
ad4     512     160041885696    312581808       310101  16      63
files# diskinfo ad6
ad6     512     160041885696    312581808       310101  16      63

files# dmesg | grep ^ad
ad0: 114473MB <WDC WD1200JB-00EVA0 15.05R15> at ata0-master UDMA100
ad2: 114473MB <WDC WD1200JB-00EVA0 15.05R15> at ata1-master UDMA100
ad4: 152627MB <WDC WD1600JB-00GVA0 08.02D08> at ata2-master UDMA100
ad6: 152627MB <Seagate ST3160023A 8.01> at ata3-master UDMA100
files#

files# gmirror list
Geom name: gmroot
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 2015974814
Providers:
1. Name: mirror/gmroot
   Mediasize: 26843152384 (25G)
   Sectorsize: 512
   Mode: r5w5e5
Consumers:
1. Name: ad0s1
   Mediasize: 26843152896 (25G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 3541228437
2. Name: ad2s1
   Mediasize: 26843152896 (25G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 2970860838

Geom name: M1
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3840021545
Providers:
1. Name: mirror/M1
   Mediasize: 93190551040 (87G)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: ad0s2
   Mediasize: 93190551552 (87G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 2818130314
2. Name: ad2s2
   Mediasize: 93190551552 (87G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 3215541282

Geom name: M2
State: DEGRADED
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3917683988
Providers:
1. Name: mirror/M2
   Mediasize: 160041852928 (149G)
   Sectorsize: 512
   Mode: r1w0e0
Consumers:
1. Name: ad4s1
   Mediasize: 160041853440 (149G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 3973561558
2. Name: ad6
   Mediasize: 160041885696 (149G)
   Sectorsize: 512
   Mode: r1w1e1
   State: SYNCHRONIZING
   Priority: 0
   Flags: DIRTY, SYNCHRONIZING
   GenID: 0
   SyncID: 1
   Synchronized: 22%
   ID: 2258110550



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aadbc3580601270602s39a147b4x123dea6332067d27>