Sponsored Content
Full Discussion: Solaris 8 Clone - Help
Operating Systems Solaris Solaris 8 Clone - Help Post 302389187 by johnj1965 on Saturday 23rd of January 2010 07:48:54 AM
Old 01-23-2010
I'm pulling together the (df -k output) and will be posting it this morning. It's a standard solaris setup and both the ufsdump/ufsrestore and dd are giving me the same errors with /usr mentioned in my initial posting. The "/etc/vfstab" file is a clone from the boot drive and once the clone has finished I move the drive from slot 1 to slot 0, boot with the the following at the ok prompt: boot disk

Thanks,
John

---------- Post updated at 07:48 AM ---------- Previous update was at 07:07 AM ----------

Here is my "df -k" output:
Code:
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t0d0s0     962573  473998  430821    53%    /
/dev/dsk/c1t0d0s4    1984564 1466407  458621    77%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
swap                 9445136      24 9445112     1%    /var/run
/dev/dsk/c1t0d0s7    16861739 1985663 14707459    12%    /h
/dev/dsk/c1t0d0s5    3008649 2036753  911724    70%    /opt
/dev/dsk/c1t0d0s3     962573   17498  887321     2%    /tmp

Here is the script I'm using for the clone:
Code:
#!/bin/sh
#
#Use and distribute freely
#
#Define variables for use in the script
#! Important, these must be set correctly !
#

# The root disk to duplicate (leave off slice numbers and path)
SRC=c1t0d0

# The empty disk to duplicate it to (leave off slice numbers and path)
DEST=c1t1d0

# The directory to mount destination partitions on while duplicating
MOUNTDIR=/dup_0

# The file name of this script, to rename it on the destination to avoid execution
SCRIPT=/opt/local/etc/rootcopy

# The slices that should be copied
SLICES="s0 s3 s4 s5 s6 s7"

echo ===================================
echo Disk Copy script started `date`
echo

# Make sure the mount point for duplicate partitions exists

if [ ! -d $MOUNTDIR ]; then
mkdir $MOUNTDIR
chmod 700 $MOUNTDIR
fi

# Partition the duplicate disk, make filesystems, make it bootable

prtvtoc /dev/rdsk/${SRC}s2 > /tmp/vtoc
fmthard -s /tmp/vtoc /dev/rdsk/${DEST}s2
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${DEST}s0

# Modify the following loop to handle any special cases

for fs in $SLICES
do
 newfs /dev/dsk/${DEST}${fs} < /dev/null; mount /dev/dsk/${DEST}${fs} ${MOUNTDIR};
 ufsdump 0f - /dev/dsk/${SRC}${fs}|(cd ${MOUNTDIR}; ufsrestore rf -);
 if [ $fs = "s0" ]; then
  sed 's/${SRC}/${DEST}/g' /etc/vfstab > ${MOUNTDIR}/etc/vfstab;
  #mv ${MOUNTDIR}/${SCRIPT} ${MOUNTDIR}/${SCRIPT}.DONTRUN;
 fi
umount ${MOUNTDIR}
done

echo 
echo Disk Copy script ended `date`
echo =====================================
echo


Last edited by Scott; 01-23-2010 at 09:05 AM.. Reason: Code tags, PLEASE!
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

How do I clone Solaris 7 disk

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... (9 Replies)
Discussion started by: obosha
9 Replies

2. Filesystems, Disks and Memory

clone disk

Disk cloning I had an external SCSI master disk that I used to clone to an identical external SCSI disk because the other SCSI disk would become corrupted. My original Master became corrupted so I used one of the other to good disk to copy back to the master. Unfortunately the new master needs... (1 Reply)
Discussion started by: stamperr
1 Replies

3. Solaris

clone solaris

I have a Sun Solaris 9 and I would like to clone the Operating System from a sun4u Sun Fire 480R machine to a Sun Fire 280R machine. The disk is the same size, the 480R has no space disk slot to the 280R disk for mirrioring, i have no external disk, I am not allowed to take the machine down. ... (1 Reply)
Discussion started by: hassan1
1 Replies

4. Solaris

Clone scsi disc solaris 8

