10 Replies Latest reply: Jul 12, 2013 11:11 AM by Cindys-Oracle RSS

    copy full machine to another machine sunfire V440 solaris 10

    user8310152

      Hi all,

      Please help me this case.

      I have sun fire V440 machine and installed sun solaris 10 with JUMPSTART CORE VERSION: Solaris!Sun!sparc!10!0!0708!V02

      and now, I want to copy system file of this machine to new one, the same configuration ( hdd, cpu, nic ...)

      I checked raid controller in old machine :

      raidctl -l

      Controller: 1

              Disk: 0.0.0

              Disk: 0.1.0

              Disk: 0.2.0

              Disk: 0.3.0

      Controller: 2

       

      and before install the copy image to new machine, do I need make raid first for new machine?

      And how can I make and copy from old machine to new machine by usb, and how to extract, install ....

       

      Thanks all

        • 1. Re: copy full machine to another machine sunfire V440 solaris 10
          Reidod

          Hello,

           

          You need to set-up the HW RAID first before installing the Solaris 10 OS on your new Server. The HDDs part of the RAID Controller will disappear from Solaris device tree.

           

          Relating the migration tasks, I would suggest to copy the current server IP configuration data, save the Disks Layout (VTOC), backup any UFS File System. You can use them to apply the same configuration on your new server.

           

          Regards,

          Rei

          • 2. Re: copy full machine to another machine sunfire V440 solaris 10
            user8310152

            Thanks Rei

            Can you help me show step to copy full configuration in old server and save to usb storage.

            and with raid controller below is Raid 1, right?

            Controller: 1

                    Disk: 0.0.0

                    Disk: 0.1.0

                    Disk: 0.2.0

                    Disk: 0.3.0

            please help.

            Thanks

            • 3. Re: copy full machine to another machine sunfire V440 solaris 10
              Reidod

              Hello,

               

              You can use raidctl -l <volume> command to get info about your raid configuration. On Solaris there is no tool to backup/restore all the server configuration from one server to another. Use Solaris commands ifconfig, netstat, prtvtoc, and configuration files in /etc/ and save all the server configuration.

               

              Regards,

              Rei

              • 4. Re: copy full machine to another machine sunfire V440 solaris 10
                user8310152

                Hi Rei ,

                Thanks for reply

                Let's me try.

                 

                Thank so much

                • 5. Re: copy full machine to another machine sunfire V440 solaris 10
                  heider

                  I agree there is no tool to directly backup one server and restore it to another, but there are other tools that can get the job done.

                   

                  - create a flash archive and restore using boot DVD or jumpstart

                  - ufsdump and ufsrestore (UFS)

                  - for ZFS, zpool send (to file) and receive (steps are complicated but documented)

                  - It may be possible to break your RAID mirror, insert the mirrored disks in your new server, and remirror your new server disks back in the old server

                  • 6. Re: copy full machine to another machine sunfire V440 solaris 10
                    Cindys-Oracle

                    I would agree that creating a Flash archive on the existing system and applying it to the new system would be much easier than trying to gather all the right OS info manually.

                     

                    Using the hardware RAID and breaking the mirror would be the next easiest but I'm unfamiliar with those steps.

                     

                    Thanks, Cindy

                    • 7. Re: copy full machine to another machine sunfire V440 solaris 10
                      user8310152

                      Thanks for all recommend

                      And one problem, my old server launching telecommunication service and it's still live. If I do those steps as your recommend, any prolem happend  or effect to service ?

                      May you show me clear step by step to be done this job, because i'm not experience in solaris.

                       

                      Thanks so much.

                      • 8. Re: copy full machine to another machine sunfire V440 solaris 10
                        f9db578c-c790-4d98-8b84-824380b5d52d

                        there is other way to copy/clone the hdd  by following procedure

                         

                        Copy a Disk using (dd) command

                         

                        Keep the following key points in mind when you consider copying a disk:

                         

                            Do not use this procedure to copy a disk that is under the control of a volume manager.

                         

                            The primary methods for copying UFS file system data from one disk or system to another disk or system is by using the ufsdump and ufsrestore commands. For more information on using these commands, see Chapter 23, Backing Up and Restoring UFS File Systems (Overview).

                         

                            You can clone systems by creating a flash archive and copying it to destination systems. For more information about creating a flash archive, see Oracle Solaris 10 9/10 Installation Guide: Solaris Flash Archives (Creation and Installation).

                         

                            If you are copying a disk with an EFI disk label, see Example 28–2.

                         

                        If you are still considering copying a disk with the dd command keep the following cautions in mind:

                         

                            Make sure that the source disk and destination disk have the same disk geometry.

                         

                            Check the UFS file systems on the disk to be copied with the fsck utility.

                         

                            Make sure the system is in single-user mode when copying a disk with the dd command.

                         

                            Become superuser or assume an equivalent role.

                         

                            (Optional) Create the /reconfigure file so that the system will recognize the destination disk to be added when it reboots, if necessary.

                         

                            # touch /reconfigure

                         

                            Shut down the system.

                         

                            # init 0

                         

                            Attach the destination disk to the system.

                         

                            Boot the system.

                         

                            ok boot -s

                         

                            Copy the source disk to the destination disk.

                         

                            # dd if=/dev/rdsk/device-name of=/dev/rdsk/device-name bs=block-size

                         

                            if=/dev/rdsk/device-name

                         

                                Represents the overlap slice of the master disk device, usually slice 2.

                            of=/dev/rdsk/device-name

                         

                                Represents the overlap slice of the destination disk device, usually slice 2.

                            bs=blocksize

                         

                                Identifies the block size, such as 128 KB or 256 KB. A large block size decreases the time it takes to copy the disk.

                         

                            For more information, see dd(1M).

                         

                            Check the new file system.

                         

                            # fsck /dev/rdsk/device-name

                         

                            Mount the destination disk's root (/) file system.

                         

                            # mount /dev/dsk/device-name /mnt

                         

                            Change to the directory where the /etc/vfstab file is located.

                         

                            # cd /mnt/etc

                         

                            Using a text editor, edit the destination disk's /etc/vfstab file to reference the correct device names.

                         

                            For example, change all instances of c0t3d0 to c0t1d0.

                         

                            Change to the destination disk's root (/) directory.

                         

                            # cd /

                         

                            Unmount the destination disk's root (/) file system.

                         

                            # umount /mnt

                         

                            Shut down the system.

                         

                            # init 0

                         

                            Boot from the destination disk to single-user mode.

                         

                            # boot diskn -s

                         

                            Note –

                         

                            The installboot command is not needed for the destination disk because the boot blocks are copied as part of the overlap slice.

                         

                            Unconfigure the destination disk.

                         

                            # sys-unconfig

                         

                            The system is shut down after it is unconfigured.

                         

                            Boot from the destination disk again and provide its system information, such as host name, time zone, and so forth.

                         

                            # boot diskn

                         

                            After the system is booted, log in as superuser to verify the system information.

                         

                            hostname console login:

                         

                        Example 28–1 Copying a Disk With a VTOC Label (dd)

                         

                        This example shows how to copy the master disk (with a VTOC label) /dev/rdsk/c0t0d0s2 to the destination disk /dev/rdsk/c0t2d0s2.

                         

                        # touch /reconfigure

                        # init 0

                        ok boot

                        # dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t2d0s2 bs=128k

                        # fsck /dev/rdsk/c0t2d0s2

                        # mount /dev/dsk/c0t2d0s2 /mnt

                        # cd /mnt/etc

                        # vi vfstab

                        (Modify entries for the new disk)

                        # cd /

                        # umount /mnt

                        # init 0

                        # boot disk2 -s

                        # sys-unconfig

                        # boot disk2

                         

                        Copying a Disk with an EFI Label (dd)

                         

                        In previous Solaris releases, slice 2 (s2) was used to represent the entire disk. On a disk with an EFI label, you must use a slightly different procedure to clone or copy disks larger than 1 terabyte so that the UUID of cloned disks is unique. If you do not create a new label for the cloned disk, other software products might corrupt data on EFI-labeled disks if they encounter duplicate UUIDs.

                         

                        For example:

                         

                            Clone the disk with an EFI label. For example:

                         

                            # dd if=/dev/rdsk/c0t0d0 of=/dev/rdsk/c0t2d0 bs=128k

                         

                            Pipe the prtvtoc output of the disk to be copied to the fmthard command to create a new label for the cloned disk. For example:

                         

                            # prtvtoc /dev/rdsk/c0t0d0 | fmthard -s - /dev/rdsk/c0t2d0

                        • 9. Re: copy full machine to another machine sunfire V440 solaris 10
                          user8310152

                          Thanks for your help,

                          I'll test in my vmware before apply to real server,

                          So, I still need your help during this job

                           

                          Thank so much to all.

                          • 10. Re: copy full machine to another machine sunfire V440 solaris 10
                            Cindys-Oracle

                            I think I wrote those dd steps but I don't think I would recommend it in this case because there is very little error checking and you will still need to update the system info so that you don't end up with 2 identical (duplicate) systems.

                             

                            I would go back to the flash archive suggestion and possibly even convert this system to a ZFS file system, which is easy to do with live upgrade

                            and consider using mirrored ZFS storage pools. They are much easier to manage.

                             

                            First, you would install the current live upgrade patches, create a ZFS root pool on a spare disk, use live upgrade to migrate from UFS to ZFS. Then

                            reboot the system. Then, you could create a flash archive of the old system with a ZFS root and apply it to the new system by using the interactive installer for example. You are prompted by sys-unconfig and sysidtool to change the hostname, IP address, and so on of the new system so that you don't have 2 duplicate systems.

                             

                            Even if you don't migrate to ZFS, you can review the current flash info, here:

                             

                            Oracle Solaris 10 1/13 Installation Guide: Flash Archives (Creation and Installation)

                             

                            Migrating to UFS to ZFS is described here:

                             

                            http://docs.oracle.com/cd/E26505_01/html/E37384/ggpdm.html#scrolltoc

                             

                            Thanks, Cindy