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 14th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default Partitions and disk space

I do not understand much on the way the partitioning works on OpenBsd,
but it seems to me I am missing close to 300 gb, can anyone explain ?
Code:
# disklabel -h sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: HUA721075KLA330 

flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 91201
total sectors: 1465149168 # total bytes: 698.6G
boundstart: 64
boundend: 1465144065
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:             1.0G               64  4.2BSD   2048 16384 12958 # /
  b:             3.2G          2097216    swap                    # none
  c:           698.6G                0  unused                    
  d:             4.0G          8834240  4.2BSD   2048 16384 12958 # /tmp
  e:             9.9G         17222816  4.2BSD   2048 16384 12958 # /var
  f:             2.0G         38036832  4.2BSD   2048 16384 12958 # /usr
  g:             1.0G         42231136  4.2BSD   2048 16384 12958 # /usr/X11R6
  h:            10.0G         44328288  4.2BSD   2048 16384 12958 # /usr/local
  i:             2.0G         65299808  4.2BSD   2048 16384 12958 # /usr/src
  j:             2.0G         69494112  4.2BSD   2048 16384 12958 # /usr/obj
  k:           300.0G         73688448  4.2BSD   4096 32768 26062 # /home
It seems to me like I should have more available, for example the /home could be
500 gb,.. ? but how can I do that ?
When I installed , I used the entire drive (Whole), it is actually 750 gb,....
If any additional info is needed please ask,..
Thanks,..
__________________
My best friends are parrots

Last edited by PapaParrot; 14th May 2017 at 09:49 AM. Reason: mispelled title
Reply With Quote
  #2   (View Single Post)  
Old 14th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Actually , I should have looked here: https://www.openbsd.org/faq/faq14.html
first , before asking this, and also before installing.
__________________
My best friends are parrots
Reply With Quote
  #3   (View Single Post)  
Old 14th May 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

You are not the first. I did the same thing the first time I installed. I used the whole disc, which was a terabyte, but only had a 400MB system.
Reply With Quote
  #4   (View Single Post)  
Old 15th May 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

Is the OpenBSD disklabel actually applied across the whole device?

Please post the output of:

# fdisk sd0

Did the totals show up in the installer as you have posted here?

There is an option to adjust the partition sizes during the installation process and it works rather well.
Reply With Quote
  #5   (View Single Post)  
Old 15th May 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

The 300GB maximum for /home is the default for disks over 7GB. See the AUTOMATIC DISK ALLOCATION section of disklabel(8).
Reply With Quote
  #6   (View Single Post)  
