{"id":4813,"date":"2008-07-15T13:00:22","date_gmt":"2008-07-15T05:00:22","guid":{"rendered":"https:\/\/www.alfredivy.per.sg\/blogger\/?p=4813"},"modified":"2019-08-03T23:20:56","modified_gmt":"2019-08-03T15:20:56","slug":"disk-to-disk-cloning-a-server","status":"publish","type":"post","link":"https:\/\/www.alfredivy.sg\/blogger\/2008\/07\/disk-to-disk-cloning-a-server\/","title":{"rendered":"Disk to disk cloning a server"},"content":{"rendered":"\n<p>Disk to disk cloning a server is a really old way of cloning.  Insert a new disk of similar size, boot an independent OS eg Live CD, Ubuntu or Knoppix to clone from old to the new disk.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Except that the CD drive is not working and I cannot power down the really old server. So it is single-user mode time.<\/p>\n\n\n\n<p>Single user mode is when the OS is shut down, leaving a bare minimum and everything runs off RAM so there is no worry about the state of the disks.<\/p>\n\n\n\n<p>Before going to single-user mode, print out the configuration of the disks from mount, fstab and format (Solaris) or fdisk (Linux)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">mount<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"> \/ on \/dev\/dsk\/c0t0d0s0 read\/write\/setuid\/intr\/largefiles\/onerror=panic\/dev=800000 on Wed Jun 22 22:22:22 2008 \/proc on \/proc read\/write\/setuid\/dev=3a80000 on Wed Jun 22 22:22:22 2008 \/etc\/mnttab on mnttab read\/write\/setuid\/dev=3c40000 on Wed Jun 22 22:22:22 2008 \/var\/run on swap read\/write\/setuid\/dev=1 on Wed Jun 22 22:22:22 2008 \/tmp on swap read\/write\/setuid\/dev=2 on Wed Jun 22 22:22:22 2008 \/java on \/dev\/dsk\/c0t9d0s6 read\/write\/setuid\/intr\/largefiles\/onerror=panic\/dev=800046 on Wed Jun 22 22:22:22 2008 \/stuff on \/dev\/dsk\/c0t0d0s3 read\/write\/setuid\/intr\/largefiles\/onerror=panic\/dev=800003 on Wed Jun 22 22:22:22 2008 \/stuff1 on \/dev\/dsk\/c0t8d0s7 read\/write\/setuid\/intr\/largefiles\/onerror=panic\/dev=80003f on Wed Jun 22 22:22:22 2008 \/stuff2 on \/dev\/dsk\/c0t9d0s7 read\/write\/setuid\/intr\/largefiles\/onerror=panic\/dev=800047 on Wed Jun 22 22:22:22 2008<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">more \/etc\/vfstab<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">#device         device          mount           FS      fsck    mount   mount \n#to mount       to fsck         point           type    pass    at boot options \n# \n#\n\/dev\/dsk\/c1d0s2 \/dev\/rdsk\/c1d0s2 \/usr          ufs     1       yes     - fd              -              \/dev\/fd          fd      -       no      - \/proc           -              \/proc            proc    -       no      - \/dev\/dsk\/c0t0d0s1       -       -               swap    -       no      - \/dev\/dsk\/c0t0d0s0       \/dev\/rdsk\/c0t0d0s0      \/       ufs     1       no - \/dev\/dsk\/c0t0d0s3       \/dev\/rdsk\/c0t0d0s3      \/stuff ufs     2       yes - swap            -               \/tmp             tmpfs    -       yes     - \/dev\/dsk\/c0t9d0s6       \/dev\/rdsk\/c0t9d0s6      \/java ufs     2       yes - \/dev\/dsk\/c0t9d0s7       \/dev\/rdsk\/c0t9d0s7      \/stuff2      ufs     2 yes   - \/dev\/dsk\/c0t8d0s7       \/dev\/rdsk\/c0t8d0s7      \/stuff1     ufs     2 yes   -<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">format<\/h4>\n\n\n\n<p>\nAVAILABLE DISK SELECTIONS:\n       0. c0t0d0 \n          \/pci@1f,4000\/scsi@3\/sd@0,0\n       1. c0t8d0 \n          \/pci@1f,4000\/scsi@3\/sd@8,0\n       2. c0t9d0 \n          \/pci@1f,4000\/scsi@3\/sd@9,0\n<\/p>\n\n\n\n<p>In single-user mode, run the dd command to duplicate block by block from old to new.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>dd if=\/dev\/rdsk\/c0t08d0s* of=\/dev\/rdsk\/c0t011d0s*<\/p><\/blockquote>\n\n\n\n<p>* this is not a wild card, it means run the dd command 8 times for value 0-7. Make sure the slice numbers are in sync!<\/p>\n\n\n\n<p>Note the OF points to the new disk not listed in the above config.<\/p>\n\n\n\n<p>Links: <a href=\"http:\/\/docs.sun.com\/app\/docs\/doc\/817-5093\/6mkisoqn1?l=ru&amp;a=view\">dd<\/a>  <a href=\"http:\/\/docs.sun.com\/app\/docs\/doc\/816-1058\/6m7gjuj66?a=view\">vfstab<\/a>  <a href=\"http:\/\/docs.sun.com\/app\/docs\/doc\/819-2240\/format-1m?a=view\">format<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Disk to disk cloning a server is a really old way of cloning. Insert a new disk of similar size, boot an independent OS eg Live CD, Ubuntu or Knoppix to clone from old to the new disk.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124],"tags":[],"class_list":["post-4813","post","type-post","status-publish","format-standard","hentry","category-linux-and-unix"],"_links":{"self":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/comments?post=4813"}],"version-history":[{"count":3,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4813\/revisions"}],"predecessor-version":[{"id":4907,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4813\/revisions\/4907"}],"wp:attachment":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/media?parent=4813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/categories?post=4813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/tags?post=4813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}