Thread: Resizing /usr
View Single Post
  #8   (View Single Post)  
Old 18th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Step-by-step instructions for "resizing" /usr, using /home as a temporary storage facility. Warning: This is just typed up here for your convenience, just now. I have not -tested- this procedure as written, and may have made a mistake. Or two. Hint: If you blindly copy/paste these commands without understanding them, you are likely to get into trouble.
  1. Boot in single user mode. At the boot> prompt, enter "-s".
  2. Back up the existing /usr. It is assumed that /usr and /tmp and /home are defined in fstab(5):
    1. # mount /tmp
    2. # mount /home
    3. # dump -0af /home/usr.dump /usr
  3. Delete and recreate your /usr partition using disklabel(8) and newfs(8). This assumes you have the desired free space, and that the existing partition is on wd1d:
    1. # disklabel -E wd1
    2. d d
    3. a d
    4. [select your starting LBA]
    5. [select your size]
    6. [press ENTER to take the default FFS partition type]
    7. q
    8. # newfs wd1d
  4. Restore /usr from backup
    1. # mount -o async,noatime /dev/wd1d /usr
    2. # cd /usr
    3. # restore -rf /home/usr.dump
    4. # rm restoresymtable
  5. Reboot
    1. # reboot

Last edited by jggimi; 18th November 2010 at 02:30 PM. Reason: I had used gzip and gzcat when I wrote this. Sorry, but no, they're in /usr/bin and require /usr/lib.
Reply With Quote