0 Replies Latest reply: Nov 27, 2011 10:43 AM by 902354 RSS

    Clone internal disk(ufsdump) which has metadevice on external disk(sol 5.6)

    902354
      Dear IT Experts,

      I just help my friend. we planned to clone an internal disk of SUN Ultra 1 which is run using Solaris 2.6 (old).
      Actually, this system has one external disk which has created before using metadevice.
      The external disk (*/dev/md/dsk/d100 --> concatenation*) is used to save application data and connected to ultra 1 using SCSI device.

      Here is the vfstab content:

      +#device     device     mount     FS     fsck     mount     mount+
      +#to mount     to fsck     point     type     pass     at boot     options+
      +#+
      +#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr     ufs     1     yes     -+
      fd     -     /dev/fd     fd     -     no     -
      +/proc     -     /proc     proc     -     no     -+
      swap     -     /tmp     tmpfs     -     yes     -

      +/dev/dsk/c0t0d0s1     -     -     swap     -     no     -+
      +/dev/dsk/c0t0d0s0     /dev/rdsk/c0t0d0s0     /     ufs     1     no     -+
      +/dev/dsk/c0t0d0s6     /dev/rdsk/c0t0d0s6     /usr     ufs     1     no     -+
      +/dev/dsk/c0t0d0s4     /dev/rdsk/c0t0d0s4     /var     ufs     1     no     -+
      +/dev/dsk/c0t0d0s7     /dev/rdsk/c0t0d0s7     /export/home     ufs     2     yes     -+
      +/dev/dsk/c0t0d0s5     /dev/rdsk/c0t0d0s5     /opt     ufs     2     yes     -+
      +/dev/md/dsk/d100     /dev/md/rdsk/d100     /export/home/oak     ufs     2     yes     +-

      Running command "metastat" and "metadb -i" will give output :

      +# metastat+
      d100: Concat/Stripe    Size: 53031888 blocks    Stripe 0: (interlace: 64 blocks)        Device              Start Block  Dbase        c0t2d0s7                   0     No        c0t3d0s7                   0     No        c0t4d0s7                   0     No
      +#+
      +# metadb -i+
      flags           first blk       block count
      a m  pc luo        16              1034            /dev/dsk/c0t0d0s3
      a    pc luo        1050            1034            /dev/dsk/c0t0d0s3
      a    pc luo        2084            1034            /dev/dsk/c0t0d0s3

      Running command "format" will give output :

      Current partition table (original):
      Total disk cylinders available: 2733 2 (reserved cylinders)+
      Part      Tag    Flag     Cylinders        Size            Blocks
      +0 root wm 0 - 134 100.20MB (135/0/0) 205200+
      +1 swap wu 135 - 307 128.40MB (173/0/0) 262960+
      +2 backup wm 0 - 2732 1.98GB (2733/0/0) 4154160+
      +3 unassigned wm 308 - 310 2.23MB (3/0/0) 4560+
      +4 var wm 311 - 580 200.39MB (270/0/0) 410400+
      +5 unassigned wm 581 - 985 300.59MB (405/0/0) 615600+
      +6 usr wm 986 - 2333 1000.47MB (1348/0/0) 2048960+
      +7 home wm 2334 - 2732 296.13MB (399/0/0) 606480+

      We try to clone disk using "ufsdump" command. The backup disk (cot1d0) capacity is like the capacity of original disk (c0t0d0) --> 2.1GB.
      Here is all the command that we have run:
      +# mount /dev/dsk/c0t1d0s0 /clone-root+
      +# cd /clone-root+
      +# ufsdump 0cf - /dev/rdsk/c0t0d0s0|ufsrestore -rf -+

      +# mount /dev/dsk/c0t1d0s3 /clone-s3+
      +# cd ../clone-s3+
      +# ufsdump 0cf - /dev/rdsk/c0t0d0s3|ufsrestore -rf - --> this command gave output "it is not ufsdump format"+

      # mount /dev/dsk/c0t1d0s4 /clone-var
      # cd ../clone-var
      # ufsdump 0cf - /dev/rdsk/c0t0d0s4|ufsrestore -rf -


      +# mount /dev/dsk/c0t1d0s5 /clone-opt+
      +# cd ../clone-opt+
      +# ufsdump 0cf - /dev/rdsk/c0t0d0s5|ufsrestore -rf -+


      +# mount /dev/dsk/c0t1d0s6 /clone-usr+
      +# cd ../clone-usr+
      +# ufsdump 0cf - /dev/rdsk/c0t0d0s6|ufsrestore -rf -+


      +# mount /dev/dsk/c0t1d0s7 /clone-export+
      +# cd ../clone-export+
      +# ufsdump 0cf - /dev/rdsk/c0t0d0s7|ufsrestore -rf+ -


      All dumping process were successfully done EXCEPT at /dev/rdsk/c0t0d0s3. It said that this partition is not in ufsdump format. I think because this partition is used as metadevice database.

      All dumping process were successfully done EXCEPT at /dev/rdsk/c0t0d0s3. It said that this partition is not in ufsdump format. I think because this partition is used as metadevice database.

      Afte install bootblk to c0t1d0s0, we tried to boot system using clone disk result (c0t1d0). We unplugged the original disk, and put the clone disk into target 0 slot (c0t0d0).
      While booting, it said that the meta database was broken and need to be repaired. we delete the metadb and re-create again --> # metadb -a -c3 -f /dev/dsk/c0t0d0s3.

      then REBOOT.

      But, after it, system won`t boot. the said that

      *"/dev/md/rdsk/d100" = no such device or address*
      */dev/md/rdsk/d100 /dev/dsk/c0t0d0s5 /dev/dsk/c0t0d0s7 = can`t check file system*
      please run fsck manually"

      we have run command "fsck". but the problem still there. System can`t boot. :-(

      But, while we put the original disk back, the system can run normally.

      Is there any steps that we are missing? Kindly need your help, please....we stuck. No idea...please response

      Thank you for any help and suggestion

      regarads,

      ferianto