XenServer 6.5 - Adicionando Local Storage
Autor: Marcos | Publicado: 2015-06-17T13:18:00-03:00

Buenas,

O que veremos é a criação do localstorage na versão 6.5 do xenerver http://xenserver.org/&nbsp;.

Primeira coisa é verificar as partições criadas...

# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d0'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/cciss/c0d0: 500.0 GB, 500051402752 bytes
256 heads, 63 sectors/track, 60556 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Device Boot &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp;Blocks &nbsp; Id &nbsp;System
/dev/cciss/c0d0p1 &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; 60557 &nbsp; 488331447+ &nbsp;ee &nbsp;EFI GPT


Perceba que ele tem apenas uma partição criada.... OK então você vai se perguntar mas como que uma VM de 12Gb não importa em um disco de 500GB? Logo fizemos um df para verificar o espaço utilizado do / "Não é surpresa que ele tenha 4Gb para a instalação" para mais informações&nbsp;http://xenserver.org/discuss-virtualization/virtualization-blog/entry/xenserver-root-disk-maintenance.html&nbsp;

# df -h
Filesystem &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Size &nbsp;Used Avail Use% Mounted on
/dev/cciss/c0d0p1 &nbsp; &nbsp; 4.0G &nbsp;1.8G &nbsp;2.0G &nbsp;49% /
none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;299M &nbsp; 16K &nbsp;299M &nbsp; 1% /dev/shm
/opt/xensource/packages/iso/XenCenter.iso
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;56M &nbsp; 56M &nbsp; &nbsp; 0 100% /var/xen/xc-install

Ok, mas cada os outros GB???? Simples assim, vamos listar as partições dentro da partição..

# fdisk -l /dev/cciss/c0d0p1&nbsp;

Disk /dev/cciss/c0d0p1: 4293 MB, 4293936128 bytes
255 heads, 32 sectors/track, 1027 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Device Boot &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp;Blocks &nbsp; Id &nbsp;System
/dev/cciss/c0d0p1p1 &nbsp; ? &nbsp; &nbsp; &nbsp;395160 &nbsp; &nbsp; &nbsp;448208 &nbsp; 216435558+ &nbsp; 7 &nbsp;HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/cciss/c0d0p1p2 &nbsp; ? &nbsp; &nbsp; &nbsp;400983 &nbsp; &nbsp; &nbsp;640378 &nbsp; 976730017 &nbsp; 16 &nbsp;Hidden FAT16
Partition 2 does not end on cylinder boundary.
/dev/cciss/c0d0p1p3 &nbsp; ? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 &nbsp; 6f &nbsp;Unknown
Partition 3 does not end on cylinder boundary.
/dev/cciss/c0d0p1p4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;6153 &nbsp; &nbsp; &nbsp;119429 &nbsp; 462167897 &nbsp; &nbsp;0 &nbsp;Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order


SHOW!!! Perceba que o &nbsp;/dev/cciss/c0d0p1p3&nbsp;esta marcado como unknown então vamos verificar o que ela tem...

# fdisk -l /dev/cciss/c0d0p3&nbsp;

Disk /dev/cciss/c0d0p3: 491.4 GB, 491460402688 bytes
255 heads, 32 sectors/track, 117632 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Disk /dev/cciss/c0d0p3 doesn't contain a valid partition table


BINGO! Esta nesta partição os outros GB escondidos.....

Agora o que nos resta é criar o Storage Local.

Primeiro você precisa o UUID so servidor para isso...

# xe host-list
uuid ( RO) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 2df79ee1-a6b3-49aa-b272-22c13fbf4573
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name-label ( RW): xenserver3.interno.local
&nbsp; &nbsp; name-description ( RW): Default install of XenServer



Copie o UUID (RO) pois você ira utilizar na hora de criar o Local Storage...


# xe sr-create content-type=user type=lvm host-uuid=2df79ee1-a6b3-49aa-b272-22c13fbf4573 device-config-device=/dev/cciss/c0d0p3 name-label="DISCO LOCAL"&nbsp;
723420df-5342-c398-5f7c-45d5116a6b71

Pronto, storage local criado se for utilizar ele como default storage marque ele como default via XenCenter ou por CLI.

# xe pool-list
uuid ( RO) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: ee00c29a-64ac-fc8e-13a5-40a0308db86b
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name-label ( RW):&nbsp;
&nbsp; &nbsp; name-description ( RW):&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; master ( RO): 2df79ee1-a6b3-49aa-b272-22c13fbf4573
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default-SR ( RW): &lt;not in database&gt;

# xe pool-param-set uuid=ee00c29a-64ac-fc8e-13a5-40a0308db86b default-SR=723420df-5342-c398-5f7c-45d5116a6b71

Pronto, esta montado o LocalStorge.


Frankenstein - Nome dado ao meu querido servidor de testes que segura a barra de tudo...