Detecting GMIRROR volumes without using gmirror utility

Scott Ullrich sullrich at gmail.com
Sun Jul 9 01:57:10 UTC 2006


On 7/7/06, Eric Anderson <anderson at centtech.com> wrote:
> The problem with the sysctl, is that it doesn't know about the GEOM
> markers that don't have kernel modules loaded.  For instance, I have a
> drive that is part of a geom_journal.  Without geom_journal loaded, the
> conftxt reports:
>
> 0 DISK da0 400088457216 512 hd 255 sc 63
> 1 MBR da0s2 24281026560 512 i 1 o 375804817920 ty 6
> 1 MBR da0s1 375804785664 512 i 0 o 32256 ty 165
> 2 BSD da0s1e 5363856384 512 i 4 o 370440929280 ty 7
> 3 LABEL label/journal 5363855872 512 i 0 o 0
> 2 BSD da0s1d 370440929280 512 i 3 o 0 ty 7
> 3 LABEL label/backup 370440928768 512 i 0 o 0
> 2 BSD da0s1c 375804785664 512 i 2 o 0 ty 0
> 0 DISK ad0 100030242816 512 hd 16 sc 63
> 1 MBR ad0s2 69791500800 512 i 1 o 16162675200 ty 165
> 2 BSD ad0s2e 11020913152 512 i 4 o 58770587648 ty 7
> 3 LABEL ufs/alt 11020913152 512 i 0 o 0
> 2 BSD ad0s2d 19922944000 512 i 3 o 38847643648 ty 7
> 3 LABEL ufs/home 19922944000 512 i 0 o 0
> 2 BSD ad0s2c 69791500800 512 i 2 o 0 ty 0
> 2 BSD ad0s2b 2147483648 512 i 1 o 0 ty 1
> 2 BSD ad0s2a 36700160000 512 i 0 o 2147483648 ty 7
> 1 MBR ad0s1 16162642944 512 i 0 o 32256 ty 12
>
> see the da0s* stuff?  That is actually part of a geom_journal, but since
> the kernel module isn't loaded, it doesn't taste for it.  Now, I simply
> load the geom_journal module, and check the sysctl again:
>
> 0 DISK da0 400088457216 512 hd 255 sc 63
> 1 MBR da0s2 24281026560 512 i 1 o 375804817920 ty 6
> 1 MBR da0s1 375804785664 512 i 0 o 32256 ty 165
> 2 BSD da0s1e 5363856384 512 i 4 o 370440929280 ty 7
> 3 LABEL label/journal 5363855872 512 i 0 o 0
> 4 JOURNAL label/backup.journal 370440928256 512
> 5 BSD label/backup.journale 5363856384 512 i 4 o 370440929280 ty 7
> 5 BSD label/backup.journald 370440929280 512 i 3 o 0 ty 7
> 5 BSD label/backup.journalc 375804785664 512 i 2 o 0 ty 0
> 2 BSD da0s1d 370440929280 512 i 3 o 0 ty 7
> 3 LABEL label/backup 370440928768 512 i 0 o 0
> 4 JOURNAL label/backup.journal 370440928256 512
> 5 BSD label/backup.journale 5363856384 512 i 4 o 370440929280 ty 7
> 5 BSD label/backup.journald 370440929280 512 i 3 o 0 ty 7
> 5 BSD label/backup.journalc 375804785664 512 i 2 o 0 ty 0
> 2 BSD da0s1c 375804785664 512 i 2 o 0 ty 0
> 0 DISK ad0 100030242816 512 hd 16 sc 63
> 1 MBR ad0s2 69791500800 512 i 1 o 16162675200 ty 165
> 2 BSD ad0s2e 11020913152 512 i 4 o 58770587648 ty 7
> 3 LABEL ufs/alt 11020913152 512 i 0 o 0
> 2 BSD ad0s2d 19922944000 512 i 3 o 38847643648 ty 7
> 3 LABEL ufs/home 19922944000 512 i 0 o 0
> 2 BSD ad0s2c 69791500800 512 i 2 o 0 ty 0
> 2 BSD ad0s2b 2147483648 512 i 1 o 0 ty 1
> 2 BSD ad0s2a 36700160000 512 i 0 o 2147483648 ty 7
> 1 MBR ad0s1 16162642944 512 i 0 o 32256 ty 12
>
>
> Now it sees the journal.
>
> I think you will not be able to get away from loading the geom modules,
> because they are what do the tasting for their class.

I see what you mean.   I've got it working!!   I've got a bit of
cleanup to do but should be able to post a FreeSBIE test ISO in the
next week.

Thanks to everyone that replied.   This feature is quite handy!!

Scott


More information about the freebsd-geom mailing list