gmirror: how to use unused space after hdd-s upgrade

Ivan Voras ivoras at freebsd.org
Wed Sep 8 13:47:24 UTC 2010


On 09/08/10 14:22, Zeus V Panchenko wrote:

> #>  gmirror list
>
> Geom name: gm0
> State: COMPLETE
> Components: 2
> Balance: load
> Slice: 4096
> Flags: NONE
> GenID: 1
> SyncID: 5
> ID: 3265418851
> Providers:
> 1. Name: mirror/gm0
>     Mediasize: 251000192512 (234G)
>     Sectorsize: 512
>     Mode: r5w5e14
> Consumers:
> 1. Name: ada1
>     Mediasize: 251000193024 (234G)
>     Sectorsize: 512
>     Mode: r1w1e1
>     State: ACTIVE
>     Priority: 0
>     Flags: DIRTY
>     GenID: 1
>     SyncID: 5
>     ID: 3507101685
> 2. Name: ada0
>     Mediasize: 500107862016 (466G)
>     Sectorsize: 512
>     Mode: r1w1e1
>     State: ACTIVE
>     Priority: 0
>     Flags: DIRTY
>     GenID: 1
>     SyncID: 5
>     ID: 2360533566
>

> i want to upgrade consumer ada1 to the same size/geometry as ada0 and
> to extend /dev/mirror/gm0s1f to use all rest available unused space ...

If by "upgrade" you mean replace it with a disk of the same size as the 
other one then yes, it can be done that way. If you mean change the 
partition table on either of the drive so it's out of sync with the 
other drive then no, mirrors don't work that way.

> so, how can i do that correct way, please?

In theory, you *could* mirror the whole ada1 to one partition of ada0 
and use the rest of space on ada0 for a second partition in the same 
partition table, GEOM supports such gimmickry, but that would make the 
drive unbootable.





More information about the freebsd-geom mailing list