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

Zeus V Panchenko zeus at ibs.dn.ua
Wed Sep 8 14:12:08 UTC 2010


Ivan Voras (ivoras at freebsd.org) [10.09.08 16:47] wrote:
> 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.
yes, i mean replacement of ada1 with the drive the same as ada0

and, am i correct to think that
growfs /dev/mirror/gm0s1f
will be enough to use the rest of the raw space?

> 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.

but ada1 will be new one, no partition table on it yet ...


> >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.

ok, than only growfs? 
no fdisk, but can i bsdlabel the rest of the raw space?

-- 
Zeus V. Panchenko
IT Dpt., IBS ltd			      	        GMT+2 (EET)


More information about the freebsd-geom mailing list