On Mon, Jun 29, 2015 at 10:05:59AM +0200, Carlos Fenollosa wrote:
> Hi all,
> 
> Thanks for all the information. I had read disklabel(8) and my indication of 
> /usr/src was actually my mistake, it has indeed its own partition. Sorry for 
> that.
> 
> My disk has 80 GB so it falls under the >7GB partitioning. Regarding the fact 
> that the installer is flexible, I know, I was only pointing out that maybe 
> the default value for /usr is a bit small. Somebody who wants to build a lot 
> of ports probably knows enough to change the default value. 
> 
> For a novice user, they’re going to be constrained with the current defaults 
> when they want to compile some big port — that’s my case, I can’t build 
> php-5.6 because of disk space, and I’ve run “make clean” on all subfolders so 
> there is nothing else to get space from.
> 
> Anyway, my goal bringing this up was to try to accommodate the sizes. a bit 
> better for novice users who run with the default system partitioning.
> 
> Thanks,
> Carlos
> 
> > On 29 Jun 2015, at 00:46, Alexander Salmin <[email protected]> wrote:
> > 
> > Hi,
> > 
> > Read up on the Automatic disk allocation chapter in the disklabel manual as 
> > mentioned by Raf. Basically partitions are dynamically allocated based on 
> > total disk-space with a few exceptions - the following paths have their own 
> > partitions on disks larger than 7G (so you are mistaken about the /usr/src 
> > part, as Raf said). Maybe you should use "make clean" after your jobs? What 
> > exactly is using all your disk space? I suggest reading "15.3.6 - Cleaning 
> > up after a build" at http://www.openbsd.org/faq/faq15.html
> > 
> > 2G /usr/src
> > 2G /usr/obj
> > 10G /usr/local
> > 1G /usr/X11R6
> > 
> > Alexander
> > 
> > On 2015-06-29 00:42, Raf Czlonka wrote:
> >> On Sun, Jun 28, 2015 at 11:15:20PM BST, Carlos Fenollosa wrote:
> >> 
> >>> Hi,
> >> Hi Carlos,
> >> 
> >>> I’m a new OpenBSD user, so please forgive me if this topic has been
> >>> discussed thoroughly already.
> >>> 
> >>> I installed a new box using the default partitioning (2GB for
> >>> /usr) and I found that it’s a bit insufficient since /usr/ports,
> >>> /usr/xenocara and /usr/src hang from there on the same partition, and
> >>> eat up most of those 2GB. I’ve searched online and some users also
> >>> found the same problem
> >>> 
> >>> Do you think it would be a good idea to increase that number to about
> >>> 5GB? I could try to write a simple patch for it.
> >> It all depends on the size of your disk but most likely you are mistaken.
> >> 
> >> man 8 disklabel
> >> 
> >> Raf
> 

I'm not sure about how automatic does they order of partitions, but if
they are in consecutive order on the disklabel, not of the partion name
but in the order of locations on the disk, 

disklabek sd0 gives

snip

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          2097152               64  4.2BSD   2048 16384    1 # /
  b:         12549504          2097216    swap                   # none
  c:       3906963456                0  unused                   
  d:          2097152       1891557312  4.2BSD   2048 16384    1 
  e:         16771872         16739712  4.2BSD   2048 16384    1 # /tmp
  f:         62910528         33511584  4.2BSD   2048 16384    1 # /var
  g:         12578912         96422112  4.2BSD   2048 16384    1 # /usr
  h:        104856256        109001024  4.2BSD   2048 16384    1 # /usr/local
  i:        104872320        213857280  4.2BSD   2048 16384    1 # /var/www/var
  j:         41929664       2732511872  4.2BSD   2048 16384    1 # /usr/bld
  m:        838857408       1893654464  4.2BSD   4096 32768    1 # /home
  n:        251658240       1199509248  4.2BSD   2048 16384    1 # /home-WD
  o:        125821088       1451167488  4.2BSD   2048 16384    1 # /home-HDS
  p:        314568704       1576988608  4.2BSD   4096 32768    1 # /home-WDC

look at the offsets, for example, the offset for /usr/bld 2732511872 and for 
/home 1893654464 means that the are not right next to each other.
However, /tmp 16739712 and /var 33511584 are next to each other.

using disklabel, with the two unmounted, you can d f and d e and then a e and 
use the total space of the area that /tmp and /var used and set the mount point 
as /tmp.
Obviously this would be disastrous with the lack of /var! :(


Now use fsck and growfs (NOT newfs!!) and you have made an larger /tmp and done 
away with /var completely.

Read all the man pages very carefully first. Backup /usr first, too, if 
possible.

if you have /usr /usr/src /usr/obj in that order (or /usr/obj first after 
/usr), just growfs /usr into /usr/src space, then repeat with /usr/obj. Only 
matters that /usr is first. 

I have done this many times and it has saved me the grief you are having.

If you later build a custom set, be sure to put partitions you can sacrifice 
later in order on the disk, else you are screwed.

Wish you luck!

Chris Bennett

Reply via email to