Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving /usr ...how?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a E250 running 2.6 where /usr filled up. I dropped a new disk in the chassis, formatted it, broke it into 3 slices, and ran newfs on the slices. I can mount any or all of them, currently I want 2 as spares and one as /usr.

I know how to edit /etc/vfstab and all, but I need a good method for transferring all the files on the existing /usr to the new (currently /mnt/temp1).

I have tried cp -rp but it has issues on some funny links somewhere under /usr. I was thinking using dd, but dd if=/usr of=/mnt/temp1 does not work, nor does dd if=/dev/dsk/c0t0d0s5 of=/dev/dsk/c0t9d0s0

Any pointers would be extremely helpful... thanks!
 
Moving /usr is a little tricky. There can be other better methods. Here's one Solution:

1. Boot the system thro ur CDROM.
2. Ignore the system installation prompts & open a command window
3. mount original /usr paritition & the new partition you want to use on temporary mount points.
4. use ufsdump | ufsrestore to copy over the filesystem onto the new partition
5. modify vfstab to reflect the change of /usr partition
6. Reboot the system to have the new /usr.

The above method, I feel, is the safest one.

My $.02
 
Yeah, actually I found and figured out ufsdump and restore right after posting this question. I dumped to one of the spare partitions on the new drive and restored to the slice intended to become /usr

Once I verfied that everything copied, I mad a quick /util dir with important commands like ls, mount, and umount. I changed vfstab to point /usr at the new drive and slice. When I rebooted the system came up without any issues at all.

Before:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s5 482455 482400 55 99% /usr

After:
/dev/dsk/c0t9d0s0 2877268 432357 2387366 16% /usr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top