Network/Procedures/Helpful Commands

From Makers Local 256
Jump to: navigation, search
  • Take a backup of a disk and output it to a timestamped image file with bzip2 compression.
    • sudo dd if=/dev/mapper/vm2_storage-newldap_root | pv | bzip2 > newldap_root-$(date +%s).img.bz2
  • If disks are primary where they shouldn't be, this is how you get that fixed
    • xl destroy <vm_name>
    • drbdadm secondary <disk_name> (note the error message from this command, it gives you the number you need for the next one)
    • multipathd -k
      • del path drbd<number>
      • quit
    • drbdadm secondary <disk_name>