Recovering from HD failure - config restore fails

NethServer Version: 7.3

I’m trying to recover my Nethserver server after a disk failure (server with single drive). I mounted a new HD and installed Nethserver 7.3 from ISO. After a reboot the server comes up nicely. So far so good. Then, after installing all updates and installing the backup modules (and rebooting again succesfully), i copied by sftp (upload from GUI did not work) a recent config-backup file in the backup/history directory and from GUI started a configuration restore. It seems to work because several modules are installed and configuration details are filled in the Nethserver GUI. But after a reboot i get stuck in emergency mode.

When i take a look in the log with journalctl -xb as advised on the terminalscreen i see red colored errors like:

tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
kvm: disabled by bios
Timed out waiting for device dev-disk-by\x2duuid-39F1\x2dADEE.device
Dependency failed for /boot/efi
Dependency failed for Local File Systems
Dependency failed for Relabel all filesystems, if necessary

…and some more dependency failed errors and others.

I tried to find some pointers in the forum but could not identify my problem. I really wouldn’t like to reconfigure my server from scratch, so does anyone has a clue what is going on? I tried it two times with the same result.

Thanks in advance,
Wijnand.

Hi @pa3hfj,

did you try CTRL + D to exit emergency mode, just found in the net, don’t know if it’s possible in centos…
Maybe try restore config before updating, or try installing from new 7.4 iso where you can restore from first setup wizard…
When does it boot in emergency mode, after the system update or the config restore? Just to see, what’s responsible…

Those errors could lead to a hardware problem. What seems strange is that the installer works fine, but the installed system does not.
Could you try if you can access the system using rescue mode?
https://www.thegeekdiary.com/centos-rhel-7-how-to-boot-into-rescue-mode-or-emergency-mode/
https://www.thegeekdiary.com/centos-rhel-7-how-to-boot-into-rescue-mode-from-installation-dvdiso/

mrmarkuz, Thanks for the advice!

If i recall correctly (now at work, server at home :slight_smile:) then after applying Ctrl-D the system remains in emergency mode. The first time the emergency mode appears is after loading the config-backup. The first time i loaded the backup right after first installation, the second time i first applied the updates and then loaded the config-backup, both times resulting in the same bad situation.

This evening i will try the 7.4 route, see if that makes a difference. Otherwise i will do configuration from scratch, which will take a lot of time i’m afraid… Fortunately i have a recent data backup, that’s the most important!

Hello filippo,

Thank you for your reaction. Well, the installed system works, until the config-backup is applied. I will try the suggestion from mrmarkuz; installing 7.4 and then loading the config during installation. If that’s no good i will have to configure manually because i need my Nethserver badly :slight_smile: (email, fileserver, webserver, nextcloud, plex etc. all down now)

Well, also on a fresh 7.4 install the same behavior applies. I tried also a older config backup but no luck. Giving up now… It’s going to be a long evening, configuring Nethserver from scratch!

I’m sorry to hear that.
I’d really like to find the error in your backup config file but it’s very private as it may contain passwords and network info etc. If you agree, we’ll find a way to send the file to me in a secure way.

Now that i cannot use the config-backup, it seems i have also a problem with loading the data backup because the restore-module doesn’t show any backupfiles to load. In the backup configuration i pointed to the USB-disk holding the backups. Or am i doing something wrong?

You may try it with command line, do a “restore-data” or “restore-file” and check your /var/log/messages
http://docs.nethserver.org/en/v7/backup.html#disaster-recovery (Step 6)
http://docs.nethserver.org/en/v7/backup.html#command-line-procedure.

I executed the restore-data command as root. It seems the pre-restore-data procedure is not able to mount the USB disk, but as far as i can tell the drive is recognized by the system:

Oct 31 22:32:42 server1 kernel: usb 4-3: new SuperSpeed USB device number 3 using xhci_hcd
Oct 31 22:32:42 server1 kernel: usb 4-3: New USB device found, idVendor=174c, idProduct=55aa
Oct 31 22:32:42 server1 kernel: usb 4-3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Oct 31 22:32:42 server1 kernel: usb 4-3: Product: ASM1153E
Oct 31 22:32:42 server1 kernel: usb 4-3: Manufacturer: ASMedia
Oct 31 22:32:42 server1 kernel: usb 4-3: SerialNumber: 20150324001685
Oct 31 22:32:42 server1 kernel: scsi host7: uas
Oct 31 22:32:42 server1 kernel: scsi 7:0:0:0: Direct-Access ASMedia ASM1153E 0 PQ: 0 ANSI: 6
Oct 31 22:32:42 server1 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
Oct 31 22:32:42 server1 kernel: sd 7:0:0:0: [sdb] Spinning up disk…
Oct 31 22:32:43 server1 kernel: .ready
Oct 31 22:32:43 server1 kernel: sd 7:0:0:0: [sdb] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB)
Oct 31 22:32:43 server1 kernel: sd 7:0:0:0: [sdb] Write Protect is off
Oct 31 22:32:43 server1 kernel: sd 7:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
Oct 31 22:32:43 server1 kernel: sdb: sdb1
Oct 31 22:32:43 server1 kernel: sd 7:0:0:0: [sdb] Attached SCSI disk

Oct 31 22:34:00 server1 esmith::event[6557]: Event: pre-restore-data
Oct 31 22:34:00 server1 esmith::event[6557]: Action: /etc/e-smith/events/pre-restore-data/S10mount-cifs SUCCESS [0.118732]
Oct 31 22:34:00 server1 esmith::event[6557]: Action: /etc/e-smith/events/pre-restore-data/S10mount-nfs SUCCESS [0.120849]
Oct 31 22:34:00 server1 esmith::event[6557]: Action: /etc/e-smith/events/pre-restore-data/S10mount-usb FAILED: 1 [0.128737]
Oct 31 22:34:00 server1 esmith::event[6557]: Action: /etc/e-smith/events/pre-restore-data/S10mount-webdav SUCCESS [0.118632]
Oct 31 22:34:00 server1 esmith::event[6557]: Event: pre-restore-data FAILED

You may try to mount it manually:

Maybe this log shows something: /var/log/restore-config.log

Hello mrmarkuz,

I discovered the problem: the USB drive is formatted in ntfs format which is not standard supported in CentOS. I’ve added support (ntfs-3g, fuse) and the data-restore is running as we speak! Now keeping fingers crossed and hope all data falls in place. I must have done this also on the old system but did not recall.

Thank you very much for your support :+1:, this active community is one of the reasons i like Nethserver so much.

3 Likes

Happy to read this. Thanks to people like @mrmarkuz we have such community. Hope to see you around helping us to make NethServer even better :slight_smile:

2 Likes