Changeset 2072 in MondoRescue for branches/2.2.8/mondo


Ignore:
Timestamp:
Dec 5, 2008, 3:32:59 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • Adds multipath support (as exists on RHEL 5.2)
    • analyze-my-lvm/mindi uses the /dev/mapper/mpath... entry and not /dev/dm-... entry which is not automatically created at restore time
    • Lots of mapth dmsetup commands added to deplist
    • Adds required modules to mindi
    • Fix a bug for this in mindi around real devices with /dev/mapper/mpath... names
    • init has a new StartMpath function to start multipath correctly hopefully
    • mondorestore has a new clean_multiconf function which removes /var/lib/multipath/bindings and edits /etc/multipath.conf if needed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mondo/src/mondorestore/mondorestore.c

    r2061 r2072  
    366366    asprintf(&tmp1,"%s/etc/blkid.tab.old",bkpinfo->restore_path);
    367367    (void)unlink(tmp1);
     368    paranoid_free(tmp1);
     369}
     370
     371
     372static void clean_multiconf() {
     373
     374    char *tmp1 = NULL;
     375
     376    /* Clean up multiconf cache file if they exist */
     377    asprintf(&tmp1,"%s/var/lib/multipath/bindings",bkpinfo->restore_path);
     378    (void)unlink(tmp1);
     379    paranoid_free(tmp1);
     380
     381    /* Edit multipath.conf if needed to adapt wwid */
     382    asprintf(&tmp1,"%s/etc/multipath.conf", MNT_RESTORING);
     383    if (does_file_exist(tmp1)) {
     384        log_msg(2, "We may need to clean /etc/multipath.conf");
     385    } else {
     386        paranoid_free(tmp1);
     387        return();
     388    }
     389    paranoid_free(tmp1);
     390    asprintf(&tmp1,"chroot %s %s /etc/multipath.conf", MNT_RESTORING, editor);
     391    paranoid_system(tmp1);
    368392    paranoid_free(tmp1);
    369393}
     
    612636
    613637    clean_blkid();
     638    clean_multiconf();
    614639    protect_against_braindead_sysadmins();
    615640    retval += unmount_all_devices(mountlist);
     
    845870    }
    846871    clean_blkid();
     872    clean_multiconf();
    847873    protect_against_braindead_sysadmins();
    848874    retval += unmount_all_devices(mountlist);
Note: See TracChangeset for help on using the changeset viewer.