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 [2014/11/08 09:53]
gcooper
virtualization:xenserver:xenserver_storage [2020/05/14 09:48] (current)
gcooper
Line 1: Line 1:
 ====== XenServer Storage Notes ====== ====== XenServer Storage Notes ======
  
-===== Show VDIs for a VM =====+http://wiki.christophchamp.com/index.php?title=Vhd-util 
 + 
 +===== Examine ====
 + 
 +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:
 +
 +<file>
 +xe sr-list
 +
 +ll /var/run/sr-mount/
 +</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 21: Line 49:
 ===== Expose Unattached VDIs ===== ===== Expose Unattached VDIs =====
  
-Run this command and rescan the SR to see if it illuminates deletion candidates:+:!: **Be careful! The last time I ran this, all disks were detached besides running VMs!**  8-o 
 + 
 +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 37: 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 47: 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 118: 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>
 +
virtualization/xenserver/xenserver_storage.1415465598.txt.gz · Last modified: 2014/11/08 09:53 by gcooper