Hallo zusammen!
Mein System:
HP N54L Microserver, 10GB RAM, kein Swap(File) sondern zram
Ubuntu 18.04.1, aktueller Softwarestand
grub-pc (2.02-2ubuntu8.7)
Ubuntu 18.04.1 wurde zunächst auf 2TB WD-Red HDD installiert, dann zusammen mit 4TB WD-Red HDD als Raid1 konfiguriert und später wurde die 2TB WD-Red HDD mittels btrfs replace durch eine weitere 4TB WD-Red HDD ersetzt. grub manuell mittels grub-install auf allen HDDs installiert
Jetzt 2x 4TB WD-Red HDDs in btrfs-raid1 Konfiguration (KEIN madm), GPT Tabelle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | root@BaumServer:~# parted --list Modell: ATA WDC WD40EFRX-68W (scsi) Festplatte /dev/sda: 4001GB Sektorgröße (logisch/physisch): 512B/4096B Partitionstabelle: gpt Disk-Flags: Nummer Anfang Ende Größe Dateisystem Name Flags 1 1049kB 2097kB 1049kB primary bios_grub 2 2097kB 4001GB 4001GB btrfs ROOT boot, esp Modell: ATA WDC WD40EFRX-68N (scsi) Festplatte /dev/sdb: 4001GB Sektorgröße (logisch/physisch): 512B/4096B Partitionstabelle: gpt Disk-Flags: Nummer Anfang Ende Größe Dateisystem Name Flags 1 1049kB 2097kB 1049kB primary bios_grub 2 2097kB 4001GB 4001GB btrfs ROOT boot, esp |
1 2 3 4 5 | root@BaumServer:~# btrfs fi show Label: none uuid: e53f8edf-ea24-4f4f-9b59-67a69c9245ce Total devices 2 FS bytes used 1.61TiB devid 1 size 3.64TiB used 1.61TiB path /dev/sdb2 devid 2 size 3.64TiB used 1.61TiB path /dev/sda2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | root@BaumServer:~# cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during installation #UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce / btrfs defaults,autodefrag,subvol=@ 0 0 # /home was on /dev/sda2 during installation #UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /home btrfs defaults,autodefrag,subvol=@home 0 0 # <file system> <mount point> <type> <options> <dump> <pass> # ROOT UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce / btrfs defaults,autodefrag,subvol=@ 0 0 UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /home btrfs defaults,autodefrag,subvol=@home 0 0 UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /mnt/data1 btrfs defaults,autodefrag,subvol=@data1 0 0 UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /mnt/snapshots btrfs defaults,autodefrag,subvol=@snapshots 0 0 UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /var/lib/docker btrfs defaults,autodefrag,subvol=@docker 0 0 # btrfs UUID=e53f8edf-ea24-4f4f-9b59-67a69c9245ce /mnt/btrfs/root btrfs defaults 0 0 |
Mein Problem:
grub-install während apt upgrade funktioniert nur auf der 1. HDD, bei der 2. HDD schlägt grub-install fehl (nach device node not found kam ein Auswahlfenster, in dem ich die Festplatten zur Installation auswählen sollte, da auf die ursprüngliche 2TB WD-Red HDD, auf die ursprünglich installiert wurde, logischerweise nicht mehr zugegriffen werden konnte)
Fehlermeldung während Upgrade:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | [...] grub-pc (2.02-2ubuntu8.7) wird eingerichtet ... device node not found device node not found device node not found device node not found Use of uninitialized value in string eq at /usr/share/perl5/Debconf/Element/Multiselect.pm line 38, <GEN6> line 25. i386-pc wird für Ihre Plattform installiert. Installation beendet. Keine Fehler aufgetreten. i386-pc wird für Ihre Plattform installiert. grub-install: Fehler: Für /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC7K3NCP9RE, konnte kein GRUB-Laufwerk gefunden werden. Überprüfen Sie Ihre device.map. GRUB-Konfigurationsdatei wird erstellt … Linux-Abbild gefunden: /boot/vmlinuz-4.15.0-38-generic Linux-Abbild gefunden: /boot/vmlinuz-4.15.0-36-generic initrd-Abbild gefunden: /boot/initrd.img-4.15.0-36-generic Linux-Abbild gefunden: /boot/vmlinuz-4.15.0-29-generic initrd-Abbild gefunden: /boot/initrd.img-4.15.0-29-generic erledigt [...] |
Manuelles Ausführen von grub-install /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC7K3NCP9RE läuft ohne Probleme durch
dpkg-reconfigure grub-pc → Beide Festplatten zur Grub-Installation anwählen → Führt zur selben Fehlermeldung wie während apt upgrade oben
Ich möchte, dass grub auf beiden HDDs installiert ist, damit der Server auch beim Komplettausfall einer HDD bootet. So wie ich das verstehe muss grub-install nach jedem Update von grub-pc ausgeführt werden, damit der Boot-Vorgang funktioniert
Ein Erstellen folgender device.map führt nicht zum Erfolg:
1 2 | (hd0) /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0340354 (hd1) /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC7K3NCP9RE |
Bisherige Versuche:
device.map wie oben erstellt → kein Erfolg
grub-install manuell nach jedem Update ausführen → ist zwar möglich, Server bootet dann auch von beiden HDDs, ich möchte aber, dass der Server sich automatisch via unattended-upgrades updatet
Meine Ideen:
grub-install /dev/sda /dev/sdb manuell als APT::Update::Post-Invoke Hook einrichten → grub-install wird immer nach Upgrade manuell ausgeführt. Das sollte zwar funktionieren, jedoch verstehe ich das eigentliche Problem nicht.
Kann mir jemand sagen, wo hier das Problem liegt und wie ich es erreichen kann, dass grub bei der Konfiguration von grub-pc erfolgreich auf beide HDDs installiert wird?
Danke und viele Grüße, Bastian