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 20th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default (SOLVED)Can all the "usr" partitions be merged ?

Code:
$ df -h                                                                                        
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a      214M   39.4M    164M    19%    /
/dev/wd0l      2.2G    320M    1.8G    15%    /home
/dev/wd0d      334M   12.0K    318M     0%    /tmp
/dev/wd0f     1019M    365M    603M    38%    /usr
/dev/wd0g      585M    175M    381M    31%    /usr/X11R6
/dev/wd0h      2.2G    639M    1.5G    29%    /usr/local
/dev/wd0k      1.4G    2.0K    1.3G     0%    /usr/obj
/dev/wd0j      1.0G    2.0K   1007M     0%    /usr/src
/dev/wd0e      432M    6.2M    404M     2%    /var
/dev/wd0i      9.3G    3.8G    5.5G    41%    /mnt/C
I want to merge all the /usr/* partitons into just one partition. Is it possible ?

Sincerely!

Last edited by sw2wolf; 22nd August 2012 at 11:29 PM.
Reply With Quote
  #2   (View Single Post)  
Old 20th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by sw2wolf View Post
Is it possible ?
If you have allocated all disk space on the drive, the answer is "no".
Reply With Quote
  #3   (View Single Post)  
Old 20th August 2012
emigrant emigrant is offline
New User
 
Join Date: Aug 2012
Posts: 5
Default

only reinstall system imho
Reply With Quote
  #4   (View Single Post)  
Old 20th August 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Without any spare space, you may be able to back up each /usr partition and then reconfigure and restore. You would need to plan carefully -- for example, during this procedure you would want to execute in single-user mode, or boot from another drive, as none of the libraries in /usr/lib or any utilities in /usr/bin, /usr/sbin, or /usr/libexec would be available during the time /usr was unmounted. Most applications will not run without /usr.

Your "df" output does not show the physical location of each partition on wd0; you will need to review the drive's disklabel(8) to properly plan such a reconfiguration.

If the system has a CD or DVD drive, you may find the link in my signature helpful for running an alternate system while reconfiguring your /usr partitions.

Last edited by jggimi; 20th August 2012 at 01:51 PM. Reason: added /usr/lib.
Reply With Quote
  #5   (View Single Post)  
Old 20th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

thanks for all your answers ! i will plan it carefully.

Best Regards!
Reply With Quote
  #6   (View Single Post)  
Old 22nd August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

I want to delete the partitions for /usr/src and /usr/obj because i donot compile source file. And all those space will be given to /home. (Of course i backup the /home first to /mnt/C).
Code:
         size            offset
 j:      2210304      30131040  4.2BSD   2048 16384    1 # /usr/src
 k:     2888736     32341344   4.2BSD   2048 16384    1 # /usr/obj
 l:      4643520      35230080  4.2BSD   2048 16384    1 # /home
After using disklabel -E wd0, i get (2210304+2888736+4643520=9742560):
Code:
j:    9742656         30131040  4.2BSD   2048 16384    1 # /home
So far so good, but why the /home space even smaller than before ?
Code:
 df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a      214M   39.4M    164M    19%    /
/dev/wd0j      1.0G    291M    716M    29%    /home
/dev/wd0d      334M   12.0K    318M     0%    /tmp
/dev/wd0f     1019M    365M    603M    38%    /usr
/dev/wd0g      585M    175M    381M    31%    /usr/X11R6
/dev/wd0h      2.2G    639M    1.5G    29%    /usr/local
/dev/wd0e      432M    6.3M    404M     2%    /var
/dev/wd0i      9.3G    3.9G    5.4G    42%    /mnt/C
Sincerely!
Reply With Quote
  #7   (View Single Post)  
Old 22nd August 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I will guess that the "j" partition was not reformatted with newfs(8) prior to restoring. It was still the original 1G empty partition for /usr/src. Changing the partition does not change the filesystem.

You can either reformat and restore, or, you could use growfs(8) to increase the size of the filesystem to match the current partition size.
Reply With Quote
  #8   (View Single Post)  
Old 22nd August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

Quote:
Originally Posted by jggimi View Post
I will guess that the "j" partition was not reformatted with newfs(8) prior to restoring. It was still the original 1G empty partition for /usr/src. Changing the partition does not change the filesystem.

You can either reformat and restore, or, you could use growfs(8) to increase the size of the filesystem to match the current partition size.
Yes, that is it! thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

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
How to replace "ectags" with "ctags"? fender0107401 OpenBSD Packages and Ports 5 16th April 2013 10:01 AM
Where should I put my config? "rc.conf" or "rc.conf.local"? fender0107401 OpenBSD General 2 2nd April 2012 02:53 AM
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM
"Thanks" and "Edit Tags". diw Feedback and Suggestions 2 29th March 2009 12:06 AM
Scripted sysinstall fails with "Command 'system' failed" PeterSteele FreeBSD Installation and Upgrading 0 13th November 2008 11:31 PM


All times are GMT. The time now is 06:50 AM.


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