Changeset 2569 in MondoRescue for branches/2.2.10/mindi/mindi


Ignore:
Timestamp:
Feb 2, 2010, 10:40:28 AM (14 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2545:2567 /mondorescue/branches/2.2.9

  • Improve device exclusion for LVM by adding support for symlinks and mapper systematically at all levels (PV, VG, LV). Shoul

d really provvide the best support possible for LVM exclusion.

  • Now supports also exclusion of LVs directly
  • Improve mindi by handling excluded devices earlier in the loop.
  • Fix LV exclusion when VGs are excluded (the excludedvgs file has to be removed at start and end of analyze-my-lvm not in fu

nctions, as they are called multiple times)

  • Rename some variables exported to avoid accidental conflict (EXCLUDE_DEVS => MINDI_EXCLUDE_DEVS and ADDITIONAL_BOOT_PARAMS

=> MINDI_ADDITIONAL_BOOT_PARAMS)

  • setfattr also needs the -h flag to restore attributes on symlinks, not on the target file (which may not exist BTW). Should solve #388.
  • Using forcemods="mod1 mod2" will now do something and load those modules first
  • Update web page on distributions to download
  • Add support for ums_cypress module in mindi
  • Fix acl backup which was completely wrong.
  • Fix a bug where LV were not created anymore if no exclusion !!
  • In analyze-my-lvm only use pv.tmp2 when it exists to avoid error msgs

-Adds support for links to modules (.ko pointing to .o) such as with VMWare extensions

  • Adds i-want-my-lvm content in mindi log file
  • Adds vmxnet3 driver support to mindi for some VMWare versions
  • Fix a typo in the way device mapper files where excluded
  • use option -h of getfattr to *not* follow symlinks, which breaks RHEL 5.4 as reported in #388. However, getfacl doesn't provide such an option.
  • Adds some logs for filelist creation
  • Remove option -P from getfattr which may also skip symlinks - Attempt to solve #388
  • Exclude rpc_pipefs type of filesystems from find
  • Suppress unused mode_of_file function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2546 r2569  
    2020
    2121# In case of problem with udev you can try to add udevdebug
    22 ADDITIONAL_BOOT_PARAMS="devfs=nomount noresume selinux=0 barrier=off udevtimeout=10"
     22MINDI_ADDITIONAL_BOOT_PARAMS="devfs=nomount noresume selinux=0 barrier=off udevtimeout=10"
    2323
    2424MINDI_REV=PBREV
     
    5858IDE_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 ide-core ide_core ide-gd_mod edd paride ata_generic ata_piix libata dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis amd74xx sis5513 jmicron sata_promise sata_via serverworks"
    5959PCMCIA_MODS="pcmcia_core ds yenta_socket"
    60 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless"
    61 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet exportfs fuse libcrc32c crc32c"
     60USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress"
     61NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c"
    6262CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660"
    6363# Those modules will only go on the backup media, not the boot media.
     
    439439        return 1
    440440    fi
    441     modpaths=`find $1 -name $2.*o -type f`
    442     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f`
    443     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f`
    444     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2 -type f`
     441    # Find all files and links (required for some VMWare VMs)
     442    modpaths=`find $1 -name $2.*o -type f -o -type l`
     443    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f -o -type l`
     444    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f -o -type l`
     445    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2 -type f -o -type l`
    445446    echo "$modpaths"
    446447}
     
    11531154        fi
    11541155
     1156        # Look for devices which have to be excluded
     1157        skip=0
     1158        if [ "$MINDI_EXCLUDE_DEVS" ] ; then
     1159            for d in $MINDI_EXCLUDE_DEVS ; do
     1160                if  [ "`echo " $current_partition " | grep " $d"`" != "" ]; then
     1161                    echo "Excluding $current_partition from mountlist (due to excluded device $d)" >> $LOGFILE
     1162                    skip=1
     1163                    continue
     1164                fi
     1165            done
     1166        fi
     1167        if [ $skip -eq 1 ]; then
     1168            continue
     1169        fi
     1170
    11551171        partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB`
    11561172        # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab
     
    12341250            fi
    12351251        fi
    1236         skip=0
    1237         if [ "$EXCLUDE_DEVS" ] ; then
    1238             for d in $EXCLUDE_DEVS ; do
    1239                 if  [ "`echo " $current_partition " | grep " $d"`" != "" ]; then
    1240                     LogFile "Excluding $current_partition from mountlist (due to excluded device $d)"
    1241                     skip=1
    1242                     continue
    1243                 fi
    1244             done
    1245         fi
    1246         if [ $skip -eq 1 ]; then
    1247             continue
    1248         fi
     1252
    12491253        if [ ! "$partition_mountpt" ] ; then
    12501254            LogFile "------- $FDISK -l $qq log ------------"
     
    16111615        [ "$ooo" = "RESTORE" ] && ooo="nuke"
    16121616        if [ "$type" = "elilo" ]; then
    1613             outstr="image=/vmlinuz\n\tlabel=$i\n\tinitrd=/initrd.img\n\troot=/dev/ram0 append=\" rw ramdisk_size=$ramdisk_size $ooo $ADDITIONAL_BOOT_PARAMS \"\n"
     1617            outstr="image=/vmlinuz\n\tlabel=$i\n\tinitrd=/initrd.img\n\troot=/dev/ram0 append=\" rw ramdisk_size=$ramdisk_size $ooo $MINDI_ADDITIONAL_BOOT_PARAMS \"\n"
    16141618        else
    16151619            ps="/"
     
    16171621                ps=""
    16181622            fi
    1619             outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $ADDITIONAL_BOOT_PARAMS\n"
     1623            outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n"
    16201624        fi
    16211625        echo -en "$outstr"
     
    18511855            LVM="false"
    18521856            rm -f $bigdir/tmp/i-want-my-lvm
     1857        else
     1858            echo "Your i-want-my-lvm file content is:" >> $LOGFILE
     1859            echo "-----------------------------------" >> $LOGFILE
     1860            cat  $bigdir/tmp/i-want-my-lvm >> $LOGFILE
     1861            echo "-----------------------------------" >> $LOGFILE
    18531862        fi
    18541863    fi
     
    23112320        dd if=$tempfile bs=1k 2> /dev/null > ${rdz_fname}.tmp 2> /dev/null
    23122321        bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2 | sed 's/^ *//'`
    2313         ADDITIONAL_BOOT_PARAMS="$ADDITIONAL_BOOT_PARAMS ramdisk_blocksize=$bs"
     2322        MINDI_ADDITIONAL_BOOT_PARAMS="$MINDI_ADDITIONAL_BOOT_PARAMS ramdisk_blocksize=$bs"
    23142323        gzip -c9 ${rdz_fname}.tmp > $rdz_fname
    23152324        rm -f ${rdz_fname}.tmp
     
    26442653        fi
    26452654        ESTIMATED_TOTAL_NOOF_SLICES=${12}
    2646         export EXCLUDE_DEVS="${13}"
     2655        export MINDI_EXCLUDE_DEVS="${13}"
    26472656        USE_COMP="${14}"
    26482657        USE_LILO="${15}"
Note: See TracChangeset for help on using the changeset viewer.