informatica:microservers
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:microservers [2020/11/08 16:48] – jose | informatica:microservers [2020/12/16 00:15] (current) – jose | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| + | ===== Poner IP fija: ===== | ||
| + | / | ||
| + | < | ||
| + | allow-hotplug eno1 | ||
| + | iface eno1 inet static | ||
| + | address 192.168.1.76 | ||
| + | netmask 255.255.255.0 | ||
| + | gateway 192.168.1.1 | ||
| + | dns-nameservers 192.168.1.1 8.8.8.8 8.8.4.4 | ||
| + | </ | ||
| ====== ILO ====== | ====== ILO ====== | ||
| Line 105: | Line 115: | ||
| ===== Configuración del RAID ===== | ===== Configuración del RAID ===== | ||
| - | blkid | + | ==== Formatear los discos ==== |
| + | Vemos como están las particiones: | ||
| + | fdisk -l | ||
| + | |||
| + | < | ||
| + | Disk /dev/sda: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors | ||
| + | Disk model: ST8000DM004-2CX1 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: gpt | ||
| + | Disk identifier: 02ED88CD-1EBC-445B-89DB-6522BEB7EA03 | ||
| + | |||
| + | Device | ||
| + | / | ||
| + | |||
| + | </ | ||
| + | < | ||
| + | |||
| + | Disk /dev/sdc: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors | ||
| + | Disk model: ST8000DM004-2CX1 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | < | ||
| + | Disk /dev/sde: 111.8 GiB, 120034123776 bytes, 234441648 sectors | ||
| + | Disk model: KINGSTON SA400S3 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: dos | ||
| + | Disk identifier: 0x57311578 | ||
| + | |||
| + | Device | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | |||
| + | </ | ||
| + | < | ||
| + | Disk /dev/sdd: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors | ||
| + | Disk model: ST8000DM004-2CX1 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | < | ||
| + | Disk /dev/sdb: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors | ||
| + | Disk model: ST8000DM004-2CX1 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | < | ||
| + | Disk /dev/sdf: 29.3 GiB, 31444697088 bytes, 61415424 sectors | ||
| + | Disk model: Internal SD-CARD | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: dos | ||
| + | Disk identifier: 0xeefb95d3 | ||
| + | |||
| + | Device | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Tenemos 4 discos de 8Tb Tenemos que poner label GPT y crear una partición como linux raid | ||
| + | |||
| + | Creamos label GPT seleccionando g: | ||
| + | fdisk /dev/sda | ||
| + | < | ||
| + | Command (m for help): g | ||
| + | Created a new GPT disklabel (GUID: 99B4091D-BC19-D542-9331-B99666D7F464). | ||
| + | The old dos signature will be removed by a write command. | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | Ahora creamos la partición y luego modificamos a LINUX RAID | ||
| + | root@nas:~# fdisk /dev/sda | ||
| + | < | ||
| + | Welcome to fdisk (util-linux 2.33.1). | ||
| + | Changes will remain in memory only, until you decide to write them. | ||
| + | Be careful before using the write command. | ||
| + | |||
| + | |||
| + | Command (m for help): p | ||
| + | Disk /dev/sdd: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors | ||
| + | Disk model: ST8000DM004-2CX1 | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: gpt | ||
| + | Disk identifier: 99B4091D-BC19-D542-9331-B99666D7F464 | ||
| + | |||
| + | Command (m for help): n | ||
| + | Partition number (1-128, default 1): | ||
| + | First sector (2048-15628053134, | ||
| + | Last sector, +/-sectors or +/ | ||
| + | |||
| + | Created a new partition 1 of type 'Linux filesystem' | ||
| + | |||
| + | Command (m for help): t | ||
| + | Selected partition 1 | ||
| + | Partition type (type L to list all types): 29 | ||
| + | Changed type of partition 'Linux filesystem' | ||
| + | |||
| + | Command (m for help): w | ||
| + | The partition table has been altered. | ||
| + | Calling ioctl() to re-read partition table. | ||
| + | Syncing disks. | ||
| + | </ | ||
| + | |||
| + | Nos tienen que quedar así: | ||
| + | root@nas:~# blkid | ||
| + | < | ||
| + | /dev/sde1: UUID=" | ||
| + | /dev/sde5: UUID=" | ||
| + | /dev/sda1: UUID=" | ||
| + | /dev/sdb1: UUID=" | ||
| + | /dev/sdc1: UUID=" | ||
| + | /dev/sdd1: UUID=" | ||
| + | /dev/sdf1: LABEL=" | ||
| + | </ | ||
| + | |||
| + | ==== Crear el RAID ==== | ||
| + | En este caso ya teníamos un RAID y primero hay que borrarlo porque se queda colgado: | ||
| + | root@nas:~# cat / | ||
| + | < | ||
| + | Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] | ||
| + | md127 : inactive sda1[0](S) | ||
| + | 7813893447 blocks super 1.2 | ||
| + | |||
| + | unused devices: < | ||
| + | </ | ||
| + | |||
| + | Lo borramos: | ||
| + | root@nas: | ||
| + | mdadm: stopped / | ||
| + | Ahora si lo podemos crear: | ||
| + | root@nas:~# mdadm --create --verbose /dev/md0 --raid-devices=4 --level=raid5 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 | ||
| + | |||
| + | < | ||
| + | mdadm: layout defaults to left-symmetric | ||
| + | mdadm: layout defaults to left-symmetric | ||
| + | mdadm: chunk size defaults to 512K | ||
| + | mdadm: /dev/sda1 appears to be part of a raid array: | ||
| + | | ||
| + | mdadm: size set to 7813893120K | ||
| + | mdadm: automatically enabling write-intent bitmap on large array | ||
| + | Continue creating array? y | ||
| + | mdadm: Defaulting to version 1.2 metadata | ||
| + | mdadm: array /dev/md0 started. | ||
| + | </ | ||
| + | |||
| + | |||
| + | Montamos el RAID por UUID | ||
| + | | ||
| < | < | ||
| Line 241: | Line 420: | ||
| Vemos que ha escrito en la tarjeta: | Vemos que ha escrito en la tarjeta: | ||
| + | < | ||
| lost+found | lost+found | ||
| boot | boot | ||
| Line 285: | Line 464: | ||
| nas/VERSION | nas/VERSION | ||
| nas/README | nas/README | ||
| + | |||
| + | </ | ||
| Reiniciamos y arrancamos desde la tarjeta pulsando F11: | Reiniciamos y arrancamos desde la tarjeta pulsando F11: | ||
| Line 303: | Line 484: | ||
| Pulsamos siempre 1) por defecto en todas las preguntas, al no ser que queremos hacer algún cambio, como los layouts, por si el disco destino es mas pequeño de tamaño. | Pulsamos siempre 1) por defecto en todas las preguntas, al no ser que queremos hacer algún cambio, como los layouts, por si el disco destino es mas pequeño de tamaño. | ||
| + | |||
| + | Tarda un minuto | ||
| Cuando acabe, reiniciamos y ya lo tenemos recuperado. | Cuando acabe, reiniciamos y ya lo tenemos recuperado. | ||
informatica/microservers.1604854124.txt.gz · Last modified: by jose
