Hi,

even if i'm a bit late here.
This is the exact story i had put before me a few years ago.

There was existing "this already works" code by our devs which sometimes
just didn't work...
We had two errors that ended up with wrong disk wipes and thus
misconfigured embedded systems.
- If you attached an usb drive, funny things happened, basically, the usb
disk got wiped and it tried to set up drbd on it.
- if you did a few 100 installs you'd hit one where the raid lun creation
was a little slow, meaning they got out of the expected order.


The solution was to rewrite that specific post-install script (raid
controller config, lvm config, vm setup) to be a "finite" state machine.
It took us two sheets of paper and half a day of silent coding, and the
problems were never to be seen again.

we'd do checks like
- do we already have the vm configs
- do we already have the lv's for the vms?
- do we already have the vg?
- do we already have pv's set up?
- do we already have the raid luns?
- do we have the the expected disks in those slots?
- do we have the raid controller? :))

and each could only trigger it's specific setup.


Florian


2015-04-08 17:01 GMT+02:00 Michael Tiernan <[email protected]>:

> I need to figure out something under Linux and I need to find a place to
> research it and ask questions. (As opposed to cluttering up this list.)
>
> I need to find out, at kickstart time, which drive, if any, is in
> "Slot0" of the hardware.
>
> Problem scenario:
> Machine with six drives in slots 0-5.
> For whatever reason, the system is about to be rebuilt.
> BUT, the drive in slot0 has decided to go belly-up and no longer
> responds as expected.
>
> Normally, what will happen is that the kickstart process will wipe and
> rebuild on the drive in Slot1 since it is the first drive. This is not
> the desired outcome.
>
> What I want to do is confirm that the drive I'm focusing on is the
> "correct" one in the physical hardware slot 0.
>
> I can look in /sys/class/scsi_disk/ and gather some of the info but I'm
> assuming I'm not the first person down this road and i was looking for a
> proper well to dip into.
>
> Any advice?
>
> Thanks for everyone's time.
> --
>   << MCT >> Michael C Tiernan. http://www.linkedin.com/in/mtiernan
>   Non Impediti Ratione Cogatationis
>   Women and cats will do as they please, and men and dogs
>    should relax and get used to the idea. -Robert A. Heinlein
> _______________________________________________
> Discuss mailing list
> [email protected]
> https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
> This list provided by the League of Professional System Administrators
>  http://lopsa.org/
>



-- 
the purpose of libvirt is to provide an abstraction layer hiding all xen
features added since 2006 until they were finally understood and copied by
the kvm devs.
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to