Date: Thu, 18 Mar 2010 09:56:15 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Aiza <aiza21@comclark.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: shrink /usr size Message-ID: <4BA1F8BF.3010902@infracaninophile.co.uk> In-Reply-To: <4BA1F42C.1030607@comclark.com> References: <4BA1F42C.1030607@comclark.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 18/03/2010 09:36:44, Aiza wrote: > /usr is the last partition in the slice. It has 15GB and only 600mb > used. I would like to shrink /usr to 7GB leaving me 7GB for another new > partition for mysql DB testing. How do I shrink /usr? Backup the contents or /usr to a different partition, or preferably to some external media. Unmount /usr and destroy it by using bsdlabel(1) to create two appropriately sized partitions in its place. Create filesystems on the new partitions using newfs(1). Restore the backup of /usr. Edit /etc/fstab as appropriate and mount the new partitions. Everything you really need to do this is on the root partition, but you might find lack of vi(1) and various other utilities somewhat inconvenient. Also editing the label of a disk with mounted partitions is a pretty risky operation and forbidden by default: you will need to know the magic incarnation: sysctl kern.geom.debugflags=16 Also, there's no real reason to keep the mysql data in its own partition - -- if it was on a different disk that would be a different matter -- so if your /var is big enough, you could just swap /var and /usr, which saves you all that mucking around with partitions. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuh+L8ACgkQ8Mjk52CukIzTxwCfWuPe6vDdoQIvbiQFxoLTp/Wu PIAAn1YhLHwzKfcJF4BPssNt6WgvdXTN =2DGA -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA1F8BF.3010902>