informatica:linux:raid
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
informatica:linux:raid [2015/01/11 10:06] – [Cambiar un disco] javi | informatica:linux:raid [2015/01/11 11:59] – [Para mirar el estado del RAID] javi | ||
---|---|---|---|
Line 444: | Line 444: | ||
http:// | http:// | ||
+ | |||
+ | === Cambiar disco en frio (apagando server) === | ||
+ | |||
+ | 1. Apagar servidor | ||
+ | |||
+ | 2. Desconectar disco que creemos que falla | ||
+ | |||
+ | 3. Arrancar servidor | ||
+ | |||
+ | 4. Entrar en la BIOS | ||
+ | |||
+ | supr | ||
+ | |||
+ | 5. Comprobar que el unico disco conectado es master. En mi caso en la BIOS Asus: | ||
+ | |||
+ | SATA6G_1 | ||
+ | |||
+ | 6. (Opcional) si el disco no estaba como master apagar servidor y conectar el disco como master cambiando cables y encender de nuevo | ||
+ | |||
+ | 7. Arrancar servidor | ||
+ | |||
+ | 8. Tocar flecha arriba/ | ||
+ | |||
+ | 9. Arrancar en modo recovery | ||
+ | |||
+ | 10. Decir que se quiere arrancar el RAID degradado | ||
+ | |||
+ | y | ||
+ | Enter | ||
+ | |||
+ | 11. Arrancar normal | ||
+ | |||
+ | TODO: provide menu label | ||
+ | Enter | ||
+ | |||
+ | 12. Ver las pariciones del disco bueno, en mi caso /dev/sda | ||
+ | |||
+ | sudo fdisk /dev/sda | ||
+ | < | ||
+ | The device presents a logical sector size that is smaller than | ||
+ | the physical sector size. Aligning to a physical sector (or optimal | ||
+ | I/O) size boundary is recommended, | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | p | ||
+ | < | ||
+ | Disk /dev/sda: 1000.2 GB, 1000204886016 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disk identifier: 0x000ab48f | ||
+ | |||
+ | | ||
+ | / | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | q | ||
+ | |||
+ | 13. Copiar el mismo particionado: | ||
+ | |||
+ | 13.1. Crear particion | ||
+ | |||
+ | sudo fdisk /dev/sdb | ||
+ | < | ||
+ | The device presents a logical sector size that is smaller than | ||
+ | the physical sector size. Aligning to a physical sector (or optimal | ||
+ | I/O) size boundary is recommended, | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | p | ||
+ | < | ||
+ | Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disk identifier: 0x4d1b267d | ||
+ | |||
+ | | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | n | ||
+ | < | ||
+ | Partition type: | ||
+ | | ||
+ | | ||
+ | Select (default p): | ||
+ | </ | ||
+ | |||
+ | Enter | ||
+ | < | ||
+ | Using default response p | ||
+ | Partition number (1-4, default 1): | ||
+ | </ | ||
+ | |||
+ | Enter | ||
+ | < | ||
+ | Using default value 1 | ||
+ | First sector (2048-1953525167, | ||
+ | </ | ||
+ | |||
+ | Enter | ||
+ | < | ||
+ | Using default value 2048 | ||
+ | Last sector, +sectors or +size{K, | ||
+ | </ | ||
+ | |||
+ | Enter | ||
+ | < | ||
+ | Using default value 1953525167 | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | w | ||
+ | < | ||
+ | The partition table has been altered! | ||
+ | |||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | </ | ||
+ | |||
+ | 13.2. Cambiar label | ||
+ | |||
+ | sudo fdisk /dev/sdb | ||
+ | < | ||
+ | The device presents a logical sector size that is smaller than | ||
+ | the physical sector size. Aligning to a physical sector (or optimal | ||
+ | I/O) size boundary is recommended, | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | t | ||
+ | < | ||
+ | Selected partition 1 | ||
+ | Hex code (type L to list codes): | ||
+ | </ | ||
+ | |||
+ | fd | ||
+ | < | ||
+ | Changed system type of partition 1 to fd (Linux RAID autodetect) | ||
+ | |||
+ | Command (m for help): | ||
+ | </ | ||
+ | |||
+ | w | ||
+ | < | ||
+ | The partition table has been altered! | ||
+ | |||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | </ | ||
+ | |||
+ | 14. Ver estado del raid: | ||
+ | |||
+ | cat / | ||
+ | < | ||
+ | Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] | ||
+ | md0 : active raid1 sda1[1] | ||
+ | 976629568 blocks super 1.2 [2/1] [_U] | ||
+ | | ||
+ | unused devices: < | ||
+ | </ | ||
+ | |||
+ | 15. Anyadir particion (en mi caso /dev/sdb1) al RAID (en mi caso md0) | ||
+ | |||
+ | sudo mdadm -a /dev/md0 /dev/sdb1 | ||
+ | < | ||
+ | mdadm: added /dev/sdb1 | ||
+ | </ | ||
+ | |||
+ | 16. Ver progreso | ||
+ | |||
+ | cat / | ||
+ | < | ||
+ | Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] | ||
+ | md0 : active raid1 sdb1[2] sda1[1] | ||
+ | 976629568 blocks super 1.2 [2/1] [_U] | ||
+ | [> | ||
+ | | ||
+ | unused devices: < | ||
+ | </ | ||
+ | |||
+ | 17. Install grub on the MBR of new hard disk | ||
+ | |||
+ | sudo grub-install /dev/sdb | ||
+ | < | ||
+ | / | ||
+ | Installation finished. No error reported. | ||
+ | </ | ||
+ | |||
+ | **TODO**: quiza esperar a que termine el rebuild | ||
informatica/linux/raid.txt · Last modified: 2020/11/15 13:11 by jose