SCIENTIFIC-LINUX-USERS Archives

January 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Tue, 29 Jan 2013 17:55:21 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (65 lines)
On 2013/01/29 10:20, Bluejay Adametz wrote:
> target
>> hard drive.  The hard drive on A is /dev/sda, call it Ahd.  A is shut down
>> power off.  Bhd is installed into an available bay on A, A is booted, and
>> Bhd appears as /dev/sdb in A.  Using dd on A, clone /dev/sda to /dev/sdb .
>> Mount on A the partition of /dev/sdb that contains /etc (there are no end
>> user home directories -- only home directories are those of the system
>> administration users).  Using a text editor (e.g., vi), modify the
>> /etc/sysconfig/net* scripts/directories, as well as /etc/hosts. for the name
>> and IP address of machine B that will contain Bhd (resolv.conf will be the
>> same -- all of these machines are in the same DNS subzone, same TCP/IP
>> subnet).  Iterate through all of the target workstation hard drives.  As
>> there are no other distributed services running, this should suffice.
>
> Using tar rather than dd would likely be faster if there's any
> significant amount of free space on the source disk. dd will copy all
> those unused blocks, while tar will copy just the Useful Data.
>
> The network interface config files
> (/etc/sysconfig/network-scripts/ifcfg-*) contain the interface MAC
> address. You'll probably need to modify that. It may be easiest to set
> up a one-time boot script so this can be set on the destination (B)
> machine the first time it boots.
>
> If you use selinux, you may want to touch .autorelabel in the B root
> file system so the contexts will get set properly when it boots.
>
>                                                           - Bluejay Adametz
>
> Definition: Alponium n. (chemical symbol:Ap) Initial blast of odor
> from a can of dog food.
>

Do remember that when you use tar for copying you have to partition and
mkfs each of the disks. If this can be automated, so much the better.
Automating the system duplication would be the best time saver over all.
It frees the administrator's time for other activities if the process can
be automated end to end.

Whatever method is being used make sure it is amenable to scripting. It
should be possible to implant a working copy of disk B to disk C reasonably
quickly with a script that automates partitioning and/or copying. From
that point you need to mount C and make the changes for the system name
as needed and then dismount C.

Once C is ready to use, place it in the target machine. Boot the target
machine with a Live CD. Place disk D into the first prep system and disk
E into the "C" system. Prepare F and G simultaneously using the prep
script. Once you get up to 16 working machines you may find yourself
running around like a one armed paperhanger keeping up with the prep
process. Note that you do NOT need the network active at this time. You
simply need a script that uses sed or equivalent to make modifications
to the necessary files to make the machines appear "unique" on the
network and other places as needed.

The exact cloning process is not as important as automating it with
a script that accepts the new information for the sed editing. Start
it. Forget it. Wait for the script to beep at the end while you take
care of emails or other problems.

At least, that's how I'd do it. "Do it once is for humans. Do it many
times is for computers, scripts, and automation."

{^_^}   Joanne

ATOM RSS1 RSS2