Please help, remote Server fails to boot ... cannot open /boot/lua/loader.lua

Hi all,

I have an FreeBSD 13.2 server running remote in a computing centre (hetzner), and an hour before I got aware that
the Mx jail on it dowsnt react anymore as expected, sshd doesn't reacted ..something was going wrong. Shortly after that
the login on the main os hung. I've triggered an remote reset to reboot the server, but after a few ping replys the ping stalled
..two times. Now I'm connected with an remote console to the machine, but I never before saw something like this.

After bios, and some pxe messages I can see the begin of the FreeBSD boot process, but I can't really tell what's going on there:

bootloader.png


There are two SATA discs as you can see and thee is a zfs mirror on them. lsdev is the only command that seems to deliver usable information.
ls says '' wron path or something. The machine was up for 80 days, build and installed a new world to this time and rebooted the machine including
mergemaster, so this is no install problem regarding loader.lua that can be found in almost every thread containing "loader.lua" that a search engine can find..

What the heck happened here? What can I do now in that restricted environment? There is no FreeBSD rescue system at hetzner available anymore.
In the meantime I'll tell the staff hat hetzner to exchange the two hotpluggable disks on this server, but I don't think that it wil change anything (but I hope so).

Please help!

Regards,

Holm
 
I/O error does suggest the bad disk. Swapping those disks could help here. Or, if BIOS allows, swap the order of the boot disks.

But these type of issues then require you to have some sort of recovery option. Either boot it directly of the computer (actual CD, usb key..), or a virtual one ( such as iLO virtual cdrom..). Or have the PXE env set so that you can PXE boot to the recovery system.

If you have H&E on site (hand & eyes) swapping those disks is a good first step.
 
..that's why I'm told the computing center stuff to please exchange both disk against each other.
But what can I do for further investigations with the bootloader?

Regards,
Holm
 
Can I, for example, tell the loader to load the lua/loader.lua from the other disk? ..and how?

Regards,
Holm
 
