15385 Resizing /usr - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1  
Old December 22nd, 2009, 00:56
hitchup hitchup is offline
Junior Member
 
Join Date: Nov 2009
Posts: 30
Thanks: 6
Thanked 0 Times in 0 Posts
Default Resizing /usr

Portupgrades have left my system bumping up against the limit of space in /usr. I am running freeBSD as a virtual box guest. I have virtual box set to auto resize however, that doesn't increase the size of /usr.

How can i increase the size of /usr? I have read several posts and am still not sure how to continue.

Last edited by hitchup; December 24th, 2009 at 15:55.
Reply With Quote
  #2  
Old December 22nd, 2009, 01:13
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,714
Thanks: 1
Thanked 310 Times in 250 Posts
Default

Check growfs(8).
__________________
May the source be with you!
Reply With Quote
  #3  
Old December 22nd, 2009, 10:56
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,852
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Move /usr/ports to it's own filesystem (with lots of room).
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #4  
Old December 22nd, 2009, 12:24
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

I second SD's suggestion...
Reply With Quote
  #5  
Old December 23rd, 2009, 00:19
fronclynne's Avatar
fronclynne fronclynne is offline
Senior Member
 
Join Date: Feb 2009
Location: Lunch Time
Posts: 1,297
Thanks: 132
Thanked 166 Times in 143 Posts
Default

Quote:
Originally Posted by SirDice View Post
Move /usr/ports to it's own filesystem (with lots of room).
or move /usr/local, & symlink /usr/ports to /usr/local/ports.

of course with a virtual machine it shouldn't be a huge deal to mount a second virtual hard drive, make the new partitions the sizes you want, dump | restore to the new virtual drive (set up the boot code &cet obviously), & restart with the new virtual drive.
__________________
Quid habemus reliquum?
Nutrimentum anatum!

Внимание: лифт вниз не поднимает
Reply With Quote
  #6  
Old December 23rd, 2009, 03:50
hitchup hitchup is offline
Junior Member
 
Join Date: Nov 2009
Posts: 30
Thanks: 6
Thanked 0 Times in 0 Posts
Default

I have an additional 6+GB(unused) on drive ad0, I have unsucessfully tried to add slice s2 using sysinstall. It fails on Write in that ad0s1 is in use and can't be written to(i think). I desire to add this as an additional file system and assign it a mount point say /usr/local and then mkdir ports and move the contents of /usr/ports to it and then symlink to it from /usr/ports.

How do I add the slice so that it persists? Is my logic correct?

Thanks
Reply With Quote
  #7  
Old December 23rd, 2009, 07:17
fronclynne's Avatar
fronclynne fronclynne is offline
Senior Member
 
Join Date: Feb 2009
Location: Lunch Time
Posts: 1,297
Thanks: 132
Thanked 166 Times in 143 Posts
Default

Quote:
Originally Posted by hitchup View Post
I have an additional 6+GB(unused) on drive ad0, I have unsucessfully tried to add slice s2 using sysinstall. It fails on Write in that ad0s1 is in use and can't be written to(i think). I desire to add this as an additional file system and assign it a mount point say /usr/local and then mkdir ports and move the contents of /usr/ports to it and then symlink to it from /usr/ports.

How do I add the slice so that it persists? Is my logic correct?

Thanks
Sounds fine, you need to do # sysctl kern.geom.debugflags=16 before you can edit the boot disk.
__________________
Quid habemus reliquum?
Nutrimentum anatum!

Внимание: лифт вниз не поднимает
Reply With Quote
  #8  
Old December 23rd, 2009, 23:03
hitchup hitchup is offline
Junior Member
 
Join Date: Nov 2009
Posts: 30
Thanks: 6
Thanked 0 Times in 0 Posts
Default

I goofed.

I added the new partition ad0s2d to fstab.

It is detecting an error. No Superblock found.

How can I recover? The file system comes up read only and I can't invoke any editors.
Reply With Quote
  #9  
Old December 23rd, 2009, 23:37
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,852
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Quote:
Originally Posted by hitchup View Post
How can I recover? The file system comes up read only and I can't invoke any editors.
Standard procedure, see my signature

Code:
# fsck -y
# mount -u /
# mount -t ufs -a
# swapon -a
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
The Following User Says Thank You to SirDice For This Useful Post:
hitchup (December 24th, 2009)
  #10  
Old December 24th, 2009, 01:59
hitchup hitchup is offline
Junior Member
 
Join Date: Nov 2009
Posts: 30
Thanks: 6
Thanked 0 Times in 0 Posts
Default

@SirDice
Thanks, File system rw and edited fstab.
fsck -u:

Code:
/dev/ados2d
Cannot find file system superblock
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ufs: can't read disk label
Okay, How do make the label? And, make it persist?
Reply With Quote
  #11  
Old December 24th, 2009, 12:14
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,714
Thanks: 1
Thanked 310 Times in 250 Posts
Default

Using bsdlabel(8) and reading the handbook (especially section 18.3.2.1).

And yes, be very careful with these commands, read their man pages, check the options used and make sure you're writing to the device you want.
__________________
May the source be with you!
Reply With Quote
  #12  
Old December 24th, 2009, 15:59
hitchup hitchup is offline
Junior Member
 
Join Date: Nov 2009
Posts: 30
Thanks: 6
Thanked 0 Times in 0 Posts
Default

No longer working on this. Starting over. Messed up the partition table.
Reply With Quote
  #13  
Old December 24th, 2009, 19:53
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,714
Thanks: 1
Thanked 310 Times in 250 Posts
Default

Then you don't know partition tables can be edited entirely using # fdisk -u.
__________________
May the source be with you!
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
[Solved] resizing myusr partition to make space for /var mista_tongz General 8 October 7th, 2010 21:54
[Solved] /usr full janroc General 11 July 8th, 2010 08:13
resizing partitions/slices or replace FreeBSD Mike_MT General 11 July 27th, 2009 09:13
[Solved] move /usr fs to other disk cx1964 Installing & Upgrading 10 May 9th, 2009 11:46
how to extend the /usr partition coolatt Installing & Upgrading 2 March 31st, 2009 19:27


All times are GMT +1. The time now is 15:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0