Solved

How best to copy a boot hard drive?

Posted on 1998-11-11
3
238 Views
Last Modified: 2013-12-16
I am using solaris 2.5.1 x86 and would like to make a mirror copy of my main hard drive (it has /, /usr,/tmp,etc., on it).

I would like to know how best to make a copy of this drive, so that if the one running the system crashes, I can jsut throw the copied drive in there and fire the machine up again.  These are SCSI drives in a Dell 4200.

I don't want to use 'ufsdump' because it requires the drive to be unmounted, and these sytems can't be taken down for long periods of time - do maybe 'dd' would work?

Anyway, a detailed response would be appreciated, including how to make the drive bootable, and what order I need to take to get the os to recognize the blank drive, do I need to format it if its going to be an exact duplicate of the drive I want to copy, etc...

Thanks in advance,

racy
0
Comment
Question by:racy
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 1812316
dd bs=1024 count=xxx if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

where xxx is the disksize in kbytes.
Don't forget to adjust the device names ;-)
0
 

Author Comment

by:racy
ID: 1812317
So just a couple more questions on this and I'll be done with it...I am assuming that 'dd' can be used while the machine is running and not screw anything up?  Also, I have used 'dd' before and seem to recall that the permissions on the copied drive where strange...is there a way that I can prevent this?

And, lastly is ther a way to get the OS to recognize the disk without having to do a boot -r or b -r and shutdown the computer?

Thanks again
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812318
dd just copies bytes, nothing more or less.
So it does not know anything about permissions, nor files or directories (in the data). You just need access to source and destination (wether they are devices and/or files).

To mount disks without rebooting (cold start !) is somehow unsupported. This is not a problem of the OS, but the hardware part. If you have a SCSI bus which allows "hot-plugging", then it's not a problem. Check your manuals.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now