I have a SunOS 5.8 Generic_108528-29 sun4u sparc SUNW,UltraAX-i2, i have 2 scsi disk, the first with the S.O. and the second free. I read many in the forum about this: with single user, miniroot, dd, flarcreate, ufsdump and ufsrestore. Which is the best metod? If i clone the disk with... (6 Replies)
Discussion started by: tirher
6 Replies

5. Solaris

Backup / Clone Solaris Zone Issue

Hi, I'd like to discuss the subject of backing up / cloning Solaris zone. I was trying to clone zone A to zone B (Solaris 10 11/06: Cloning a Non-Global Zone on the Same System (System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones)). The first test... (7 Replies)
Discussion started by: aixlover
7 Replies

6. UNIX for Advanced & Expert Users

Clone mounts as is

Hello, Iam trying to clone AS IS two mounts like below /class_test/sa /class_dev/fd from one server onto another. I want to use tar and gzip to compress. Please let me know the options I have to use. Also I want to untar it in the destination server, so let me know how to do... (3 Replies)
Discussion started by: baanprog
3 Replies

7. Red Hat

Redhat Clone

What is the best method to use to clone a Redhat machine, to ensure all software and config can be easily installed on new hardware? Thank you! (3 Replies)
Discussion started by: da2013
3 Replies

8. UNIX for Dummies Questions & Answers

Clone redhat to another PC

Hi, I'm a new user of this forum and I'm not an expert of linux. I have a broken old pc with red hat linux, I clone hdd to another pc with different mainboard and it's ok but it has only one problem, the usb ports not work. In the boot this message appears: ... (9 Replies)
Discussion started by: aitv
9 Replies

9. Solaris

Need to Clone Solaris OS to another disk

Hi, I am trying to clone the hard disk image of Solaris OS on one disk to another disk. After some googling I found that there is a command "dd" to achieve this. However there is a condition to use the dd command, that the disk geometry of both the disks (source and target disks) should... (5 Replies)
Discussion started by: rajujayanthy
5 Replies

10. AIX

How to clone an AIX 5.3?

Hello all, I am trying to clone an entire aix 5.3 machine , not sure on the procedure.Can anyone help on what can be done ?Thanks (9 Replies)
Discussion started by: gull05
9 Replies
MLXCONTROL(8)						    BSD System Manager's Manual 					     MLXCONTROL(8)

NAME
mlxcontrol -- Mylex DAC-family RAID management utility SYNOPSIS
mlxcontrol <command> [args] mlxcontrol status [-qv] [drive] mlxcontrol rescan controller [controller ...] mlxcontrol detach drive [drive ...] mlxcontrol detach -a mlxcontrol check drive mlxcontrol config controller mlxcontrol help command DESCRIPTION
The mlxcontrol utility provides status monitoring and management functions for devices attached to the mlx(4) driver. Controller names are of the form "mlxN" where N is the unit number of the controller. Drive names are of the form "mlxdN" where N is the unit number of the drive. Do not specify the path to a device node. status Print the status of controllers and system drives. If one or more drives are specified, only print information about these drives, otherwise print information about all controllers and drives in the system. With the -v flag, display much more verbose informa- tion. With the -q flag, do not print any output. This command returns 0 if all drives tested are online, 1 if one or more drives are critical and 2 if one or more are offline. rescan Rescan one or more controllers for non-attached system drives (e.g. drives that have been detached or created subsequent to driver initialisation). If the -a flag is supplied, rescan all controllers in the system. detach Detach one or more system drives. Drives must be unmounted and not opened by any other utility for this command to succeed. If the -a flag is supplied, detach all system drives from the nominated controller. check Initiate a consistency check and repair pass on a redundant system drive (e.g. RAID1 or RAID5). The controller will scan the system drive and repair any inconsistencies. This command returns immediately; use the status command to monitor the progress of the check. rebuild Requires two arguments, controller and physdrive as specified in the output of the status command. All system drives using space on the physical drive physdrive are rebuilt, reconstructing all data on the drive. Note that each controller can only perform one rebuild at a time. This command returns immediately; use the status command to monitor the progress of the rebuild. config Print the current configuration from the nominated controller. This command will be updated to allow addition/deletion of system drives from a configuration in a future release. help Print usage information for command. AUTHORS
The mlxcontrol utility was written by Michael Smith <msmith@FreeBSD.org>. BUGS
The config command does not yet support modifying system drive configuration. Error log extraction is not yet supported. BSD
April 10, 2000 BSD
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy