The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
Google UNIX.COM


UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
big disk solaris 2.6 malcqv SUN Solaris 13 06-30-2008 04:14 AM
clone solaris hassan1 SUN Solaris 1 06-29-2007 12:04 AM
Disk Mirror in Solaris 9 via Solaris Volume Manager deal732 SUN Solaris 3 05-02-2007 08:43 AM
clone disk stamperr Filesystems, Disks and Memory 1 02-06-2007 07:35 AM
Clone disk for Sun Blade 2000 rioria SUN Solaris 1 08-11-2006 04:43 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 06-11-2002
Registered User
 

Join Date: Jun 2002
Location: Denmark
Posts: 1
Lightbulb Mirroring a disk

Of course, with unix there is always another way if you donot have veritas or disksuite.

Verify that both disk are partitioned alike by using
the format command then choose verify to see the
partitions.

Then if they are alike...

dd if=/dev/rdsk/c0t0d0s0 of=/dev/rdsk/c1t0d0s1

would copy the contents of slice0 on disk0 to slice0 on disk1.
Repeat this for each slice or for each slice that you want mirrored. Of course, the root slice is the most important. After you are done mirroring...try booting off of the mirrored disk...with

boot disk1

from the OK prompt after doing a init 0.

I have done this many times without issues, apart from alittle time to run dd...it works.

Happy mirroring!
Reply With Quote
Forum Sponsor
  #9  
Old 05-25-2005
Registered User
 

Join Date: May 2005
Posts: 2
Shane

a simple way to do this is via dd and copying the backup slice, usually slice 3.

boot the system in single user mode from a cd.

if disk one is c0t0d0 ( source)
and disk two is c0t1d0 ( target)

then the command would be ....
dd if=/dev/rdsk/c0t0d0s3 of=/dev/rdsk/c0t1d0s3 bs=2000b

rob.

Quote:
Originally Posted by obosha
could anyone give me a general idea of how i may clone a 2 Gig disk running Solaris 7 on it to another disk of the same size?

currently, this system only has one disk in it though. i do have the ability to hook up another disk via SCSI.

i have been told i need to boot to "miniroot" to run "dd," but how can i do this? i have searched for help on miniroot but have found nothing that has helped so far. thanks in advance!

shane
Reply With Quote
  #10  
Old 05-26-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
try this one ... should work on any solaris ... (assumes source disk disk0 is c0t0d0 and disk1 is c0t1d0) ... you might also want to add code to modify the /etc/vfstab automatically so you can quickly boot-up with the 2nd disk --- i'll let you handle that part ... test on useless system first though just to be safe ...
Code:
#! /bin/ksh

prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
partlist=$(prtvtoc /dev/rdsk/c0t0d0s2 | awk '!/\*/ {print $1}')

for p in $partlist
do
    if [ "$p" != "1" -a "$p" != "2" ]
    then
        newfs /dev/rdsk/c0t1d0s$p < /dev/null
        mount /dev/dsk/c0t1d0s$p /mnt
        cd /mnt
        ufsdump 0uf - /dev/dsk/c0t0d0s$p | ufsrestore rf -
        cd /
        umount /mnt
    fi
done

mount /dev/dsk/c0t1d0s0 /mnt
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
umount /mnt

exit 0

Last edited by Just Ice; 08-10-2005 at 07:02 AM. Reason: saw something that could be a problem
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0