From: Marc G. <gr...@at...> - 2008-02-10 07:05:38
|
On Saturday 09 February 2008 19:30:48 Gordan Bobic wrote: > Marc Grimme wrote: > > Hi Gordan, > > > > On Saturday 09 February 2008 01:56:18 Gordan Bobic wrote: > >> Hi, > >> > >> I'm trying to add support for DRBDs, and trying to stick with doing it > >> in a way consistent with iSCSI support as far as it is possible. I'm > >> seeing a few weird things, though. > >> > >> In linuxrc.generic.sh: > >> [...] > >> # start iscsi if apropriate > >> isISCSIRootsource $rootsource > >> if [ $? -eq 0 ]; then > >> loadISCSI > >> startISCSI $rootsource $nodename > >> fi > >> > >> # start drbd if appropriate > >> isDRBDRootSource $rootsource > >> if [ $? -eq 0 ]; then > >> loadDRBD > >> startDRBD $rootsource $nodename > >> fi > >> [...] > >> > >> and in cluster.conf: > >> [...] > >> <clusternodes> > >> <clusternode name="sentinel1c" nodeid="1" votes="2"> > >> <com_info> > >> <rootsource name="drbd"/> > >> > >> [...] > > > > Agreed. That's the place.You also have a bootoption rootsource to > > overwrite it. Normally we would suspect rootsource to be some kind of url > > like for example iscsi://iscsi-host/export-name or it might be > > drbd://slave/export or something. I cannot remember the semantics there > > too long ago ;-) . > > > > Are you also aware of the com-expert bootoption? This one is quite handy > > as it brings you to a shell before the process of the initrd is started. > > And you can change some things to see if they work or not. > > > > Answer to the iscsi questioning stuff. > > [marc@mobilix-07 boot-scripts]$ source etc/iscsi-lib.sh > > [marc@mobilix-07 boot-scripts]$ isISCSIRootsource drbd > > [marc@mobilix-07 boot-scripts]$ echo $? > > 1 > > [marc@mobilix-07 boot-scripts]$ isISCSIRootsource iscsi > > [marc@mobilix-07 boot-scripts]$ echo $? > > 0 > > [marc@mobilix-07 boot-scripts]$ > > > > So if we are going iscsi we'll return a '0'. As a successfully executed > > shellscript does. > > > >> From this, one would assume that isISCSIRootsource would return false > >> and iSCSI not get initialized, and isDRBDRootSource would return true > >> and get initialized. > >> > >> This is the opposite of what I'm seeing. iSCSI gets started, and the > >> modules loaded. DRBD doesn't. > >> > >> Am I misunderstanding where $nodename is coming from? I'm not > >> particularly bothered by iSCSI trying to start (and failing because the > >> iscsi packages aren't in the rpm list), but that makes the drbd not > >> starting all the more puzzling. :-/ > > > > $nodename is the nodename that belongs to the node in bootprocess. But it > > is not necessarily the hostname. The function > > cluster-lib.sh/getClusterFSParameters returns it. It's a little bit > > calling other functions to make it more independent from the cluster.conf > > (that was the idea in the first place). > > Ah, I see. I think it may be necessary to do > hostname $nodename > in that case, since DRBD requires hostname to be matching the node name > in the DRBD configuration. Hmm. That would be a way. > > >> Further on (unrelated to this), I get cman starting, but ccsd failing, > >> so the boot-up aborts. But ps -aux | grep ccsd shows that ccsd is in > >> fact already running. I haven't seen this behaviour before. The only > >> thing I can think of that is different is that this is a 2-node cluster, > >> which is much smaller than what I usually work with. (Yes I did set > >> <cman two_node="1" expected_votes="2"/>) > > > > Enable syslogging to a syslog server. <syslog name="server"/> does the > > trick and see what it tells you. > > I'm feeling a bit silly now. The answer was in the line I pasted. For > two_node=1, expected_votes needs to be 1 as well. :-/ > > On a separate note, is there a configurable way to disable LVM/CLVM, > even if only at mkinitrd time? All it is achieving for me is throwing up > ugly "FAILED" startup messages because I'm not using LVM. I could > comment it out of the boot scripts, but that seems a bit nasty. Ok so what we did the last time was to introduce the lvm_check (Wasn't it because of your request?! ;-) ) function in linux.generic.rc line 288. That function checks for your rootdevice (specified in the cluster.conf) for it being a lv or not (seeing if it exists and if it has lvm major/minors). Doesn't that functionality work? It would also be possible to add a nolvm as we recently added a nousb bootoption. How about that as an addition? Recipe: Add a new option to boot-lib/getBootParameters at the end of the function: ---------------------------------- echo -n ":" getBootParm nolvm ---------------------------------- Then add to linux.generic.sh below the nousb line114: ----------------------------------------------------------------- nolvm=$(getParm ${bootparms} 8) ----------------------------------------------------------------- and then instead of linux.generic.rc line 290: ------------------------------------------------------------------ if [ "$lvm_sup" -eq 0 ] || [ -z "$nolvm" ]; then ------------------------------------------------------------------- There you go. I think that'll do it. > > I'm about 99% there with getting a single node to boot of the > OSR/GFS/DRBD. I just need to write a quick wrapper and it'll be ready. > Hoping to post a patch tomorrow. Sounds very great. We'll appreciate it very much. > > Gordan Marc. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Open-sharedroot-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel -- Gruss / Regards, Marc Grimme Phone: +49-89 452 3538-14 http://www.atix.de/ http://www.open-sharedroot.org/ ** ATIX Informationstechnologie und Consulting AG Einsteinstr. 10 85716 Unterschleissheim Deutschland/Germany Phone: +49-89 452 3538-0 Fax: +49-89 990 1766-0 Registergericht: Amtsgericht Muenchen Registernummer: HRB 168930 USt.-Id.: DE209485962 Vorstand: Marc Grimme, Mark Hlawatschek, Thomas Merz (Vors.) Vorsitzender des Aufsichtsrats: Dr. Martin Buss |