❗️Toto je původní verze internetového fóra ISPforum.cz do února 2020 bez možnosti registrace nových uživatelů. Aktivní verzi fóra naleznete na adrese https://telekomunikace.cz

Linux raid - problém s bootem

Příspěvky, které nespadají do žádného z vytvořených fór.
hol
Příspěvky: 883
Registrován: 16 years ago
antispam: Ano

Linux raid - problém s bootem

Příspěvekod hol » 7 years ago

počítám, že mi odešlete na root.cz, ale zkusím to nejřív tady, už jsme na sebe zvyklí :)

Máme jeden server na debainu, co po výměně základní desky začal blbnout s bootováním. Divné na tom je, že občas najede, občas ne. Typicky po restartu nenajede, pak to párkrát přes ILO rebootnu a najednou to jde. Chybu hlásí, že nemuže najít LVM oddíl.

IMG_20180305_113215.jpg
IMG_20180305_113215.jpg (175.3 KiB) Zobrazeno 827 x


raid je v pohodě, v logu žádný chyby
/dev/md0:
Version : 1.2
Creation Time : Mon Jul 14 11:00:08 2014
Raid Level : raid1
Array Size : 705984 (689.55 MiB 722.93 MB)
Used Dev Size : 705984 (689.55 MiB 722.93 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Mon Mar 5 12:32:09 2018
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : hol-superserver:0 (local to host hol-superserver)
UUID : ed5f1c73:ac749b4f:222b4823:0f736e57
Events : 272

Number Major Minor RaidDevice State
2 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2

oba disky na sobě mají grub, z obou to bootuje. Grub vždy najede, ale pak to skončí na tom lvm.

nemáte někdo nápad, čím by to mohlo být?




root@hol-superserver:~# fdisk -l

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0916018C-D7F2-470E-AE28-041EBE3C1402

Device Start End Sectors Size Type
/dev/sda1 2048 585727 583680 285M BIOS boot
/dev/sda2 585728 1998847 1413120 690M Linux RAID
/dev/sda3 1998848 1953523711 1951524864 930.6G Linux RAID

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 69CF5E22-F7E8-49F1-87C5-1ACAFB053039

Device Start End Sectors Size Type
/dev/sdb1 2048 585727 583680 285M BIOS boot
/dev/sdb2 585728 1998847 1413120 690M Linux RAID
/dev/sdb3 1998848 1953523711 1951524864 930.6G Linux RAID

Disk /dev/sdc: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1A8553ED-62B2-4712-9FC7-C3DDDC407435

Device Start End Sectors Size Type
/dev/sdc1 2048 7814035455 7814033408 3.7T Linux filesystem

Disk /dev/sdd: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8606e10f

Device Boot Start End Sectors Size Id Type
/dev/sdd1 63 2047 1985 992.5K 42 SFS
/dev/sdd2 * 2048 206847 204800 100M 42 SFS
/dev/sdd3 206848 186230783 186023936 88.7G 42 SFS
/dev/sdd4 186230784 468860079 282629296 134.8G 42 SFS

Disk /dev/sde: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc094cc45

Device Boot Start End Sectors Size Id Type
/dev/sde1 63 2047 1985 992.5K 42 SFS
/dev/sde2 * 2048 206847 204800 100M 42 SFS
/dev/sde3 206848 186230783 186023936 88.7G 42 SFS
/dev/sde4 186230784 468860079 282629296 134.8G 42 SFS

Disk /dev/md0: 689.4 MiB, 722927616 bytes, 1411968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md1: 930.4 GiB, 999046512640 bytes, 1951262720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/lvm--group-lvm--root: 14 GiB, 14998831104 bytes, 29294592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/lvm--group-lvm--swap: 29.8 GiB, 31998345216 bytes, 62496768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/lvm--group-lvm--var: 4.7 GiB, 4999610368 bytes, 9764864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/lvm--group-lvm--data: 882 GiB, 947048677376 bytes, 1849704448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop0: 3.7 TiB, 4000785104896 bytes, 7814033408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/encrypted: 3.7 TiB, 4000783007744 bytes, 7814029312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
0 x

Dalibor Toman
Příspěvky: 1246
Registrován: 13 years ago

Příspěvekod Dalibor Toman » 7 years ago

na softwarovym raidu byva problem s tim, ze je treba si uvedomit, ze se bootuje v prvnich fazich bez raidu. I kdyz je /boot na /dev/md0, je treba nainstalovat grub na oba disky z kterych je /dev/mdX slozen. BIOS pak spusti zavadec z /dev/sda nebo /dev/sdb (podle poradi disku ci podle toho ktery chybi/zdechnul). A pri kazde zmene v systemu (jako upgrade jadra je potreba tu instalaci rucne spachat znovu.
Je to zrejme nutne proto, ze se zrcadli az logicka cast disku ne MBR/GPT

u GPT se jeste doporucuje mit grub nastaveny tak aby nepouzival fyzicka jmena devicu (hd0) ale GUID identifikatory
0 x