SUMMARY: Restoring file systems

From: Samsoo Kang (skang@gordian.phys.ttu.edu)
Date: Sun Feb 15 1998 - 11:07:50 CST


Hi sun-managers,

Sorry for the late summary. Here is my original question.

> Hi sun-managers,
>
> I posted this yesterday but somehow I received the half of that. So, I
> send this again. If you received this already, please be patient.
>
> I use Solaris2.6 and Sun Sparc20. I had to re-install Solaris2.6 and I
> wanted to restore all file systems from the tape. Below is the task when I
> dumped file systems to tape.
>
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t3d0s0 # backup (1) /
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t3d0s3 # backup (2) /opt
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t3d0s4 # backup (3) /var
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t3d0s5 # backup (4) /usr
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t3d0s6 # backup (5) /usr/openwin
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t5d0s0 # backup (6) /home
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t5d0s1 # backup (7) /www
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t5d0s3 # backup (8) /scratch1
> # ufsdump 0cf /dev/rmt/0n /dev/dsk/c0t5d0s4 # backup (9) /scratch2
>
> I re-installed Solaris and restored the file sytems as below.
>
>
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t3d0s0
> # cd /opt
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t3d0s3
> # cd /var
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t3d0s4
>
> For restoring /usr, I restored in another directory and copied all files.
>
> # cd /scratch1
> # mkdir usr
> # cd usr
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t3d0s5
> # mv * /usr/
>
> # cd /usr/openwin
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t3d0s6
> .
> .
> .
> # usfrestore rvf /dev/rmt/0n /dev/dsk/c0t5d0s4
>
> When I rebooted, it said there are some errors in devices
> /dev/dsk/c0t3d0s0, c0t3d0s5 ...). I continued with typing Ctrl-D. I could
> use CDE and log on root. I could send emails and I could use Netscape.
> However, I can't log on another user account. Even I made a new account
> but I could't log on with that account. I used fsck for root and /usr. It
> said there was a wrong superblock.
>
> Is the restoring procedure described above wrong?
>
> Thanks!
>
> Samsoo Kang
>

I got a couple of problems.

1. I didn' run installboot right after restoring file systems.
   Here is the suggestion from Noli Aurea.

   Samsoo,

   If you restore the / from tape you will need to intall the bootblock
   for youl will not be able to boot your system.

   Regards,

   Noli

2. Moving or copying files is not a good idea because /usr uses mv or cp
   command. I thought this was O.K. if I do this in single-user mode.
   But /usr is also mounted from booting. Here is the suggestion from
   Martin Huber.

   I would not replace /usr files of a 'living' system.
   Better:
   restore /usr to an empty partition
   change the /usr entry in /etc/vfstab to the new partition
   reboot the system. Now it uses the new /usr, and you can safely
   rm -rf or newfs to the old /usr, copy the new partiton to the old one
   and change /etc/vfstab back.

     --martin
 
Thanks you Noli and Martin. Also others gave me similar suggestions.
Thanks Derek Eichele, Ning Zhang, Jim Harmon, Ramindur Singh, Ray Trzaska.

Samsoo Kang



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:31 CDT