Changeset 3661


Ignore:
Timestamp:
May 3, 2017, 11:27:12 AM (6 months ago)
Author:
bruno
Message:

Adds preliminary DRBD support

Location:
branches/3.3/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi/README.bootparam

    r3653 r3661  
    1818net         Activate network support
    1919nodmraid    Do not try to start dmraid support
     20nodrbd      Do not try to start DRBD support
    2021nohw        Do not call the mindi-rsthw script to restore your HW configuration
    2122nolvm       Do not try to start LVM support
  • branches/3.3/mindi/mindi

    r3660 r3661  
    6969
    7070# ide-probe-mod
    71 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs edd paride ata_generic ata_piix dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_via pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron pata_atiixp pata_acpi amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw virtio virtio_blk virtio_pci hv_storvsc raid0 raid1 raid456"
     71IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs edd paride ata_generic ata_piix dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_via pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron pata_atiixp pata_acpi amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw virtio virtio_blk virtio_pci hv_storvsc raid0 raid1 raid456 drbd"
    7272PCMCIA_MODS="pcmcia_core ds yenta_socket"
    7373USB_MODS="usb-storage usb_storage usb-ohci usb-uhci input hid hid_generic hid-generic hid_microsoft hid-microsoft uhci_hcd uhci-hcd ehci-hcd ehci-pci ohci-hcd ohci_hcd ohci-pci xhci xhci-hcd usbkbd usbhid keybdev mousedev scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial"
     
    506506    KBDEPTH=0
    507507    AddKeyboardMappingFile $mappath
    508     echo ""
    509508    echo -e "$DONE"
    510509    rm -f $MINDI_TMP/keymaps.find
     
    666665        done
    667666    fi
    668     echo -en "$DONE\nINFO: Making complete dependency list"
    669 
     667    echo -e "$DONE"
     668
     669    echo -en "INFO: Making complete dependency list..."
    670670    tr -s '/' '/' < $tempfile | sort -u > $tempfile.new
    671671    mv -f $tempfile.new $tempfile
     
    690690        fi
    691691        if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin 2>> $LOGFILE ; then
    692             LocateDeps $bigdir/usr/bin/mondo*restore >> $outfile.pre
     692            LocateDeps $bigdir/usr/bin/mondo*restore >> $outfile.pre
    693693        else
    694694            LogAll "ERROR: Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP"
    695695            LogAll "       I bet you've got a spare copy of Mondo or Mindi floating around on your system."
    696             LogAll "       If Mindi was called by Mondo then send a bug report."
     696            LogAll "       If Mindi was called by Mondo then send a bug report."
    697697            LogAll "       It not, type 'ps ax' to see which Mondo-related process is still running then kill it. :-)"
    698698            LogAll "       Finally, run Mindi again."
    699             Die "Odd."
     699            Die "Odd."
    700700        fi
    701701        cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogAll "\nINFO: Mondo v1.2x defaults to LILO as the bootloader, BTW."
     
    710710    tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | grep -Fvx "" | sort -u | grep -Ev "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
    711711    rm -f $tempfile $outfile.pre
    712     [ "$res" -eq "0" ] && echo -e "\r\t\t\t\t\t\t\t\t$DONE" || echo "\nFailed."
     712    [ "$res" -eq "0" ] && echo -e "$DONE" || echo "\nFailed."
    713713    return $res
    714714}
     
    892892    for fname in $incoming ; do
    893893        if [ ! -e "$fname" ] ; then
    894             LogFile "WARNING: $fname does not exist; cannot be LDD'd."
     894            LogFile "WARNING: $fname does not exist; cannot be LDD'd."
    895895            if echo $fname | grep lvm &> /dev/null ; then
    896896                LogFile "          This warning only affects you if you are using LVM."
     
    26242624    noof_lines=`echo $lis2 | wc -w`
    26252625    progress=0
    2626     lis=""
    26272626    # Get only the files which exist in that list
    26282627    # and potentially their symlink structure
     2628    # put apart directories for later handling
    26292629    for f in $lis2; do
    26302630        if [ -d $f ]; then
    2631             for g in `find $f`; do 
     2631            for g in `find $f`; do
    26322632                echo $g >> $MINDI_TMP/$conf.lis
    26332633                LocateDeps $g  >> $MINDI_TMP/$conf.lis2
    26342634            done
    26352635            lis3="$lis3 $f"
    2636         else 
     2636        else
    26372637            if [ -r $f ]; then
    26382638                echo $f >> $MINDI_TMP/$conf.lis
     
    27182718    # copy from rootfs into mountpoint
    27192719    LogAll "INFO: Copying Mindi files onto $mountpoint"
    2720     for f in $tgz_dir_fname/*; do 
     2720    for f in $tgz_dir_fname/*; do
    27212721        if [ ! -r $f ]; then
    27222722            Die "ERROR: Unable to copy $f to the target dir. Check your installation or McAfee presence"
     
    27762776    # Avoids an issue on some distro (RHEL5)
    27772777    rm -f $mountpoint/etc/ld.so.conf.d/kernelcap*
     2778
     2779    # Management of DRBD
     2780    which drbdadm &> /dev/null
     2781    if [ $? -eq 0 ]; then
     2782        # Do we find DRBD devices setup
     2783        drbdadm sh-dev all | grep -E '^/dev' &> /dev/null
     2784        if [ $? -eq 0 ]; then
     2785            CopyFromConf drbd
     2786        fi
     2787        # DRBD requires net activation
     2788        MINDI_ADDITIONAL_BOOT_PARAMS="$MINDI_ADDITIONAL_BOOT_PARAMS drbd"
     2789    fi
    27782790
    27792791    # Management of udev (which includes modprobe in rules)
     
    33863398    elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then
    33873399        MONDO_TMP=$2
    3388         # Change MINDI_TMP for the one provided by mondo 
     3400        # Change MINDI_TMP for the one provided by mondo
    33893401        # So that it can get back the built files
    33903402        if [ _"$MONDO_TMP" = _"" ]; then
  • branches/3.3/mindi/rootfs/etc/init.d/rcS

    r3653 r3661  
    648648}
    649649
     650StartDRBD() {
     651    if [ "`grep -i nodrbd /proc/cmdline`" ]; then
     652        return;
     653    fi
     654    if [ "`grep -i drbd /proc/cmdline`" ]; then
     655        echo "Starting DRBD..."
     656        mkdir -p /var/run/drbd
     657        drbdadm adjust-with-progress all
     658        drbdadm wait-con-int
     659        # Become primary
     660        drbdadm sh-b-pri
     661        drbdadm sh-status
     662        drbdsetup all show
     663        LogIt "DRBD started"
     664    fi
     665}
     666
    650667StartRaids() {
    651668    local raid_devices i
     
    976993    touch /tmp/mondorestore.cfg
    977994fi
    978 if [ "`grep -i pxe /proc/cmdline`" ] || [ "`grep -i net /proc/cmdline`" ] || [ "`grep 'netfs-proto ' /tmp/mondorestore.cfg`" ]; then
     995if [ "`grep -i pxe /proc/cmdline`" ] || [ "`grep -i net /proc/cmdline`" ] || [ "`grep 'netfs-proto ' /tmp/mondorestore.cfg`" ] || [ "`grep -i drbd /proc/cmdline`" ]; then
    979996    # We need to get here exported variables from start-netfs
    980997    . /usr/sbin/start-netfs
     
    10311048StartRaids
    10321049StartMpath
     1050StartDRBD
    10331051# avoids messagesa round leaked fd - Cf lvm man page
    10341052export LVM_SUPPRESS_FD_WARNINGS=1
  • branches/3.3/mindi/rootfs/usr/sbin/start-netfs

    r3452 r3661  
    128128    fi
    129129
    130     # ping server helps waking interface up
    131     LogIt "INFO: Pinging Remote server..."
     130    # ping gateway helps waking interface up
     131    LogIt "INFO: Pinging Gateway $ipgateway..."
     132    ping -c $ipcount $ipgateway
     133
     134    if [ "`grep -i drbd /proc/cmdline`" ]; then
     135        # Time to exit for DRBD setup, the rest is for NETFS
     136        exit 0
     137    fi
     138
     139    # ping remote NETFS server
    132140    netfs_server_ipaddr=`echo $netfsmount | cut -d: -f1 | cut -d@ -f2`
     141    LogIt "INFO: Pinging Remote server $netfs_server_ipaddr ..."
    133142    ping -c $ipcount $netfs_server_ipaddr
    134143
Note: See TracChangeset for help on using the changeset viewer.