FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-06-2008, 11:04 AM
"William L. Maltby"
 
Default Three Identical systems - short cut to setting up the drives?

On Sun, 2008-07-06 at 06:36 -0400, William L. Maltby wrote:
> <snip>

> Still in the top level working directory (<the created initrd dir/..>)
>
> find <initdirname> | cpio -oac | gzip --best ><new initrd name>
>

Just checked. "find *" is what you want.

Also, there are a couple ignorelocking failures and a mkrootdev. Change
the ignore... that has the VG mentioned and the mkrootdev.

> <snip>

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 03:04 PM
"Filipe Brandenburger"
 
Default Three Identical systems - short cut to setting up the drives?

Hi,

On Sun, Jul 6, 2008 at 6:36 AM, William L. Maltby
<CentOS4Bill@triad.rr.com> wrote:
>> > If it's a boot drive, remember to rebuild your initrd and modify the
>> > init file to ignore lvm lock failures with the new VG name. Otherwise
>> > you'll be fighting some more battles.
>>
>> Yes, I remember getting burned by this once.
>
> Man gzip and cpio in case I misremember.

To set the "ignorelockingfailure" and others on the initrd file, can't
you just use "mkinitrd"? I was looking into the /sbin/mkinitrd script
(on CentOS 5.2), and I saw that it contains code for that, for
instance:

if [ -n "$vg_list" ]; then
emit "echo Scanning logical volumes"
emit "lvm vgscan --ignorelockingfailure"
emit "echo Activating logical volumes"
emit "lvm vgchange -ay --ignorelockingfailure $vg_list"
fi

I just don't know if vg_list will be populated with the right devices.
Anyway, it might be worth a try, specially if you want to do that over
and over again, messing with the internals of initrd (gzip, cpio,
etc., and specially rebuilding it) is not something you would want to
do on a daily basis.

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 04:41 PM
Scott Silva
 
Default Three Identical systems - short cut to setting up the drives?

on 7-4-2008 2:38 PM Robert Moskowitz spake the following:

William L. Maltby wrote:

On Fri, 2008-07-04 at 11:41 -0500, Les Mikesell wrote:


<snip>




Yes, dd is actually pretty slow in wall clock time. Where it wins is
in human time since you just type a short command line and go away,
and it duplicates any setup work you've done in addition too
installing the packages.



But it's not as slow as most think. They just don't take advantage of
capabilities, like bs=16384. This makes a *huge* difference in both
system overhead and wall clock time.
Well Clonezilla is busy cloning the drive, but there is a problem here
cloning to a USB attached drive.


One of the partitions is LVM and since this is a drive clone, including
the partition table and boot sector, both LVMs (source and target) have
the same name. So Clonezilla switches to using DD with probably some
bad parameters. After running an hour, it has only copied 4Gb out of
37Gb. Note that the USB port is v1.1.



Now actually, I would have perfered renaming the LVM partition and its
internal ext3 partitions. I even had a naming convention laid out if I
had do this via Install instead.
You might want to think about the fact that the drive could map differently
from the LBA between the usb adapter and directly hooked up to a system. I
had a laptop that did that, and access was extremely slow until I re-formatted
it and re-built the OS. Especially on older systems like you say you are using.


--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 07:28 PM
"William L. Maltby"
 
Default Three Identical systems - short cut to setting up the drives?

