User Tools

Site Tools


virtualization:xenserver:xenserver_storage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualization:xenserver:xenserver_storage [2017/02/11 16:19]
gcooper
virtualization:xenserver:xenserver_storage [2020/05/14 09:48] (current)
gcooper
Line 5: Line 5:
 ===== Examine ===== ===== Examine =====
  
-Show VDIs for a VM:+Show VDIs for a VM, then VDI details:
  
 <file> <file>
 xe vdi-list | grep -B1 -A5 -i <part_of_vm_name> xe vdi-list | grep -B1 -A5 -i <part_of_vm_name>
 +
 +xe vdi-list params=all uuid=<VDI-UUID>
 </file> </file>
 +
 +Show VBDs for a VDI:
 +
 +<file>
 +xe vbd-list vdi-uuid=<VDI-UUID>
 +</file>
 +
 +Examine a VHD file:
 +
 +
  
 Show SRs: Show SRs:
Line 18: Line 30:
 ll /var/run/sr-mount/ ll /var/run/sr-mount/
 </file> </file>
 +
 +===== Move a Storage Repository =====
 +
 +https://www.xenlens.com/move-lvmohba-shared-storage-repository-between-different-pools-or-hosts-with-vm-metadata-backup-and-restore/
  
 ===== Add a USB disk as a local SR ===== ===== Add a USB disk as a local SR =====
Line 33: Line 49:
 ===== Expose Unattached VDIs ===== ===== Expose Unattached VDIs =====
  
-:!: Careful! The last time I ran this, all disks were detached besides running VMs!  8-o+:!: **Be careful! The last time I ran this, all disks were detached besides running VMs!**  8-o
  
-Run this command and rescan the SR to see if it illuminates deletion candidates:+Run this command then rescan the SR to see if it illuminates deletion candidates:
  
 <file> <file>
-for uuid in $(xe vdi-list sr-uuid=<SR-UUID> | grep uuid | grep -v sr-uuid awk '{ print $5 }'); do xe vdi-forget uuid=$uuid; done+for uuid in $(xe vdi-list sr-uuid=<SR-UUID> --minimal tr ',"\n"); do xe vdi-forget uuid=$uuid; done
  
 xe sr-scan uuid=<SR-UUID> xe sr-scan uuid=<SR-UUID>
Line 51: Line 67:
 :!: Creating a full copy of a VM will also have the effect of consolidating all its virtual disks (parent-child). :!: Creating a full copy of a VM will also have the effect of consolidating all its virtual disks (parent-child).
  
-Copy:+:!: To move a VHD to a new SR, copy, attach, then delete the original when you are sure the new copy is working well.
  
 <file> <file>
Line 61: Line 77:
 xe vdi-list sr-uuid=<uuid-of-destination-sr> xe vdi-list sr-uuid=<uuid-of-destination-sr>
 </file> </file>
- 
-To move, copy then delete the original when you are sure the new copy is working well. 
  
 ===== Reset Disk Names ===== ===== Reset Disk Names =====
Line 132: Line 146:
 grep 'kernel: nfs: server [0-9.]* not responding, timed out' /var/log/messages grep 'kernel: nfs: server [0-9.]* not responding, timed out' /var/log/messages
 </file> </file>
- 
-===== Coalesce a VHD ===== 
- 
  
virtualization/xenserver/xenserver_storage.1486855174.txt.gz · Last modified: 2017/02/11 16:19 by gcooper