Date: Thu, 25 Oct 2001 08:07:26 -0400 From: Mike Tancsa <mike@sentex.net> To: mlsmith@mitre.org ("PSI, Mike Smith") Cc: hackers@freebsd.org Subject: Re: Duping a hard disk Message-ID: <2svftt8jrro366houev51k52234dgft63e@4ax.com> In-Reply-To: <SEN.1003840075.888739536@news.sentex.net> References: <SEN.1003840075.888739536@news.sentex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 23 Oct 2001 12:27:55 +0000 (UTC), in sentex.lists.freebsd.hackers you wrote: >But alas, I cannot find any procedures for doing this. Does anyone know >how to duplicate a master disk to a "new" slave disk??? It would REALLY >make my life much easier. Test it to make sure it works, but roughly the below for a master in ad0 and a target in ad1. This is on 4.x so you need to modify it for 3.x. #blow away all data one ad1 /bin/dd if=3D/dev/zero of=3D/dev/ad1 bs=3D512 count=3D32 # do the fdisk /sbin/fdisk -BI ad1 #create a bootable drive with disk label /sbin/disklabel -w -r -B ad1s1 auto #read in 10g disklable /sbin/disklabel ad0 > /root/my-master-disklab /sbin/disklabel -R ad1s1 /root/my-master-disklab #load in editor to make sure it looks reasonable /sbin/disklabel -e ad1s1 #newfs the slices /sbin/newfs /dev/rad1s1a /sbin/newfs /dev/rad1s1e /sbin/newfs /dev/rad1s1f #enable soft updates /sbin/tunefs -n enable ad1s1e /sbin/tunefs -n enable ad1s1f #mount them up=20 /sbin/mount -o async /dev/ad1s1a /mnt-root /sbin/mount /dev/ad1s1e /mnt-var /sbin/mount /dev/ad1s1f /mnt-usr #dump / restore them cd / ; dump -0 -b 200 -f - / | ( cd /mnt-root ; restore -rf - ) cd /usr ; dump -0 -b 200 -f - /usr | ( cd /mnt-usr ; restore -rf - ) cd /var ; dump -0 -b 200 -f - /var | ( cd /mnt-var ; restore -rf - ) ---Mike Mike Tancsa (mdtancsa@sentex.net) =09 Sentex Communications Corp, =09 Waterloo, Ontario, Canada "Given enough time, 100 monkeys on 100 routers=20 could setup a national IP network." (KDW2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2svftt8jrro366houev51k52234dgft63e>