Cloning the root drive - Help Plz


 
Thread Tools Search this Thread
Operating Systems Solaris Cloning the root drive - Help Plz
# 1  
Old 08-21-2008
Cloning the root drive - Help Plz

I use Sunfire V480R , and i am seeing lot of scsi transport errors for the root drive & i think it is going to die . the system is having 2 drives & the second drive is kept unused . can someone guide me how do i clone the root drive to the seconddrive and make that bootable .
# 2  
Old 08-21-2008
the best thing would be the "ufsdump" and "ufsrestore" command... another option is the flasharchive. have a look at the manpage of "flarcreate".
# 3  
Old 08-21-2008
will ufsrestore make the 2nd drive bootable ? heard that dd command also helps in cloning the root drive ... how do we use dd for root drives ? do we need to be in single user mode ?
# 4  
Old 08-21-2008
As DukeNuke wrote, the siblings ufsdump/ufsrestore are your friends.
I don't know the commands by heart, and I haven't got a Solaris box in reach right now.
So I may be wrong.
But first after having plugged in the new drive (run devfsadm -c disk) you will have to copy the VTOC.
If I remember correctly the command for this is fmthard (a bit misleading as it only writes the volume table of contents and doesn't format).
Please look up man fmthard, because you can pipe output from prtvtoc of your moribund drive right into fmthard to the new drive.
Then you will have to write the boot header.
I think the command was installboot. Again look up its manpage
because you have to give it the correct image for your platform (e.g. Sparc vs. IA).
There are examples in the manpage.
Then you need to create filesystems on each mountable partition (or slice in BSD/SunOS jargon).
Use newfs for that.
Then create mount points (mkdir) and mount the new filesystems of the slices.
Before you run the ufsdump, especially on / and /var (if these are separate FS)
you would normaly have to init to single user mode.
But UFS can make filesystem snapshots (damn forgotten the command, google or see man -k snap if you have a whatis created)
Then you mount the snapshot of / and ufsdump from there.
Of course on SDS, SVM, VxVM managed devices the whole procedure is totally different.
Btw, I would suggest that you mirror your system disks with SDS or SVM which are free Solaris tools.
# 5  
Old 08-21-2008
svm/sds will not help... you need a free slice for the metadb... after cloning the drive setting up a mirror should be the next step.
i forget about one tool that might be usefull also. liveupgrade! read the manpage of "lucreate" and also check http://docs.sun.com for realy good infos about liveupgrade.
# 6  
Old 08-22-2008
You can use dd if you want to. But it will copy the data and "all other stuff" including those bad blocks etc that exists in your current boot disk. Your disks should be of the same geometry also.
But ufsdump copys only your data which is 100% clean. you can restore the data in the partitions you create in your new(2nd) disk then installbootblk to make it bootable Smilie
# 7  
Old 08-22-2008
I believe this is what needs to be done. someone please correct this if it is wrong.

1. you need to run below in order to copy over the disk geometry and partitioning:
Code:
prtvtoc /dev/rdsk/c?t?d?s2 | fmthard -s - /dev/rdsk/c?t?d?s2

2. restore from backup.

3. you need to run below in order for the new disk to be bootable:
Code:
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c?t?d?s?

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