On 08/06/15 17:13, Quartz wrote:
> We have an older system running 4.9 that acts as a sort of 
> dev/test/scratch machine for messing around. When it was set up it we 
> threw a 10gb drive in there and did a generic install with all the 
> defaults. Over time, as we've used this for various stuff, we've 
> realized that that partitioning scheme turned out to be decidedly non 
> optimal. /usr/obj and /usr/src are eating up a gig each but only have 
> 2kb of data on them (this machine has never compiled anything). /home 
> and /usr/local are using less than 45mb combined. Meanwhile /var was 
> only set up at a few hundred megs and is bursting at the seams. Over 
> half the drive's capacity is being wasted.
> 
> I'm not super familiar with how OpenBSD does disks and all of the 
> caveats. How easy would it be to nuke some of these partitions and 
> recombine the space? Is it something that could be done with a couple 
> fdisk commands or would it involve a lot of screwing around? I've looked 
> though the manual regarding fdisk and disklabel but I'm still not sure I 
> really understand how everything works together.

First of all, you have a machine that is running a very old version of
OpenBSD.  You have a lot of upgrades to do, and since you have other
issues (partitioning), you probably just want to reinstall and start
over using your current knowledge of your disk layout needs.

Since you are working on a 10G hard disk, you might want to consider
replacing that just because of its age (I say, as glance over at my
crate of 20G and smaller HDs), and 10G disks are just plain slow
compared to modern disks.

The general answer to your question, however, is the "growfs" command.

growfs will let you expand an off-line file system with additional space
immediately adjoining the end of the partition.  That's a lot of
restrictions, but if you combine it with a lot of unused space on a
modern big disk, you have a high degree of flexibility.

When you are buying disks for your (say) firewall, you need maybe 5G of
disk space, but you will have great difficulty buying new disks smaller
than 300G.  Don't allocate all of the 300G, just what you actually need.
 Leave the rest unallocated.  Decide you need more /usr space?  Make a
new partition, copy the existing /usr to the new one, change your
/etc/fstab, reboot, delete your old /usr.

Nick.

Reply via email to