View Single Post
Old 7th November 2008
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default

Okay, I'm still working on this, with varying degrees of success. One question I have is that in your earlier post you recommended to slice/partition all of the disks as I want them, using the first disk as a template. I did that, ending up with the three disks having three slices. Slice s1 is the OS, slice s2 is swap and slice s3 is reserved for our purposes:
g c33288 h15 s63
p 1 0xa5 63 20971377
a 1
p 2 0xa5 20971440 2096955
p 3 0xa5 23068395 8388765
However, one of the steps performed by the rse script is this:

(echo "p 1 165 63 $size"; echo "a 1") | fdisk -v -f- -i /dev/${d2}

This destroys the slices I created on disk 2, leaving a single slice, so there doesn't seem to be any purpose in slicing/partitioning the second and third drives until the whole process is done. Please correct me if I'm missing something.

Ignoring that issue, the script seems to work without any obvious problems. After the dump/restore operation is done (and before the reboot), gmirror shows this:
# gmirror list gm0
Geom name: gm0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 4032291634
Providers:
1. Name: mirror/gm0
Mediasize: 10736860672 (10G)
Sectorsize: 512
Mode: r2w2e3
Consumers:
1. Name: ad1s1
Mediasize: 10736861184 (10G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 1062144502
2. Name: ad0s1
Mediasize: 10737345024 (10G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 1
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 613987541
The thing that catches my eye here is that all three media size values listed here are different. I would think at least that the media sizes for ad0s1 and ad1s1 should be the same?

After rebooting, I run the second script and reboot. When the system comes up, the mirror is shown as degraded:
# gmirror list gm0
Geom name: gm0
State: DEGRADED
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 2
ID: 4032291634
Providers:
1. Name: mirror/gm0
Mediasize: 10736860672 (10G)
Sectorsize: 512
Mode: r2w2e3
Consumers:
1. Name: ad1s1
Mediasize: 10736861184 (10G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: NONE
GenID: 0
SyncID: 2
ID: 1062144502
As you can see ad0s1 has dropped out. The slice/partition table has been modified as well, resulting from this step when the second script was run:

(echo "p 1 165 63 $size"; echo "a 1") | fdisk -v -B -f- -i /dev/${d1}

Again, this step implies that I shouldn't bother with setting up any more than the first slice on my disks, since these fdisk commands destroy the slices.

At this point, I cannot add the third disk to the mirror:

# gmirror insert gm0 ad3s1
gmirror: Not all disks connected.

I'm not sure what I'm doing wrong, but apparently I must be missing something. Any suggestions?
Reply With Quote