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!

no more room in /usr

Status
Not open for further replies.

asome

Technical User
Mar 19, 2001
3
US
Hi,

I am running solaris 8. My /usr partition is almost to capacity. I have another partition, /export, that contains alot of free space. Does anyone know how I can swap partition with /usr and /export partition.
 
Assuming "/" as /dev/dsk/c0t0d0s0, "/usr" as /dev/dsk/c0t0d0s2 and "/export" as /dev/dsk/c0t0d0s6, you may change to reflect yours...
halt the machine and boot from cdrom into single user, from ok prompt:
ok boot cdrom -s
mount "/" and "/usr"
# mount /dev/dsk/c0t0d0s0 /mnt
# mount /dev/dsk/c0t0d0s2 /mnt/usr
backup both file systems to tape: (don’t forget NO rewind option), first export data:
# ufsdump 0f /dev/rmt/0n /dev/rdsk/c0t0d0s6
then usr data:
# ufsdump 0f /dev/rmt/0n /dev/rdsk/c0t0d0s2
ensure that both backups are okay ...
create a new file system on export:
# newfs -m 1 /dev/rdsk/c0t0d0s6
mount export:
# mount /dev/dsk/c0t0d0s6 /mnt/export
copy data from "/usr" to "/export"
#ufsdump 0f - /dev/rdsk/c0t0d0s2 | (cd /mnt/export;ufsrestore xf -)
change "/etc/vfstab" to reflect new "/usr"
# ksh –o vi
# export TERM=vt100
# vi /mnt/etc/vfstab
.... exchange devices comment the mount for old usr (new export)
e.g from:
/dev/dsk/c0t0d0s2 /dev/rdsk/c0t0d0s2 /usr ufs 1 no -
to:
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -
and
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /export ufs 1 no
to
#/dev/dsk/c0t0d0s2 /dev/rdsk/c0t0d0s2 /export ufs 1 no
save changes.
reboot machine to verify if everything is okay ...
# sync;sync;reboot
now if everthing is okay create a new file system on new "/export" (old usr)
# newfs -m 1 /dev/rdsk/c0t0d0s2
mount it on "/export":
# mount /dev/dsk/c0t0d0s2 /export
restore export data from tape and uncomment mount point for export from "/etc/vfstab".

Hope it helps,

Regards,

Carlos Almeida,
 
Another way of making room fast is to move some of the subdirectories under /usr to another file system and then create a symbolic link to it.

Tehn when you have the time, do as Carlos says.
 
Hello,

Just curious...should I feel comfortable using the
process involving the tape backup for modifying (growing)
the / file system or slice. Also, what / directories could I move and link for now? Maya Roselip - True Data Storage Networks Inc. - New York City
Premier CA VAR, Arcserve Training Center, StorageTek Dealer
Maya.Roselip@TrueDataSAN.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top