Unix solaris 10 how to use solaris dd hard disk copy commands
How to use solaris dd hard disk copy commands
First, basic steps
1) make sure that the geometry characteristics of the original disk and the destination disk are the same
2) become a superuser root
3) enter touch / reconfigure in the system using the master disk, and the system with the master disk needs the / reconfigure file in order to find the replication disk when rebooting
4) enter init0 to shut down the system
5) connect the copy disk to the system and power on
6) prompt for boot in OK mode
7) enter dd if=/dev/dsk/device-name of=/dev/dsk/device-name bs=blocksize (the input file if is the master disk device, and the input file of is the copy disk device)
8) enter fsck / dev/rdsk/device-name (detect new file system)
9) enter mount / dev/rdsk/device-name / mnt to load the root file system of the replica
10) Edit the / etc/vfstab file on the copy disk to point to the correct device name
11) enter umount / mnt to unmount the root file system of the replication disk
12) enter init 0 to shut down the system
13) enter boot diskN-s to boot the replication disk in single-user mode
14) enter sys-unconfig recovery configuration replication disk, and the system shuts down after the disk configuration is restored
15) enter boot diskN boot copy disk
16) provide the system information of the related system (HOSTNAME TIMEZONE IP.)
17) the system is completed, that is, log in as a super user to verify the system information.
Second, give examples of orders.
# dd if=/dev/dsk/c1t0d0s2 of=/dev/dsk/c1t1d0s2 bs=100k
# fsck / dev/rdsk/c1t1d0s2
# mount / dev/rdsk/c1t1d0s2 / mnt
# cd / mnt/etc
# vi / etc/vfstab#cd /
# umount / mnt
# init 0
OK boot disk2-s
# sys-unconfig
OK boot disk2-s