proxmox:proxmox4
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
proxmox:proxmox4 [2016/09/12 15:08] – jose | proxmox:proxmox4 [2019/08/03 19:32] (current) – jose | ||
---|---|---|---|
Line 4: | Line 4: | ||
En resumen, en cada disco creo 3 particiones: | En resumen, en cada disco creo 3 particiones: | ||
- | 32 Gb / y RAID | + | |
- | 4 Gb swap | + | 4 Gb swap |
- | Lo que sobre RAID | + | Lo que sobre para glusterfs |
- | Y hacemos | + | Y hacemos |
- | Cuando instalo se queda el segundo RAID (el de datos) así: | + | ====== Configuración |
- | # cat / | + | Hacemos un bonding y encima un bridge con las dos tarjetas. |
- | md1 : active (auto-read-only) raid1 sdb3[1] sda3[0] | + | /etc/network/interfaces |
- | resync=PENDING | + | |
- | + | ||
- | Para forzar resync: | + | |
- | | + | |
- | Montamos el segundo RAID como datos. Miramos el UUID: | ||
< | < | ||
- | # blkid | + | auto lo |
- | /dev/sda1: UUID=" | + | iface lo inet loopback |
- | /dev/sda2: UUID=" | + | |
- | /dev/sda3: UUID=" | + | iface eth0 inet manual |
- | /dev/sdb1: UUID=" | + | |
- | /dev/sdb2: UUID=" | + | iface eth1 inet manual |
- | /dev/sdb3: UUID=" | + | |
- | /dev/md0: UUID=" | + | auto bond0 |
- | /dev/md1: UUID=" | + | iface bond0 inet manual |
+ | slaves eth0 eth1 | ||
+ | bond-mode 802.3ad | ||
+ | bond-miimon 100 | ||
+ | |||
+ | auto vmbr0 | ||
+ | iface vmbr0 inet static | ||
+ | address | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bridge_fd 0 | ||
</ | </ | ||
- | Añadimos en el fstab: | + | En el switch tenemos que activar port trunk. En mi caso es un tplink tl sg 1024de y entro a la configuración en 192.168.0.1 |
- | UUID=c3e9ffe8-fb24-405d-abf9-885f201d68c4 | + | |
+ | {{:proxmox: | ||
+ | |||
+ | ===== Configurado red containers ===== | ||
+ | /etc/ | ||
+ | net0: name=eth0, | ||
+ | net1: name=eth1, | ||
+ | |||
====== Instalación Proxmox ====== | ====== Instalación Proxmox ====== | ||
Line 69: | Line 84: | ||
Desde el primer nodo que será master | Desde el primer nodo que será master | ||
< | < | ||
- | root@proxmox01:/gluster# pvecm create clusterproxmox | + | root@proxmox1:~# pvecm create clusterproxmox |
Corosync Cluster Engine Authentication key generator. | Corosync Cluster Engine Authentication key generator. | ||
Gathering 1024 bits for key from / | Gathering 1024 bits for key from / | ||
Writing corosync key to / | Writing corosync key to / | ||
- | root@proxmox01:/gluster# pvecm status | + | </ |
+ | |||
+ | < | ||
+ | root@proxmox1:~# pvecm status | ||
Quorum information | Quorum information | ||
------------------ | ------------------ | ||
- | Date: Tue Aug 11 23:23:53 2015 | + | Date: Mon Sep 12 22:37:19 2016 |
Quorum provider: | Quorum provider: | ||
Nodes: | Nodes: | ||
Node ID: 0x00000001 | Node ID: 0x00000001 | ||
- | Ring ID: 4 | + | Ring ID: |
Quorate: | Quorate: | ||
Line 94: | Line 112: | ||
---------------------- | ---------------------- | ||
Nodeid | Nodeid | ||
- | 0x00000001 | + | 0x00000001 |
</ | </ | ||
- | Desde el segundo nodo | + | Desde el segundo nodo lo añadimos poniendo la ip del primero |
< | < | ||
- | root@proxmox02:/mnt# pvecm add 192.168.1.4 | + | root@proxmox2:~# pvecm add 192.168.2.1 |
- | The authenticity of host ' | + | The authenticity of host ' |
- | ECDSA key fingerprint is 8a:88:8a:2a:d2:8f:96:62:c1:85:ab:fc:c7:23:00:11. | + | ECDSA key fingerprint is 3a:17:aa:ca:c4:1b:55:2a:12:bb:fe:b4:ed:af:1e:af. |
Are you sure you want to continue connecting (yes/no)? yes | Are you sure you want to continue connecting (yes/no)? yes | ||
- | root@192.168.1.4's password: | + | root@192.168.2.1's password: |
copy corosync auth key | copy corosync auth key | ||
stopping pve-cluster service | stopping pve-cluster service | ||
Line 111: | Line 129: | ||
merge known_hosts file | merge known_hosts file | ||
restart services | restart services | ||
- | successfully added node 'proxmox02' to cluster. | + | successfully added node 'proxmox2' to cluster. |
+ | </ | ||
+ | |||
+ | Ahora vemos que ya hay dos miembros: | ||
+ | < | ||
+ | root@proxmox1: | ||
+ | Quorum information | ||
+ | ------------------ | ||
+ | Date: Mon Sep 12 22:47:44 2016 | ||
+ | Quorum provider: | ||
+ | Nodes: | ||
+ | Node ID: 0x00000001 | ||
+ | Ring ID: 1/12 | ||
+ | Quorate: | ||
+ | |||
+ | Votequorum information | ||
+ | ---------------------- | ||
+ | Expected votes: | ||
+ | Highest expected: 2 | ||
+ | Total votes: | ||
+ | Quorum: | ||
+ | Flags: | ||
+ | |||
+ | Membership information | ||
+ | ---------------------- | ||
+ | Nodeid | ||
+ | 0x00000001 | ||
+ | 0x00000002 | ||
</ | </ | ||
Line 186: | Line 232: | ||
Fichero /etc/fstab | Fichero /etc/fstab | ||
+ | < | ||
#brick 1 | #brick 1 | ||
UUID=" | UUID=" | ||
Line 192: | Line 238: | ||
#brick 2 | #brick 2 | ||
UUID=" | UUID=" | ||
+ | </ | ||
Creamos el volúmen. Mejor un volumen grande que dos pequeños: | Creamos el volúmen. Mejor un volumen grande que dos pequeños: | ||
gluster volume create volumen_gluster replica 2 transport tcp proxmox1:/ | gluster volume create volumen_gluster replica 2 transport tcp proxmox1:/ | ||
Line 227: | Line 273: | ||
/etc/fstab | /etc/fstab | ||
proxmox1:/ | proxmox1:/ | ||
- | | ||
- | En un container lxc falla, hay que crear fuse a mano: | ||
- | mknod /dev/fuse c 10 229 | ||
- | |||
| | ||
====== Almacenamiento compartido Proxmox ====== | ====== Almacenamiento compartido Proxmox ====== | ||
Line 243: | Line 285: | ||
{{: | {{: | ||
+ | ====== NFS ====== | ||
+ | Montamos el recurso por nfs en el servidor de proxmox. En los containers los montamos por bind: | ||
+ | |||
+ | En la carpeta / | ||
+ | |||
+ | **Nota:** No poner / delante de container/ | ||
+ | lxc.mount.entry: | ||
+ | **Fuente:** https:// | ||
+ | Ejemplo: | ||
+ | lxc.mount.entry: | ||
+ | lxc.mount.entry: |
proxmox/proxmox4.1473692903.txt.gz · Last modified: 2016/09/12 15:08 by jose