Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 2008 11:45:14 +0200
From:      Michel Talon <talon@lpthe.jussieu.fr>
To:        freebsd-questions@freebsd.org
Subject:   Re: adding a slice to gmirror instead of a whole disk, will it work?
Message-ID:  <20081008094514.GA96151@lpthe.jussieu.fr>

next in thread | raw e-mail | index | archive | help
Craig Butler wrote:

> Will adding a slice to a gmirror instead of a whole disk work?
> The slice is big enough to accommodate the old disk.

It will work no problem. The only possible trouble is to have the last
sector of the disk or slice free to be able to put the geom marker on
it. For example i have a mirror with 2 slices:
asmodee% gmirror list
Geom name: gms1
State: COMPLETE
Components: 2
Balance: load
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 2
ID: 1193348252
Providers:
1. Name: mirror/gms1
   Mediasize: 16776699904 (16G)
   Sectorsize: 512
   Mode: r5w5e5
Consumers:
1. Name: ad0s1
   Mediasize: 16776700416 (16G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   GenID: 0
   SyncID: 2
   ID: 1158494643
2. Name: ad4s1
   Mediasize: 16776700416 (16G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   GenID: 0
   SyncID: 2
   ID: 2277636746

Note that in this case (one of the disks is slower than the other) i
observed that the "round-robin" strategy was giving poor results (slower
than the slowest of the two disks) while the "load" strategy gives
performance like the faster disk. Consumers can be absolutely anything,
this is the beauty of the GEOM idea.


-- 

Michel TALON




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