DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default /usr/local volume full

My OpenBSD installation is "default", plus the addition of Mate DE. While adding packages I've gotten the following message:

Code:
The volume "local" has only xx disk space remaining.  You can free up disk space by removing unused programs or files, or by moving files to another disk or partition.
2 questions:

Why? And, what would be OK to move out of /usr/local, what would be better left there?
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
  #2   (View Single Post)  
Old 26th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by hrsetrdr View Post
Why?
For disk drives over 10GB, the partition containing /usr/local is targetted to 15% of the drive, with a minimum of 1GB and a maximum of 20GB. See the disklabel(8) man page, which has a section titled AUTOMATIC ALLOCATION.
Quote:
And, what would be OK to move out of /usr/local, what would be better left there?
/usr/local contains all of the applications and libraries you have installed with pkg_add(1). You can pkg_delete(1) any package that was automatically installed as a dependency of an application you initially installed with pkg_add() but later deleted, with # pkg_delete -a or # pkg_delete -ac. If that doesn't alleviate your capacity problem, then you will need to reorganize your disk space on your drive.

---

Edited to add: let us know if you need any guidance to reorganize the drive. You can post the output of $ df -h and # disklabel -p g <your.drive> here to get step-by-step recommendations.

Last edited by jggimi; 26th December 2018 at 08:17 PM.
Reply With Quote
  #3   (View Single Post)  
Old 26th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

Quote:
Originally Posted by jggimi View Post
For disk drives over 10GB, the partition containing /usr/local is targetted to 15% of the drive, with a minimum of 1GB and a maximum of 20GB. See the disklabel(8) man page, which has a section titled AUTOMATIC ALLOCATION.
/usr/local contains all of the applications and libraries you have installed with pkg_add(1). You can pkg_delete(1) any package that was automatically installed as a dependency of an application you initially installed with pkg_add() but later deleted, with # pkg_delete -a or # pkg_delete -ac. If that doesn't alleviate your capacity problem, then you will need to reorganize your disk space on your drive.

---

Edited to add: let us know if you need any guidance to reorganize the drive. You can post the output of $ df -h and # disklabel -p g <your.drive> here to get step-by-step recommendations.
Reorganizing the drive would be preferable, since I want to keep the packages I've added.

The output of df -h:

Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   82.9M    872M     9%    /
/dev/sd0k      8.0G    211M    7.4G     3%    /home
/dev/sd0d      1.7G    2.2M    1.6G     0%    /tmp
/dev/sd0f      1.8G    704M    1.1G    39%    /usr
/dev/sd0g      978M    189M    741M    20%    /usr/X11R6
/dev/sd0h      3.9G    3.7G   -798K   100%    /usr/local
/dev/sd0j      5.7G    2.0K    5.4G     0%    /usr/obj
/dev/sd0i      1.6G    2.0K    1.6G     0%    /usr/src
/dev/sd0e      2.6G   45.3M    2.4G     2%    /var
Disklabel:

Code:
 disklabel -p g sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: OCZ-VERTEX      
duid: 07f72ff6186f16ad
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 3892
total sectors: 62533296 # total bytes: 29.8G
boundstart: 64
boundend: 62524980
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:             1.0G               64  4.2BSD   2048 16384 12958 # /
  b:             2.1G          2097216    swap                    # none
  c:            29.8G                0  unused                    
  d:             1.7G          6428288  4.2BSD   2048 16384 12958 # /tmp
  e:             2.7G         10007776  4.2BSD   2048 16384 12958 # /var
  f:             1.9G         15588960  4.2BSD   2048 16384 12958 # /usr
  g:             1.0G         19515744  4.2BSD   2048 16384 12958 # /usr/X11R6
  h:             4.0G         21552320  4.2BSD   2048 16384 12958 # /usr/local
  i:             1.7G         29900256  4.2BSD   2048 16384 12958 # /usr/src
  j:             5.8G         33396096  4.2BSD   2048 16384 12958 # /usr/obj
  k:             8.1G         45548736  4.2BSD   2048 16384 12958 # /home
Any guidance in reorganizing the drive would be much appreciated.
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
  #4   (View Single Post)  
Old 26th December 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

Quote:
Reorganizing the drive would be preferable, since I want to keep the packages I've added.
Code:
# pkg_delete -a
is more of a house cleaning. It should not effect those packages that you manually installed, If you trialed several desktops prior to installing Mate, say LXQt or KDE, you can have a large number of unused Qt dependencies.
Reply With Quote
  #5   (View Single Post)  
Old 26th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

So it looks like /usr/local/share is where the added packages end up:

Code:
# du -hs * | sort -hr
2.3G    lib
1.1G    share
232M    include
77.8M   bin
35.2M   man
7.8M    libexec
5.5M    info
3.2M    libdata
3.0M    sbin
I've got 8.1G space available in /home partition, what would the impact be of moving the share directory...leaving a symlink?
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
  #6   (View Single Post)  
Old 27th December 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

No, packages end up in /usr/local
/usr/local/share is a catch-all directory for package items that are not binaries, libraries, headers, manual pages, etc.
Reply With Quote
  #7   (View Single Post)  
Old 27th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