Old 15th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thanks for the replies, after I looked at the manual and faq , I realized if I had read it before installing, I would have done things a little different, IE : 500gb for the /home.
Here is the output as requested:
Code:
# fdisk sd0 
Disk: sd0       geometry: 91201/255/63 [1465149168 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
*3: A6      0   1   2 -  91200 254  63 [          64:  1465144001 ] OpenBSD
Quote:
H_O_A_S>>Is the OpenBSD disklabel actually applied across the whole device?
I am not sure on that,...
Quote:
There is an option to adjust the partition sizes during the installation process and it works rather well.
I should have done that, I guess I was to "hasty",...excited about installing the new system,...

Quote:
jiggimi >>The 300GB maximum for /home is the default for disks over 7GB. See the AUTOMATIC DISK ALLOCATION section of disklabel(8).
I remember reading this now,...but forgot when I was installing,...
I am seeing I have a lot of "unused", space. In the past since it (OpenBsd) was on a VM, and the virtual drive was only 150 gb, it was a non-issue,..... I should be able to resize the
partitions.
I best try to this before I do anything else, at this point I don't have much installed, and
practically no files, etc. so if something goes wrong it will be no big deal to re-install.
Thanks again on the replies.
__________________
My best friends are parrots
Reply With Quote
  #7   (View Single Post)  
Old 15th May 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Just use growfs(8), as described in the faq chapter you mentioned.
Reply With Quote
  #8   (View Single Post)  
Old 15th May 2017
bsd-keith bsd-keith is online now
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 345
Default

I always zap the recommended & partition disks how I want them.
(You don't even have to have a swap partition.)

Edit: If you are not running a server, that /var could also be reduced significantly.
__________________
Linux since 1999, & also a BSD user.

Last edited by bsd-keith; 15th May 2017 at 06:43 AM.
Reply With Quote
  #9   (View Single Post)  
Old 15th May 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

Quote:
Originally Posted by GarryR
Quote:
Originally Posted by HoaS
Is the OpenBSD disklabel actually applied across the whole device?
I am not sure on that,...
The posted fdisk output indicates that is the case; the default 300GiB limit for /home is the cause of your missing space, as mentioned above.
Reply With Quote
Old 15th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Ok, thanks again for the replies. I guess I need to use the install cd, and shell, like a "liveCD" to
do this,...I don't see any other way to unmount the /home parition
Code:
# cd /
# umount /dev/sd0k 
umount: /home: Device busy
__________________
My best friends are parrots
Reply With Quote
Old 15th May 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Welcome to Unix. There are two methods you can use to ensure /home is unmounted.
  1. Log off your user, who has a $HOME in /home, and log in as root, then # umount /home
  2. Drop to single-user mode, or boot into single-user mode, and then mount all partitions followed by umount of /home.
To drop to single user mode, you inform init(8). The system will shutdown all processes except init(), then leave you in a shell on the console. One can use shutdown(8) without options, or you can signal init() with # kill 1.


To boot into single-user mode, use the -s option at the boot> prompt. When booted in single user mode, only the root partition is mounted, and that in a temporary read-only mode. So issue # mount -a to mount all filesystems, as mentioned above, and then unmount /home.
Reply With Quote
Old 15th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thanks again,
That worked, pretty easy except I was confused because the size was shown as being
Code:
629145536
So I changed it to 829145536,... and now I have 95.4 gb more,...
Code:
k:           395.4G         73688448  4.2BSD   4096 32768 26062 # /home
It was :

Code:
  k:           300.0G         73688448  4.2BSD   4096 32768 26062 # /home
But anyway, now I have a basic understanding on how to do this, and it worked.
I can wait awhile on this now, that is plenty of space for now, and after I have been
using the system longer, and see how much space is being used on the other partitions,etc. I can adjust them as needed,...
Thanks
__________________
My best friends are parrots
Reply With Quote
Old 15th May 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

And the next time you install remember to add that * to /home. Such a little thing that makes such a big difference. Isn't OpenBSD fun?
Reply With Quote
Old 15th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Yes, actually it is , well I am not sure about "fun" but it is much simpler then what I am used to,...
I keep expecting the solutions to be very complicated , and so far they have been simple enough.
user-friendly I would say.
Years ago all I used was Dos and then my unix experiences were only accessing the server as a
normal user, so I never learned much about any of the "administrative" tasks, never did anything as root.

Which the same applies now, once I have everything setup the way want, I won't be doing anything
as root, most of the time,.. except maybe if and when I need to install a new package or something, similar.
Made another change , and now have :
Code:
 # disklabel -h sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: HUA721075KLA330 
duid: 7c45abe08beb4c01
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 91201
total sectors: 1465149168 # total bytes: 698.6G
boundstart: 64
boundend: 1465144065
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:             1.0G               64  4.2BSD   2048 16384 12958 # /
  b:             3.2G          2097216    swap                    # none
  c:           698.6G                0  unused                    
  d:             4.0G          8834240  4.2BSD   2048 16384 12958 # /tmp
  e:             9.9G         17222816  4.2BSD   2048 16384 12958 # /var
  f:             2.0G         38036832  4.2BSD   2048 16384 12958 # /usr
  g:             1.0G         42231136  4.2BSD   2048 16384 12958 # /usr/X11R6
  h:            10.0G         44328288  4.2BSD   2048 16384 12958 # /usr/local
  i:             2.0G         65299808  4.2BSD   2048 16384 12958 # /usr/src
  j:             2.0G         69494112  4.2BSD   2048 16384 12958 # /usr/obj
  k:           658.7G         73688448  4.2BSD   4096 32768 26062 # /home
I did do the 'growfs' as well, but what is still strange:
'df' shows something entirely different.
Code:
df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   53.5M    901M     6%    /
/dev/sd0k      298G   84.3M    283G     0%    /home
/dev/sd0d      3.9G   22.0K    3.7G     0%    /tmp
/dev/sd0f      2.0G    288M    1.6G    15%    /usr
/dev/sd0g     1005M    163M    792M    17%    /usr/X11R6
/dev/sd0h      9.8G    808M    8.6G     8%    /usr/local
/dev/sd0j      2.0G    2.0K    1.9G     0%    /usr/obj
/dev/sd0i      2.0G    2.0K    1.9G     0%    /usr/src
/dev/sd0e      9.8G   11.0M    9.3G     0%    /var
I did not get any errors, and it told me I needed to run 'fsck' like it also said in the manual,
and that ran fine, no errors, when it was done it told me to re-boot.
__________________
My best friends are parrots
Reply With Quote
Old 15th May 2017
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

Quote:
Originally Posted by GarryR View Post
I did do the 'growfs' as well
What was the exact command that you used?

Also, what was the exact output?

I have just tried to use growfs(8) on a (full) partition and the error message was pretty clear:
Code:
empty@Puffy:~ $ doas growfs sd0i
growfs: we are not growing (1048576->1048576)
1|empty@Puffy:~ $
Reply With Quote
Old 16th May 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thank H_O_A_S,

I would need to try it again, I did not think to write down the exact output, since there were no errors, and I am not sure, but I will try again and see what it says, I don't think it will
be accurate since it all ready was done, might be interesting to see though,..

I typed the command as :
Code:
 growfs sd0k
and then :
Code:
fsck sd0k
,...
and yes I was logged in as root, I just did not include the # here.
The resulting messages all indicated it went ok, ...
----- edited----updated--------
Now it did grow the file system, I am not sure what I missed on the first time.
This time the out put said , well first it told me that is is recommended that I have backed up the previous
file sysetm,...I said no, and it returned to the prompt.
Tried again, this time I lied, and said yes I had made a backup, and it said "growing file system",...
it took a while, and showed all the "blocks", when it was done, I ran fsck again, and rebooted,...now everything
is in order. :
Code:
$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1005M   53.5M    901M     6%    /
/dev/sd0k      653G   87.4M    621G     0%    /home *************** Ok now****
/dev/sd0d      3.9G   14.0K    3.7G     0%    /tmp
/dev/sd0f      2.0G    288M    1.6G    15%    /usr
/dev/sd0g     1005M    163M    792M    17%    /usr/X11R6
/dev/sd0h      9.8G    808M    8.6G     8%    /usr/local
/dev/sd0j      2.0G    2.0K    1.9G     0%    /usr/obj
/dev/sd0i      2.0G    2.0K    1.9G     0%    /usr/src
/dev/sd0e      9.8G   11.0M    9.3G     0%    /var
================
Code:
# disklabel -h sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: HUA721075KLA330 
duid: 7c45abe08beb4c01
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 91201
total sectors: 1465149168 # total bytes: 698.6G
boundstart: 64
boundend: 1465144065
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:             1.0G               64  4.2BSD   2048 16384 12958 # /
  b:             3.2G          2097216    swap                    # none
  c:           698.6G                0  unused                    
  d:             4.0G          8834240  4.2BSD   2048 16384 12958 # /tmp
  e:             9.9G         17222816  4.2BSD   2048 16384 12958 # /var
  f:             2.0G         38036832  4.2BSD   2048 16384 12958 # /usr
  g:             1.0G         42231136  4.2BSD   2048 16384 12958 # /usr/X11R6
  h:            10.0G         44328288  4.2BSD   2048 16384 12958 # /usr/local
  i:             2.0G         65299808  4.2BSD   2048 16384 12958 # /usr/src
  j:             2.0G         69494112  4.2BSD   2048 16384 12958 # /usr/obj
  k:           658.7G         73688448  4.2BSD   4096 32768 11888 # /home
Also when I use the file manager , "thunar",...it now shows 658 gb available.
Well actually a little more,(664gb) but it is close enough...
Thanks
__________________
My best friends are parrots

Last edited by PapaParrot; 16th May 2017 at 07:55 AM. Reason: up date
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
OS'es in outer space punk0x29a Off-Topic 11 12th March 2014 09:42 PM
those .core files do take up space .. daemonfowl OpenBSD General 4 12th September 2012 05:08 AM
Span Disk Space plexter OpenBSD Packages and Ports 8 20th November 2009 08:06 PM
Disk space gone missing EricM FreeBSD General 0 26th February 2009 02:25 AM
Disk geometry for Seagate disk phreud FreeBSD Installation and Upgrading 5 8th November 2008 10:51 PM


All times are GMT. The time now is 06:01 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