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".
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.