There is a simple solution, since the unused partitions "i" (/usr/src) and "j" (/usr/obj) follow immediately after partition "h" (/usr/local) on the drive. You can delete them, and grow /usr/local into these unused 7.5GB. Those two unused partitions are for building the system from source code.
  1. Enter single-user mode.
    You can boot into it with boot> -s or "drop" into it with# kill 1. If you've booted, no filesystems are mounted (except for a read-only root) and no network will have been started. If you started with a running system, your network and mounts will remain as when multi-user.
  2. Back up your current system.
  3. Unmount all three partitions: /usr/local, /usr/obj, and /usr/src, with umount(8), if these are already mounted.
  4. Remove the /usr/src and /usr/obj entries from your /etc/fstab file. See fstab(5) if you have any questions about this file.
  5. Edit the disklabel, removing the "i" and "j" partitions, then increasing the size of the "h" partition to cover the newly freed space. Don't blindly rely on my example below, please review the disklabel(8) man page and the interactive editor commands.
    Code:
    # disklabel -E sd0
    Label editor (enter '?' for help at any prompt)
    > d i
    > d j
    > m h
    offset: [21552320]
    size: [8347936] *
    FS type: [4.2BSD]
    > q
    Write new label?: [y]
    #
  6. Increase the size of the /usr/local filesystem to match the new increased size of the partition with growfs(8), then mark the filesystem clean with fsck(8). As above, read the manual, don't trust this example I created for you:
    Code:
    # growfs sd0h
    We strongly recommend you to make a backup before growing the Filesystem
    
     Did you backup your data (Yes/No) ? Yes
    new filesystem size is: 5999104 frags
    Warning: 361024 sector(s) cannot be allocated.
    growfs: 11540.7MB (23635392 sectors) block size 16384, fragment size 2048
        using 57 cylinder groups of 202.47MB, 12958 blks, 25984 inodes.
    super-block backups (for fsck -b #) at:
     8707808, 9122464, 9537120, 9951776, 10366432, 10781088, 11195744, 11610400, 12025056, 12439712, 12854368, 13269024, 13683680, 14098336, 14512992,
     14927648, 15342304, 15756960, 16171616, 16586272, 17000928, 17415584, 17830240, 18244896, 18659552, 19074208, 19488864, 19903520, 20318176,
     20732832, 21147488, 21562144, 21976800, 22391456, 22806112, 23220768
    # fsck -p /dev/sd0h
    /dev/sd0h: 1 files, 1 used, 5815358 free (14 frags, 726918 blocks, 0.0% fragmentation)
    /dev/sd0h: MARKING FILE SYSTEM CLEAN
    #
At the moment, you aren't building the OS from source code, so this is a safe change. Should you determine later that you want to do this, you can back up your /home partition and restructure the 8.1GB there to recreate these partitions.

Last edited by jggimi; 27th December 2018 at 03:00 AM. Reason: added red highlights in the examples
Reply With Quote
  #8   (View Single Post)  
Old 27th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

Thanks so much, I shall work on this, have a fishing trip tomorrow but Friday will be good.
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
  #9   (View Single Post)  
Old 29th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

I'm going to cultivate some experience in conducting these operations with copies of an OpenBSD VM, before I make these changes to my OpenBSD desktop system.
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Old 30th December 2018
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

OK, operation's a success- thanks again!

I made a careless mistake at first, I just went down the list:

Code:
> d i
> d j
> m h
...and accidentally deleted "h" instead of modifying it. Added the "h" partition back in, then was back on track.
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Old 30th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Glad you got it working!
Reply With Quote
Old 1st January 2019
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

My "growfs" operation wasn't successful as it appears. Went to add another package and got:
Code:
/dev/sd0h on /usr/local: 12701746 bytes (missing 17469 blocks)
Dropped into -s mode to make another attempt, but am returning the following:

"growfs: we are not growing (2086984- >2086984)"

Hmmm.
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Old 2nd January 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Inspect your disklabel - I will guess that you missed the increase in size of your "h" partition. Above, in my example, you will see that I used an "*" character for the new size of "h". The disklabel(8) man page states, "At prompts that request a size, `*' may be entered to indicate the rest of the available space..."
Reply With Quote
Old 2nd January 2019
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

Quote:
Originally Posted by jggimi View Post
Inspect your disklabel - I will guess that you missed the increase in size of your "h" partition. Above, in my example, you will see that I used an "*" character for the new size of "h". The disklabel(8) man page states, "At prompts that request a size, `*' may be entered to indicate the rest of the available space..."
Thanks, I did read that but....it didn't register.

__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Old 2nd January 2019
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

Code:
smallbeigebox# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   82.9M    872M     9%    /
/dev/sd0k      8.0G    553M    7.0G     7%    /home
/dev/sd0d      1.7G   80.0K    1.6G     0%    /tmp
/dev/sd0f      1.8G    704M    1.1G    39%    /usr
/dev/sd0g      978M    189M    741M    20%    /usr/X11R6
/dev/sd0h     11.1G    3.7G    6.8G    35%    /usr/local
/dev/sd0e      2.6G   45.2M    2.4G     2%    /var
Much better, I can install packages again!
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume Control (in Java) mattthumper Programming 1 6th August 2015 03:23 PM
Systray Audio Volume control shep OpenBSD Packages and Ports 2 30th April 2013 02:29 PM
log from rc.conf.local and rc.local sdesilet OpenBSD General 1 21st January 2010 02:37 AM
MS DOS volume labels? bigearsbilly FreeBSD General 2 1st April 2009 10:50 PM
mplayer volume cannot increase. bsdnewbie999 OpenBSD General 3 19th June 2008 03:16 PM


All times are GMT. The time now is 08:47 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick