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
hypervisor:base:storage [2015/03/05 01:31]
admin [Create a Storage Repository]
hypervisor:base:storage [2015/03/05 12:45] (current)
admin [Delete a Storage Repository]
Line 55: Line 55:
 If you follow the [[sample:​base|Sample Configuration]] section of this wiki, you will have a LVM partition, thus a physical volume to use: If you follow the [[sample:​base|Sample Configuration]] section of this wiki, you will have a LVM partition, thus a physical volume to use:
 <​code>​ <​code>​
-> pvdisplay+sudo pvdisplay 
   --- Physical volume ---   --- Physical volume ---
-  PV Name               /dev/sda2 +  PV Name               /dev/sde5 
-  VG Name               xenvg +  VG Name               Xvg0 
-  PV Size               464.83 GiB / not usable ​0   +  PV Size               12.82 GiB / not usable ​3.00 MiB
   Allocatable ​          ​yes ​   Allocatable ​          ​yes ​
   PE Size               4.00 MiB   PE Size               4.00 MiB
-  Total PE              ​118996 +  Total PE              ​3282 
-  Free PE               112322 +  Free PE               5 
-  Allocated PE          ​6674 +  Allocated PE          ​3277 
-  PV UUID               4g97od-AZ1M-8sws-7ghY-YPaT-PsPR-mpO3iy+  PV UUID               sJOaJc-vZzX-1d8O-2R5i-jmi5-Gkj4-S4rxdJ
 </​code>​ </​code>​
  
 Along with a volume group: Along with a volume group:
 <​code>​ <​code>​
-> vgdisplay +sudo vgdisplay 
-  --- Volume group --- + 
-  VG Name               xenvg+--- Volume group --- 
 +  VG Name               Xvg0
   System ID                System ID             
   Format ​               lvm2   Format ​               lvm2
   Metadata Areas        1   Metadata Areas        1
-  Metadata Sequence No  ​22+  Metadata Sequence No  ​7
   VG Access ​            ​read/​write   VG Access ​            ​read/​write
   VG Status ​            ​resizable   VG Status ​            ​resizable
   MAX LV                0   MAX LV                0
-  Cur LV                ​3 +  Cur LV                ​1 
-  Open LV               3+  Open LV               1
   Max PV                0   Max PV                0
   Cur PV                1   Cur PV                1
   Act PV                1   Act PV                1
-  VG Size               464.83 GiB+  VG Size               12.82 GiB
   PE Size               4.00 MiB   PE Size               4.00 MiB
-  Total PE              ​118996 +  Total PE              ​3282 
-  Alloc PE / Size       6674 26.07 GiB +  Alloc PE / Size       3277 12.80 GiB 
-  Free  PE / Size       112322 ​438.76 GiB +  Free  PE / Size       20.00 MiB 
-  VG UUID               yf4fNc-5Nke-5SCd-Jqo6-ie9c-gH7r-8dCE66+  VG UUID               Skt7yP-fl4B-IxvG-VUA4-KcJH-1Mho-2QASh8
 </​code>​ </​code>​
  
Line 97: Line 99:
  
 If you do not already have a device to use as repository, create a logical volume on volume group. If you do not already have a device to use as repository, create a logical volume on volume group.
 +
 <​code>​ <​code>​
-> lvcreate --size ​30G -n LocalStorage xenvg+sudo lvcreate --size ​13G -n Xsr0 Xvg0
 </​code>​ </​code>​
  
Line 108: Line 111:
 You should see your partition in a line such as: You should see your partition in a line such as:
 <​code>​ <​code>​
-Disk /​dev/​mapper/​xenvg-LocalStorage32.GB, 32212254720 ​bytes+... 
 +Disk /​dev/​mapper/​Xvg0-Xsr013.GB, 13744734208 ​bytes 
 +...
 </​code>​ </​code>​
  
 ==== Register the logical volume for use with XAPI ==== ==== Register the logical volume for use with XAPI ====
 <​code>​ <​code>​
-> xe sr-create type=ext name-label='​LocalStorage' device-config:​device=/​dev/​mapper/​xenvg-LocalStorage+> xe sr-create type=ext name-label='​X-Local-SR' device-config:​device=/​dev/​mapper/​Xvg0-Xsr0
 </​code>​ </​code>​
 This will take a while if the volume is large, it will return the SR UUID. This will take a while if the volume is large, it will return the SR UUID.
Line 119: Line 124:
 Display the storage repository: Display the storage repository:
 <​code>​ <​code>​
-> xe sr-list name-label='​LocalStorage'+> xe sr-list name-label='​X-Local-SR'
 </​code>​ </​code>​
  
Line 186: Line 191:
 </​code>​ </​code>​
  
-NOTE: at this stage the logical volume ​will still exist in the LVM partition.+NOTE: at this stage the SR data will still exist in the LVM partition, you could also use the //**xe sr-destroy**//​ command to totally wipe out the SR, loosing everything that was on it!
  
 ===== Using NFS ===== ===== Using NFS =====