On Sun, 2008-07-06 at 11:04 -0400, Filipe Brandenburger wrote:
> Hi,
>
> On Sun, Jul 6, 2008 at 6:36 AM, William L. Maltby
> <CentOS4Bill@triad.rr.com> wrote:
> >> > If it's a boot drive, remember to rebuild your initrd and modify the
> >> > init file to ignore lvm lock failures with the new VG name. Otherwise
> >> > you'll be fighting some more battles.
> >>
> >> Yes, I remember getting burned by this once.
> >
> > Man gzip and cpio in case I misremember.
>
> To set the "ignorelockingfailure" and others on the initrd file, can't
> you just use "mkinitrd"? I was looking into the /sbin/mkinitrd script
> (on CentOS 5.2), and I saw that it contains code for that, for
> instance:
>
> if [ -n "$vg_list" ]; then
> emit "echo Scanning logical volumes"
> emit "lvm vgscan --ignorelockingfailure"
> emit "echo Activating logical volumes"
> emit "lvm vgchange -ay --ignorelockingfailure $vg_list"
> fi
>
> I just don't know if vg_list will be populated with the right devices.
> Anyway, it might be worth a try, specially if you want to do that over
> and over again, messing with the internals of initrd (gzip, cpio,
> etc., and specially rebuilding it) is not something you would want to
> do on a daily basis.

He is trying to copy an existing install, transport the drive and boot.
Until he gets a boot that allows the new root to be detected *as* the
new root, I don't know if that would work. But as I frequently say, I'm
not expert at any of this stuff.

However, I can tell you that this lets me keep a fallback on a second
drive in case the first fails or gets scrogged by you-know-who. It is
tested and works. 1. Change BIOS boot sequence *if* required 2. Root
file system on 2nd drive is VolGroupAA 3. Punch magic button. 4. Back in
business.

>
> HTH,
> Filipe
> <snip>

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 10:41 PM
"Filipe Brandenburger"
 
Default Three Identical systems - short cut to setting up the drives?

On Sun, Jul 6, 2008 at 3:28 PM, William L. Maltby
<CentOS4Bill@triad.rr.com> wrote:
> He is trying to copy an existing install, transport the drive and boot.
> Until he gets a boot that allows the new root to be detected *as* the
> new root, I don't know if that would work.

You can actually do that by using "chroot" from a rescue CD. I usually
want to do that on my systems, when I clone from a machine with
hardware RAID to a machine on which I will use software RAID. After
copying the image (using dd or whatever), I mount the partitions under
/mnt/sysimage and /mnt/sysimage/boot, then I do a chroot
/mnt/sysimage, and then I do mkinitrd, using -f to overwrite the old
one and specifying the exact version of the kernel grub is configured
to boot with.

For adding/removing drivers, mkinitrd works like a charm. For renaming
VGs, I don't know if it would detect them right. As it is on the
destination machine, I'm guessing it would, but as I didn't really
test it, I cannot be sure.

Anyway, if you get to it and test mkinitrd to correct the name of the
VGs inside initrd and it works, let us know!

Thanks,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 11:30 PM
"William L. Maltby"
 
Default Three Identical systems - short cut to setting up the drives?

On Sun, 2008-07-06 at 18:41 -0400, Filipe Brandenburger wrote:
> <snip>

> You can actually do that by using "chroot" from a rescue CD. I usually
> want to do that on my systems, when I clone from a machine with
> hardware RAID to a machine on which I will use software RAID. After
> copying the image (using dd or whatever), I mount the partitions under
> /mnt/sysimage and /mnt/sysimage/boot, then I do a chroot
> /mnt/sysimage, and then I do mkinitrd, using -f to overwrite the old
> one and specifying the exact version of the kernel grub is configured
> to boot with.
>
> For adding/removing drivers, mkinitrd works like a charm. For renaming
> VGs, I don't know if it would detect them right. As it is on the
> destination machine, I'm guessing it would, but as I didn't really
> test it, I cannot be sure.
>
> Anyway, if you get to it and test mkinitrd to correct the name of the
> VGs inside initrd and it works, let us know!
>
> Thanks,
> Filipe
> <snip sig stuff>

Thanks for the info! I'm going to stash this where I can find it
quickly. I *might* have occasion to test this myself in another month or
so.

Meanwhile, if Robert hasn't progressed to far with his other scheme, he
might have an opportunity to try it. But I suspect he's short of time
ATM.

--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org