Increase Disk Size in a gmirror RAID1

Charles Uchu Strader uchu.1 at gaiahost.coop
Sun Aug 26 10:11:01 PDT 2007


Hello.  This is my first post onto the list, so please correct me if 
this is not the correct place.

The situation is I currently have a machine running gmirror RAID1 on two 
36GB disks.  That's all fine and dandy, except that those disks are 
running out of space (temporarily alleviated through an NFS mount to 
another machine).  What I'd really like to do is upsize the disks on 
that machine so that it ended with two 73GB disks.

The machine only has two drive bays.

Does anyone have ideas on how to do this, with minimal downtime and ease? 

Here's the existing partition scheme for disk da0, which is part of the 
gm0 mirror:

Part    Mount    Size    Newfs    Part
da0sa1    /    512MB    UFS2    Y
da0s1b    swap    4096MB    SWAP
da0s1d    /var    4787MB    UFS2+S    Y
da0s1e    /tmp    512MB    UFS2+S    Y
da0s1f    /usr    6144MB    UFS2+S    Y
da0s1g    /web    18675MB    UFS2+S    Y

The goal would be a result that adds the new space into the /web 
partition, or creates a new /web2 partition if adding into the the 
existing partition is not possible.  So something like (noting /web size 
is not exact below):

Part    Mount    Size    Newfs    Part
da0sa1    /    512MB    UFS2    Y
da0s1b    swap    4096MB    SWAP
da0s1d    /var    4787MB    UFS2+S    Y
da0s1e    /tmp    512MB    UFS2+S    Y
da0s1f    /usr    6144MB    UFS2+S    Y
da0s1g    /web    48675MB    UFS2+S    Y

What I've done so far is to forget da1 from the gm0 mirror, restart, and 
put the 73GB into drive bay two.  But now I'm at bit lost at the process 
to follow to achieve my desired result.  I'm thinking something like 
fdisk, bsdlabel, newfs on the new da1 73GB drive.  Then dd or 
dump/restore from da0/gm0 to da1.  Then shutdown, remove the 36GB da0, 
put in the second 73GB drive, boot and them get gmirror to sync things 
from the 73GB drive.

I need assistance on how to issue those commands properly to achieve 
this result.

I have a test machine I can do this on, so I will continue to learn/play 
in the meantime.

Thanks,

Charles Uchu




More information about the freebsd-questions mailing list