Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 23:46:02 +0200
From:      Willem Jan Withagen <wjw@withagen.nl>
To:        freebsd-geom@freebsd.org
Subject:   building a mirror in a partition
Message-ID:  <4153441A.9010303@withagen.nl>

next in thread | raw e-mail | index | archive | help
Hi,

I'm trying to build a geom mirror on 2 partitions on 2 different disks.
Below you can see that the partitioning should be correct.
But everytime I try to create the mirror, it seems to forget the 'h' on 
the second disk and take the whole disk a second part of the mirror.
This strikes me a a sort of odd.

Questions:
    - should this work?
    - should it work this way?
    - What does error=17 mean in the logging?

Running -CURRENT as of 22 sept.

--WjW

asus# newfs /dev/ad2s1h
/dev/ad2s1h: 13586.2MB (27824512 sectors) block size 16384, fragment 
size 2048
        using 74 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792,
 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608,
 9408960, 9785312, 10161664, 10538016, 10914368, 11290720, 11667072, 
12043424,
 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888,
 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352,
 17688704, 18065056, 18441408, 18817760, 19194112, 19570464, 19946816,
 20323168, 20699520, 21075872, 21452224, 21828576, 22204928, 22581280,
 22957632, 23333984, 23710336, 24086688, 24463040, 24839392, 25215744,
 25592096, 25968448, 26344800, 26721152, 27097504, 27473856

asus# gmirror label -v -s 2048 -b split home2 ad0s1h ad2s1h
Metadata value stored on ad0s1h.
Metadata value stored on ad2s1h.
Done.

asus# gmirror list
Geom name: home2
State: COMPLETE
Components: 2
Balance: split
Slice: 2048
Flags: NONE
SyncID: 1
ID: 2464573592
Providers:
1. Name: mirror/home2
   Mediasize: 14246150656 (13G)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: ad0s1h
   Mediasize: 14246151168 (13G)
   Sectorsize: 512
   Mode: r0w0e0
   State: ACTIVE
   Priority: 0
   Flags: NONE
   SyncID: 1
   ID: 1917681422
2. Name: ad2s1
   Mediasize: 40015954944 (37G)
   Sectorsize: 512
   Mode: r0w0e0
   State: ACTIVE
   Priority: 1
   Flags: NONE
   SyncID: 1
   ID: 1293810591

Geom name: home2.sync

asus# bsdlabel -r ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD     2048 16384 28552
  b:  2097152  2097152      swap
  c: 78156162        0    unused        0     0         # "raw" part, 
don't edit
  d:  2097152  4194304    4.2BSD     2048 16384 28552
  e:  2097152  6291456    4.2BSD     2048 16384 28552
  f: 20971520  8388608    4.2BSD     2048 16384 28552
  g: 20971520 29360128    4.2BSD     2048 16384 28552
  h: 27824514 50331648    4.2BSD     2048 16384 28552
asus# bsdlabel -r ad2s1
# /dev/ad2s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0    4.2BSD     2048 16384 28552
  b:  2097152  2097152      swap
  c: 78156162        0    unused        0     0         # "raw" part, 
don't edit
  d:  2097152  4194304    4.2BSD     2048 16384 28552
  e:  2097152  6291456    4.2BSD     2048 16384 28552
  f: 20971520  8388608    4.2BSD     2048 16384 28552
  g: 20971520 29360128    4.2BSD     2048 16384 28552
  h: 27824514 50331648    4.2BSD     2048 16384 28552

/var/log/messages:
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2 created 
(id=2464573592).
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2: provider ad0s1h 
detected
.
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2: provider ad2s1 
detected.
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2: provider ad2s1 
activated
.
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1a, start 0 length 
1073741824 e
nd 1073741823
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1b, start 1073741824 
length 107
3741824 end 2147483647
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1c, start 0 length 
40015954944
end 40015954943
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1d, start 2147483648 
length 107
3741824 end 3221225471
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1e, start 3221225472 
length 107
3741824 end 4294967295
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1f, start 4294967296 
length 107
37418240 end 15032385535
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1g, start 15032385536 
length 10
737418240 end 25769803775
Sep 23 23:38:03 asus kernel: GEOM: Configure ad2s1h, start 25769803776 
length 14
246151168 end 40015954943
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2: provider ad0s1h 
activate
d.
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Device home2: provider 
mirror/home2 la
unched.
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Cannot add disk ad2s1c to 
home2 (error
=17).
Sep 23 23:38:03 asus kernel: GEOM_MIRROR: Cannot add disk ad2s1h to 
home2 (error
=17).
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2a, start 0 
length 10737
41824 end 1073741823
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2b, start 
1073741824 len
gth 1073741824 end 2147483647
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2c, start 0 
length 40015
954944 end 40015954943
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2d, start 
2147483648 len
gth 1073741824 end 3221225471
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2e, start 
3221225472 len
gth 1073741824 end 4294967295
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2f, start 
4294967296 len
gth 10737418240 end 15032385535
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2g, start 
15032385536 le
ngth 10737418240 end 25769803775
Sep 23 23:38:03 asus kernel: GEOM: Configure mirror/home2h, start 
25769803776 le
ngth 14246151168 end 40015954943



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