The best way to find out what happened is to have a recovery media because you need to check the logs and observe what is system doing. I understand your limitation however ( and I don't recall what I did at Hetzner for that short period of time I did have server there).

I don't think you can tell that to a bootloader because /boot/lua is already on ZFS pool. It's an interesting question to check if bootloader is actually activating both legs of mirror of if it's reading the bootcode only from one leg.

That's why I said swapping those disks is a good first step in the limited options you have. Next I'd have a look at that BIOS settings if you can swap the disk boot order (i.e. within "boot from disk", swap sata0<->sata1 option).
 
...that seems to be strange. I|ve managed to change the boot order of the disks in the bios setup and now the machine was sucessful booting.
..good so far.

But:
# smartctl -a /dev/ada0
smartctl 7.2 2020-12-30 r5155 [FreeBSD 13.2-STABLE amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.14 (AF)
Device Model: ST3000DM001-1CH166
Serial Number: Z1F3SW82
LU WWN Device Id: 5 000c50 03cf56eda
Firmware Version: CC26
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Fri Nov 17 23:40:13 2023 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
[..]


# smartctl -a /dev/ada1
smartctl 7.2 2020-12-30 r5155 [FreeBSD 13.2-STABLE amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Toshiba 3.5" DT01ACA... Desktop HDD
Device Model: TOSHIBA DT01ACA300
Serial Number: 68UVAKKAS
LU WWN Device Id: 5 000039 fe6e82852
Firmware Version: MX6OABB0
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Fri Nov 17 23:43:40 2023 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

...hmmm...

and:
# zpool status
pool: zroot
state: ONLINE
status: Some supported and requested features are not enabled on the pool.
The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(7) for details.
scan: resilvered 290G in 00:54:04 with 0 errors on Thu Jan 3 11:21:55 2019
config:

NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0

errors: No known data errors


What the heck is going on here?


# gpart show ada0
=> 34 5860533101 ada0 GPT (2.7T)
34 6 - free - (3.0K)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 5856335872 3 freebsd-zfs (2.7T)
5860532224 911 - free - (456K)

# gpart show ada1
=> 40 5860533088 ada1 GPT (2.7T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 5856335872 3 freebsd-zfs (2.7T)
5860532224 904 - free - (452K)

Holly shit!

It seems that the partition table on ada0 is toast, that's the one that wouldn't boot anymore.
Now ada1 has first priority in the bios.
Has one an idea to repair this? boot gpt tabels where identical sometimes before..

Regards,
Holm
 
Well, it is expected as it was a suggestion that the disk failed.

Can you show (and please format as code) the output of the smartctl -x /dev/ada0, and the same as for ada1 ?
You could also do a quick read check of both disks: dd if=/dev/ada0 bs=512 count=10240 > /dev/null, same for ada1.

You should see some errors then in syslog too.

Missing partition could be, and most likely is, result of a failing disk. I'd expect different error than I/O error from bootloader if that partition is actually missing.
 
Had a look into your a bit messier output, those partitions are OK. Yes, the ada0 has free space there, possibly leftover from previous partition. But all partitions on both disks start on the same LBA, so all ok there.
You can still have zpool reporting nothing and have disk starting to fail.
 
Code:
# dd if=/dev/ada0 bs=512 count=10240 > /dev/null
10240+0 records in
10240+0 records out
5242880 bytes transferred in 0.312092 secs (16799145 bytes/sec)
# dd if=/dev/ada1 bs=512 count=10240 > /dev/null
10240+0 records in
10240+0 records out
5242880 bytes transferred in 0.525751 secs (9972175 bytes/sec)
..and no errors in messages
Code:
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (  584) seconds.
Offline data collection
capabilities:                    (0x73) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine


recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 340) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x3085) SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   118   099   006    Pre-fail  Always       -       183679856
  3 Spin_Up_Time            0x0003   095   095   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       23
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   079   060   030    Pre-fail  Always       -       26261114098
  9 Power_On_Hours          0x0032   012   012   000    Old_age   Always       -       77270
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       23
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   093   093   000    Old_age   Always       -       7
190 Airflow_Temperature_Cel 0x0022   070   052   045    Old_age   Always       -       30 (Min/Max 24/35)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       19
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       1856
194 Temperature_Celsius     0x0022   030   048   000    Old_age   Always       -       30 (0 21 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       77219h+56m+11.071s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       216569445927
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       163841807965

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%     12299         -
# 2  Extended offline    Completed without error       00%     12282         -
# 3  Extended offline    Completed without error       00%     10693         -
# 4  Extended offline    Completed without error       00%     10676         -
# 5  Extended offline    Completed without error       00%     10652         -
# 6  Extended offline    Completed without error       00%     10629         -
# 7  Extended offline    Completed without error       00%     10578         -
# 8  Extended offline    Completed without error       00%     10548         -
# 9  Extended offline    Completed without error       00%        56         -
#10  Extended offline    Completed without error       00%        39         -
#11  Extended offline    Completed without error       00%        33         -
#12  Extended offline    Completed without error       00%        16         -
#13  Extended offline    Completed without error       00%        10         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

#
Code:
# smartctl -a /dev/ada1
smartctl 7.2 2020-12-30 r5155 [FreeBSD 13.2-STABLE amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" DT01ACA... Desktop HDD
Device Model:     TOSHIBA DT01ACA300
Serial Number:    68UVAKKAS
LU WWN Device Id: 5 000039 fe6e82852
Firmware Version: MX6OABB0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Nov 18 01:23:57 2023 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                                        was suspended by an interrupting command from host.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (21791) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 364) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   140   140   054    Pre-fail  Offline      -       67
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   124   124   020    Pre-fail  Offline      -       33
  9 Power_On_Hours          0x0012   094   094   000    Old_age   Always       -       42713
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       4
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       4
194 Temperature_Celsius     0x0002   193   193   000    Old_age   Always       -       31 (Min/Max 25/36)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

#


Im relativly sure that I've created both partition tables identically following
this procedure:


Regards,
Holm
 
You can see that ada0 has its own problems:
Code:
1 Raw_Read_Error_Rate     0x000f   118   099   006    Pre-fail  Always       -       183679856
..
7 Seek_Error_Rate         0x000f   079   060   030    Pre-fail  Always       -       26261114098
You should see errors in syslog regarding SCSI commands.

You could initiate a long test: smartctl -t long /dev/ada0. It will tell you approx how long will it take to finish. Then you can check again, either with -a or -x.

Im relativly sure that I've created both partition tables identically following
That I can't confirm. What I can say for sure is that the partition layout is not a result of this HW issue.
It could have been auto-alignment feature of gpart. I see those disks are not the same age, it could have been that gpart changed over the time too.

That disk has almost 9 years worth of service in it, I think it held pretty good.
 
THX, the actual states of Raw Read and Seek Error rates are going extremely high now (26261812402 and 99870616). I've ordered the change of the drive to tomorrow 10:00 CET...but I don't think that the Barracuda is still alive tomorrow morning.

Yes, the disks are of different age, the 1st Barracuda died already some time before and was changed against the Toshiba and I'm sure to 100% that the partition tables where identical when I set up the Toshiba. That 6 blocks of free space on the ST3000 makes no sense to me.

Regards,
Holm
 
Question: Instead of replacing the disk on this existing server, would it perhaps be easier and safer to rent another server with two disks, copy the existing (damaged) server to the new one, and then cancel the rental of the one with the broken disk? It might cost a few Euro extra, but you might get back up and running faster.
 
You could have a look on what's there with this command: dd if=/dev/ada0 skip=34 count=6 | hd to see if there's something familiar in there.
There are backups of the scheme in periodic but are being replaced so most likely you don't have anything to compare it to. Backups are in /var/backups.

Note though partitions are the same. Both disks have the same amount of partitions, start at the same LBA and are the same size. It's just one disk have first usable LBA in gpt header set to 34 (which is OK by standard).
While it may be consusing to some as gpart shows free space too it's not a problem at all (personally I do like when gpart shows gaps).
 
Code:
# dd if=/dev/ada0 skip=34 count=6 | hd|less
6+0 records in
6+0 records out
3072 bytes transferred in 0.046339 secs (66294 bytes/sec)
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000c00
#

That's the last thing I do with this disk, I have to shutdown the machine now and let do the service man do their job.


@ralphbsz:

..no, there are several jails on that machine with customer data, mail and webservers.
To direct them all how to change IP adresses would be a nightmare. Besides of that
there are two mirrored disks in the server to make it possible that one dies and that
isn't the first time on this machine that it happens.

Regards,
Holm
 
ok, the machine has sucessfully rebooted from the ada1 (Toshiba) disk.. camcontrol devlist is now looking like this:
Code:
# camcontrol devlist
<ST4000NM0245-1Z2107 SS05>         at scbus0 target 0 lun 0 (pass0,ada0)
<TOSHIBA DT01ACA300 MX6OABB0>      at scbus1 target 0 lun 0 (pass1,ada1)
<AHCI SGPIO Enclosure 2.00 0001>   at scbus2 target 0 lun 0 (pass2,ses0)
#

Let's try to partition the ST4000 and restore the mirrors..

Regards,
Holm
 
...looks good so far:
Code:
=>        40  7814037088  ada0  GPT  (3.6T)
          40        1024     1  freebsd-boot  (512K)
        1064         984        - free -  (492K)
        2048     4194304     2  freebsd-swap  (2.0G)
     4196352  5856335872     3  freebsd-zfs  (2.7T)
  5860532224  1953504904        - free -  (932G)

=>        40  5860533088  ada1  GPT  (2.7T)
          40        1024     1  freebsd-boot  (512K)
        1064         984        - free -  (492K)
        2048     4194304     2  freebsd-swap  (2.0G)
     4196352  5856335872     3  freebsd-zfs  (2.7T)
  5860532224         904        - free -  (452K)

#

Code:
# zpool status
  pool: zroot
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Sun Nov 19 10:46:56 2023
        948G scanned at 0B/s, 7.87G issued at 146M/s, 948G total
        7.90G resilvered, 0.83% done, 01:49:30 to go
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada1p3  ONLINE       0     0     0
            ada0p3  ONLINE       0     0     0  (resilvering)

errors: No known data errors
#

Regards,
Holm
 
Back
Top