Difference between revisions of "Network/Procedures/Helpful Commands"
From Makers Local 256
< Network
(Created helpful commands page) |
(add drbd un-primary commands) |
||
Line 1: | Line 1: | ||
* Take a backup of a disk and output it to a timestamped image file with bzip2 compression. | * Take a backup of a disk and output it to a timestamped image file with bzip2 compression. | ||
** <code>sudo dd if=/dev/mapper/vm2_storage-newldap_root | pv | bzip2 > newldap_root-$(date +%s).img.bz2</code> | ** <code>sudo dd if=/dev/mapper/vm2_storage-newldap_root | pv | bzip2 > newldap_root-$(date +%s).img.bz2</code> | ||
+ | * 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> |
Latest revision as of 19:47, 26 November 2019
- 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>