Detecting GMIRROR volumes without using gmirror utility

Viktor Vasilev viktor.vasilev at stud.tu-darmstadt.de
Fri Jul 7 19:47:10 UTC 2006


On Friday 07 July 2006 20:55 Scott Ullrich wrote:
> I am working on adding GEOM mirror support to BSD Installer but do not
> with to depend on the gmirror binary to survey known disks.
>
> Is it possible to find out the active gmirror volumes somehow via the
> kernel?  Maybe a sysctl knob similar to kern.disks?

Maybe this could do the job:

  sysctl -b kern.geom.conftxt

I don't have an active gmirror setup, but google says the output looks like 
this:

  0 DISK ad2 120034123776 512 hd 16 sc 63
  1 MIRROR mirror/gm0 120034123264 512
  2 MBR mirror/gm0s1 120031478784 512 i 0 o 32256 ty 165
  3 BSD mirror/gm0s1f 118984074240 512 i 5 o 1047404544 ty 7
  3 BSD mirror/gm0s1e 268435456 512 i 4 o 778969088 ty 7
  3 BSD mirror/gm0s1d 268435456 512 i 3 o 510533632 ty 7
  3 BSD mirror/gm0s1c 120031478784 512 i 2 o 0 ty 0
  3 BSD mirror/gm0s1b 242098176 512 i 1 o 268435456 ty 1
  3 BSD mirror/gm0s1a 268435456 512 i 0 o 0 ty 7
  0 DISK ad0 120034123776 512 hd 16 sc 63
  1 MBR ad0s1 120031478784 512 i 0 o 32256 ty 165
  2 BSD ad0s1f 118984074240 512 i 5 o 1047404544 ty 7
  2 BSD ad0s1e 268435456 512 i 4 o 778969088 ty 7
  2 BSD ad0s1d 268435456 512 i 3 o 510533632 ty 7
  2 BSD ad0s1c 120031478784 512 i 2 o 0 ty 0
  2 BSD ad0s1b 242098176 512 i 1 o 268435456 ty 1
  2 BSD ad0s1a 268435456 512 i 0 o 0 ty 7



Cheers,
Vik
-- 
PGP Key: 0xE09DC8D8/6799 4011 EBDE 6412 05A1 090C DBDF 5887 E09D C8D8
Signed/encrypted mail welcome!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20060707/a8aa7f18/attachment.pgp


More information about the freebsd-geom mailing list