growfs
Doug Sampson
dougs at dawnsign.com
Tue Jun 3 20:52:56 UTC 2008
I want to ensure that I am correctly applying the concept of the growfs
command.
I want to remove /dev/ad2s1h and expand /dev/ad2s1g to occupy all of the
space left behind by the deletion of /dev/ad2s1h.
root at aries:/root# bsdlabel -e /dev/ad2s1
# /dev/ad2s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 524288 0 4.2BSD 2048 16384 32776
b: 4138384 524288 swap
c: 586099332 0 unused 0 0 # "raw" part, don't
edit
d: 524288 4662672 4.2BSD 0 0 0
e: 524288 5186960 4.2BSD 0 0 0
f: 10485760 5711248 4.2BSD 0 0 0
g: 167772160 16197008 4.2BSD 0 0 0
h: 402130164 183969168 4.2BSD 0 0 0
root at aries:/root# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad2s1a 253678 60858 172526 26% /
devfs 1 1 0 100% /dev
/dev/ad2s1e 253678 410 232974 0% /tmp
/dev/ad2s1f 5077038 4129758 541118 88% /usr
/dev/ad2s1d 253678 130346 103038 56% /var
/dev/ad2s1g 81245672 67645604 7100416 91% /data
/dev/ad2s1h 194736504 99902864 79254720 56% /backup
According to http://www.freebsd.org/cgi/man.cgi?query=growfs&sektion=8, it
looks like that if I wish to expand /dev/ad2s1g to fill out the slice, the
only thing I need to do are the following:
-remove /dev/ad2s1h
-growfs -s 569902324 /dev/ad2s1g
-edit /etc/fstab to remove all references to /dev/ad2s1h
Is this correct? Am I missing any other commands?
Since the only tool I am familiar with and use for disk partitioning is
sysinstall, how do I remove /dev/ad2s1h without resorting to sysinstall?
Fdisk?
I want to be extremely sure that I am taking the correct steps to perform
this operation. Yes, I have backups but this machine is in production and I
want to eliminate every possibility of downtime due to issues arising from
the improper understanding and use of the 'growfs' command. Thanks.
~Doug
More information about the freebsd-questions
mailing list