Cloning the root drive - Help Plz


 
Thread Tools Search this Thread
Operating Systems Solaris Cloning the root drive - Help Plz
# 8  
Old 08-22-2008
The OP said that the drive is already available. If the drives are identical, I too would use a dd command. This will copy the partition table and the boot block. The 2nd drive will end up thinking it is the first drive. So you would need to switch drives to use it.

First, boot the install cd in single user mode. From the OK prompt:
boot cdrom -s

Then some command like:
dd if=/dev/rdsk/c1t0d0s2 bs=65536 of=/dev/rdsk/c1t1d0s2

When this completes, power off, remove the first drive, move the 2nd drive to the first drives slot and reboot.
# 9  
Old 08-22-2008
Perderabo - would you still need to run installboot to get the device bootable or does dd already satisfy this?
# 10  
Old 08-23-2008
Quote:
Originally Posted by pupp
Perderabo - would you still need to run installboot to get the device bootable or does dd already satisfy this?
you don't need installboot after the dd.
# 11  
Old 08-23-2008
Quote:
Originally Posted by DukeNuke2
you don't need installboot after the dd.

Right. That is why we are using slice 2, devices that end in "s2". If your partition tables are correct, slice 2 is the entire user accessible disk. dd will make an exact copy of the disk. It is critical that the disks be the same model.

By the way, I once benchmarked various values for the bs= parameter and found that 65536 was optimal. Other values will slow you down.
# 12  
Old 08-24-2008
Thats why because of precautions, checks and measures to be taken, ufsdump is much faster, easier and safer. Smilie
# 13  
Old 08-24-2008
Quote:
Originally Posted by incredible
Thats why because of precautions, checks and measures to be taken, ufsdump is much faster, easier and safer. Smilie
indeed Smilie
# 14  
Old 08-24-2008
Quote:
Originally Posted by incredible
Thats why because of precautions, checks and measures to be taken, ufsdump is much faster, easier and safer. Smilie
I must disagree. ufsdump works only with ufs filesystems. ufsrestore will not render a disk bootable, copy the partition table, or deal with any slices not containing ufs filesystems. A lot of analysis is needed to clone a disk piecemeal. If you really find a single dd command more complex than prtvtoc, fmthard, installboot, and several invocations of ufsdump and and newfs and ufsrestore, ok, I will take you at your word. But what if you have this task to perform on an HP-UX system, a Solaris system, an SCO system, and a Linux system. Each of these these systems needs a cloned root disk and each may or may not be partitioned and the partitions may or may not contain the local equivalent of a McKusick filesystem. Now which is easier? The dd is conceptually very easy and does not depend on intimate knowledge of the particular unix flavor or disk layout. This makes it attractive to someone without a great deal of Solaris knowledge... such as a person who might post the question in the first place.

If the disk is dominated by mostly empty ufs filesystems and/or the swap slice, then your way probably will be faster for larger disks. But for a 72 GB or smaller disk, like you might find on an old V480, you will need to hustle to beat the dd.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Cloning an empty sever (except OS) onto a smaller drive?

Actually this is a Centos 6.x question, but I think it fits here. I have a client that has a pretty beefy server that will be running all sorts of VMs once I unleash it to the developers. For several reasons, they would like to do a complete clone of the server as is right now, that is with just... (2 Replies)
Discussion started by: xdawg
2 Replies

2. Ubuntu

Cannot access or boot encrypted drive (gave up waiting for root device...)

I cannot access or boot from my C drive. I'm running Zorin 9 and the drive is a Samsung SSD. The disk was encrypted on install, and that has not given me any problems before. When I start the system it gets to the memory test page, and does not then load the password prompt, which it used to.... (1 Reply)
Discussion started by: David4321
1 Replies

3. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

4. Solaris

How to check at which drive root FS is?

Dear Gurus, Could you please help me? After problems with power supply, our server was done. While trying to boot it with "boot" command, I am getting message: {3} ok boot Boot device: /pci@8,600000/SUNW,qlc@2/fp@0,0/disk@w5000cca0043b59fd,0 File and args: Boot load failed. The file... (7 Replies)
Discussion started by: nypreH
7 Replies

5. UNIX for Dummies Questions & Answers

cloning ATAPI drive, SunOs 5.7

I'm trying to image one hard drive to another using SunOs 5.7. I think I've read all of the forum entries that relate to my questions, but I do not find an effective solution to the problem. after I verified my drives had the same geometry and did my analyze to resolve original read errors on... (0 Replies)
Discussion started by: nix8me
0 Replies

6. Shell Programming and Scripting

Root owns removable drive and rsync won't work

I'm using rsync to back up to a usb key rsync -r -t -v -a /home/pc/AGS/ /media/DIESEL/pc/AGS/ It worked fine for a long time, and then not so good. Running from the command line there are a lot of complaints about 'can't chgrp ...'. It's formatted to fat32 so I can read it in all kinds of... (0 Replies)
Discussion started by: triplemaya
0 Replies

7. Solaris

safeguarding root drive

I have root drive which i want to guard against possible hard disk loss. How can backup and restore the all user created , filesystem , mount points , meta devices if at all there be hdd failure . Any pointer to good document would be good help . Ours is solaris 8 . (1 Reply)
Discussion started by: Hitesh Shah
1 Replies

8. Solaris

how to ufsrestore root drive then activate disksuite

I restored a backup of a root drive to a new disk on Solaris 8 which contained a fully functioning disksuite 4.2.1 mirror configuration. The backup is from an identical system and OS. I want to install a second identical disk and recover the mirror configuration. The root disk is up but... (2 Replies)
Discussion started by: csgonan
2 Replies

9. UNIX for Dummies Questions & Answers

Defining a fiber attached tape drive NEED HELP PLZ!

I am new to Unix and I need to install a LTO2 3580 drive that is attached to a 3584 library. How do I define this drive in AIX 5.2 I have already zoned the drive can anyone help me out with? Any help on this would be much appreciated. Thank You, PTALLY (0 Replies)
Discussion started by: ptally
0 Replies

10. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
Login or Register to Ask a Question