gmirror and offset

Ferruccio Zamuner nonsolosoft at diff.org
Sat Jun 23 19:17:18 UTC 2007


/dev/ad4 has running FreeBSD 6.2-RELEASE from where:
 
r1# dd if=/dev/zero of=/dev/ad6 bs=512 count=79
79+0 records in
79+0 records out
40448 bytes transferred in 0.012255 secs (3300543 bytes/sec)
 
r1# /usr/sbin/sysinstall
 
to create ad6s1, ad6s2, ad6s3 and made ad6s1 "active"
 
r1# fdisk /dev/ad6
******* Working on device /dev/ad6 *******
parameters extracted from in-core disklabel are:
cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl)
 
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl)
 
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 167766732 (81917 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 167766795, size 2104515 (1027 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 169871310, size 64565235 (31525 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>
 
r1# bsdlabel ad6s1
# /dev/ad6s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 167766732        0    unused        0     0         # "raw" part, don't edit
 
 
I want to create a mirror on ad6s1:
 
r1# gmirror label -h -v -b split -s 4096 gm0 ad6s1
Metadata value stored on ad6s1.
Done.
 
r1# gmirror load
 
r1# bsdlabel /dev/mirror/gm0
# /dev/mirror/gm0:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 167766732       63    unused        0     0         # "raw" part, don't edit
partition c: partition extends past end of unit
bsdlabel: partition c doesn't start at 0!
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilities


What have I done wrong?


I've tried to edit bsdlabel:

r1# bsdlabel -e /dev/mirror/gm0

and when I'm in the editor I find:
-----
# /dev/mirror/gm0:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 234441632       16    unused        0     0
  c: 167766732       63    unused        0     0         # "raw" part, don't edit
-----

Then I modify it to:

-----
# /dev/mirror/gm0:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD        0     0     0
  c: 167766732        0    unused        0     0         # "raw" part, don't edit
  e: 12582912  2097152    4.2BSD        0     0     0
  f: 20971520 14680064    4.2BSD        0     0     0
  g: 14680064 35651584    4.2BSD        0     0     0
  h: 117435084 50331648    4.2BSD        0     0     0
-----

BUT bsdlabel writes:

-----
partition c: partition extends past end of unit
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilities
partition h: partition extends past end of unit
re-edit the label? [y]: 
-----

How can I fix it?


Bye,                     \fer


More information about the freebsd-geom mailing list