Nextcloud Internal Server Error after upgrading Ubuntu from 22.04 to 24.04

After upgrading a server from Ubuntu 22.04 (Jammy Jellyfish) to 24.04 (Noble Numbat), a Nextcloud installation may break with the following error:

Internal Server Error 

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The log file is stored in the data folder of the Nextcloud installation folder (/data/nextcloud.log).

Inspecting this file revealed the following error:

Exception”:”Doctrine\\DBAL\\Exception”,”Message”:”Failed to connect to the database: An exception occurred in the driver: could not find driver

The upgrade to Ubuntu 24.04 installs PHP version 8.3.  In some cases your system may have multiple versions of PHP installed which can cause issues during a Ubuntu release upgrade. You can check which version of PHP is set as the system default with the following command:

sudo update-alternatives --config php

Now check that Apache or Nginx are using the same version.

For Apache, you can check the version of PHP that is loaded with this command

ls /etc/apache2/mods-enabled/

To change the PHP version, use the following commands. Change X.X to appropriate value if it is not 8.3.

sudo a2dismod phpX.X
sudo a2enmod php8.3

Then restart Apache.

For Nextcloud and PHP-FPM, check the config files for enabled sites at this location

/etc/nginx/sites-enabled

For example, change any lines containing the old version /var/run/php/php8.x-fpm.sock to point to the new version/var/run/php/php8.3-fpm.sock. Then restart Nginx:

With PHP out of the way, check that you have the correct PHP modules installed.   Review your Nextcloud config file in the config folder of the Nextcloud installation folder (/config/config.php).

You’ll need the correct module based on dbtype variable, for example php-mysql.

sudo apt-get install php-mysql

If you have memory caching (optional), you will need to install the appropriate module based on the memcache.local variable for that as well, such as php-apcu.

sudo apt-get install php-apcu

Once complete, restart Apache or Nginx.

Posted in Uncategorized | Comments Off on Nextcloud Internal Server Error after upgrading Ubuntu from 22.04 to 24.04

Missing mysqli PHP extension after upgrading Ubuntu from 22.04 to 24.04

After upgrading a server from Ubuntu 22.04 (Jammy Jellyfish) to 24.04 (Noble Numbat), the Apache installation no longer functioned properly.  WordPress was also installed and would give the error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Please check that the mysqli PHP extension is installed and enabled.

Also phpMyAdmin would give the following error

The mysqli extension is missing. Please check your PHP configuration.

This was confusing because the php-mysql plugin was already installed on the system.  Many guides walk you through manually uncommenting the lines for the mysqli and pdo_mysql extensions in php.ini.  Doing that had no effect.

Some guides will also have you create a PHP Info page to confirm whether the MySQL extension is enabled.  In the server’s webroot location, create a new php file with the following code:

<?php
phpinfo();
?>

Save the file , then browse to that webpage using a web browser.  This offered the first clue. At the top it the titled listed PHP Version 8.2 but Ubuntu 24.04 is by default configured for PHP 8.3.

Digging into this further, the server had multiple versions of php installed. You can check this by running the following command:

sudo update-alternatives --config php

In this case it was confirmed that 8.3 was set as the system default, but the title of the PHP Info webpage confirmed Apache was configured for the older 8.2 version.

You can check which version of PHP is configured for Apache by using the following command to list all of the modules currently loaded:

ls /etc/apache2/mods-enabled/

It was found that the server had a file named php8.2.load in the list.  The following commands will change the version of PHP module that Apache used from 8.2 to 8.3:

sudo a2dismod php8.2
sudo a2enmod php8.3
sudo service apache2 restart

After that was complete, both WordPress and phpMyAdmin started working again.

If you are using Nginx with PHP-FPM, then you will need to edit the config file for each enabled site to point to the newer version. The site configuration files are stored at:

/etc/nginx/sites-enabled

For example, change any lines containing the old version /var/run/php/php8.2-fpm.sock to point to the new version/var/run/php/php8.3-fpm.sock. Then restart Nginx:

sudo service nginx restart

 

 

Posted in Uncategorized | Comments Off on Missing mysqli PHP extension after upgrading Ubuntu from 22.04 to 24.04

Veeam Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

Veeam has the ability to backup File Shares and in this case I had an NFS backup that randomly started failing.  The only thing that had changed was a recent upgrade from Veeam 11 (specifically 11.0.1.1261) to Veeam 12 (specifically 12.3.1.1139).   The upgrade went smoothly with no errors generated during the installation process.  However about a month later, I received this error during the execution of a scheduled backup job:

Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

The details of the error included:

Path: [Host: [xxx.xxx.xxx.xxx], Mount: [/path/to/backup], Disk: [Name/name/data/data/xxx.vblob], Type: [nfs3 (1)]]. The file specified already exists. NFS status code: 17 Failed to create nfs file stream. Failed to create nfs file. Failed to perform file backup Error: Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists. Error: Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

The automatic retries failed in the same manner.  At first I thought perhaps it was just a fluke, so I ignored it.  However, on the next scheduled backup the same error occurred.

I was able to resolve the error after performing two steps.

  1. Upgrade Veeam to the latest version (specifically 12.3.2.3617)
  2. Manually run a health check on the backup files

Possibly only item 2 was needed, but this step was not done until after I had upgraded Veeam.  To perform a health check:

  1. Open Veeam Backup and Replication
  2. Go to Jobs -> Backup
  3. Find the job that was failing
  4. Right click on it -> Run health check

When I ran the health check, some errors were found and repairs were made to the backup:

Succeeded Repairing backup completed successfully

After it was complete, the job was manually run and it completed without any errors.

Posted in Uncategorized | Comments Off on Veeam Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

Invalid VMs after restoring ESXi configuration with a new boot drive

In this situation, the boot drive of ESXi was to be replaced. The existing ESXi installation was version 7.0 U3 and the boot drive also had a local datastore.  First a backup of the ESXi configuration was made and all VMs on the local datastore were moved to temporary storage.  A fresh install of ESXi was completed on a new drive, the VMs were moved back to the local datastore and then the ESXi configuration was restored.  However when the host booted up, all of the VMs registered on the host from the local datastore showed as Invalid.

The issue is that the inventory was pointing to the unique identifier (UUID) of the old datastore which you can see in the path visible in vSphere Client /vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/<VM path>.   The fix is to simply update the inventory for each registered VM with the UUID of the new datastore.

  1. Access the command line of the host
  2. Determine the UUID of the new datastore using the command:
    esxcli storage filesystem list
  3. Edit the file /etc/vmware/hostd/vmInventory.xml using vi:
    vi /etc/vmware/hostd/vmInventory.xml
  4. Modify the lines with  <vmxCfgPath>  that contain the UUID of the old datastore which is in an 8-8-4-12 digit arrangement: xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx leaving everything else the same.
  5. Save and close the file
  6. Restart the management services
    /etc/init.d/hostd restart
    
    /etc/init.d/vpxa restart
  7. Refresh the vSphere Client
  8. You should now see all VMs with the status as Normal.
  9. Update the swap file location of each VM by right clicking -> Edit Settings -> VM Options -> Advanced -> Edit Configuration
  10. Look for the configuration key sched.swap.derivedName and update the UUID
  11. Save the configuration and try to start the VM
Posted in Uncategorized | Comments Off on Invalid VMs after restoring ESXi configuration with a new boot drive

No VMFS datastore present after clean install of ESXi 7

After installing ESXi 7 (specifically Update 3f, Build 20036589) on a 128GB boot device, I found that a datastore had not been created.  When I tried to create a VMFS datastore I found that it was not possible because a very large VMFSL partition had consumed all remaining space.

After some research I found that this version of ESXi creates this new kind of system partition that can consume up to 128GB of space by default!

https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/7-0/esxi-installation-and-setup-7-0/installing-and-setting-up-esxi/esxi-requirements/esxi-system-storage-overview.html

https://knowledge.broadcom.com/external/article/345195/boot-option-to-configure-the-size-of-esx.html

Based on this documentation, if you are using a boot device of 128GB or less then you will run into this problem of having no datastore on the boot drive after a clean install!

The solution is to reinstall ESXi and limit the size of the system partition by passing a boot option to the installer during the boot up process.   In the Broadcom documentation, there are some recommended minimums for the system partition that should be met based on your hardware configuration (especially the amount of RAM).

Once you have determined which size you want to target, the method required depends on which build of ESXi you have on the installer.

If you are using an ESXi 7 version prior to Update 1c (build 17325551), then you will need to use:

autoPartitionOSDataSize=XXX where XXX is the number in MB. (e.g., 32768 would result in 32GB).

If you are using ESXi 7 Update 1c or later, you can use the first approach above or the more simplified approach below:

systemMediaSize=XXX where XXX is either min, small, default or max corresponding to 32GB, 64GB, 128GB or all remaining GB, respectively.

The first step is to completely wipe the OS drive using a 3rd party tool because the ESXi installer will not delete any existing VMFSL partitions.

Once the OS drive is completely free of partitions, reboot with the ESXi installer media.  Wait for it to prompt you for Shift+O to modify the boot loader, then press that key combination.

At that point you can enter at the command line one of the two options listed above to limit the size of the system partition by adding it to the end.

For example:
runweasel cdromBoot systemMediaSize=min

Then press Enter.

Run through the installation as usual but this time you should end up with a datastore automatically created once complete!

Notes:

  1. The boot loader options are case sensitive
Posted in Uncategorized | Comments Off on No VMFS datastore present after clean install of ESXi 7

Selecting a CPU test in Ultimate Boot CD instantly reboots the system

I had a PC system based on an ASRock Z97 chipset motherboard with a Haswell generation i7 processor and integrated graphics.  Before considering the system stable, I was attempting to do a stress test using the latest version of UBCD (version V5.3.9 at the time of this writing).  For these tests, I used Rufus to burn the ISO to a USB disk.

As expected, when booting from the thumbdrive, I had to select the non-UEFI version, otherwise the system would kick back to the boot menu.

Once loaded into UBCD, I found that Prime95 as well as choosing many other options under the CPU category would fail to load. Upon selecting an option, the system would immediately black screen and then automatically restart.   However the Memory -> Memtest86 option worked fine and was completely stable.

I tried many things to resolve the issue such as resetting all BIOS options to default, a different thumb drive, different processor (i5, another Devil’s Canyon Haswell) and a different power supply.  None of these fixed it.

As another test I booted the system into Windows 10 and it looped Prime95 without a problem, so I kept digging.

During my research, I stumbled upon a support thread on the UBCD forums, specifically this post:

https://www.ultimatebootcd.com/forums/viewtopic.php?p=11119#p11119

All of the tests that were failing were due to depending on CPUstress, which is launched by syslinux. This includes:

  • CPUburn
  • CPU Burn-in
  • CPUinfo
  • Intel Optimized LINPACK Benchmark
  • Mersenne Prime Test (prime95)
  • Stress
  • StressCPU
  • System Stability Tester

On the otherhand, the options that were functional included:

  • CPUID
  • x86test
  • Intel Processor Frequency ID
  • Intel Process Identification Utility

A workaround for the failing tests is to first select the desired test, press tab key and then change the first part of the commandt from:

/ubcd/boot/cpustress/bzImage

to:

/pmagic/bzImage

Then press enter. This managed to get the CPU test loaded (in this case Mersenne Prime test), however the USB keyboard stopped working and I couldn’t answer the prompts to begin the test.   I immediately plugged in a PS/2 keyboard and was able to get it working that way.

Another workaround I discovered was installing a dedicated video card. With the GPU installed, everything worked as expected without modifying the boot loader.

However if you don’t have a discrete GPU available, the final fix I found a workaround in the BIOS.

My motherboard had an option to set the amount of memory to dedicate to the integrated graphics processor built into the CPU (Advanced -> Chipset Configuration -> Share Memory).  By default this option is set to Auto.  The fix is to set it to a specific value that is between 32MB and 128MB. Setting it to 256MB would fail in the same way as Auto.

Once that is set, reboot, boot up UBCD and try the CPU test again!

Posted in Uncategorized | Leave a comment

Samsung PM863a SSD Flashing [ERROR] Firmware Update Failed Due to a failure in device interaction.

You may find updating the firmware on an enterprise class Samsung PM863a SSD difficult. In this case I had a specific part number of MZ7LM3T8HMLP-00003.

The first step is to check the label on the drive and look for the version of F/W.

In my case I had GXT5003Q.   The second to last digit of the firmware is important because the number 3 represents a non SED model while a number 4 represents an SED model (Self Encrypting Drive).

The next step is to boot up  Windows based system with the drive installed. I found that Samsung Magician didn’t support the drive and simply shows “N/A.” I also tried an older command line application called SSDManager, but received the error: Detect Security Vulnerablility.

What finally worked with this drive was the application Samsung DC Toolkit. The software is available at the link below, (near the bottom of the page) and under the section Samsung SSD Toolkit for Data center:

https://semiconductor.samsung.com/us/consumer-storage/support/tools/

There are 2 published versions of the software. For a PM863a drive, you will need version 2.x per the documentation:

Samsung SSD DC Toolkit Version 2.1 is designed to work with Samsung SSD products including PM863, PM863a, SM863, SM863a, PM963 non-customized, 860 DCT, 883 DCT, 983 DCT, 983 DCT M.2 and 983 ZET. This software is not compatible with other manufacturers’ SSDs. 

For this guide, I used version 2.1.W.Q.0 of Samsung DC Toolkit.  A direct link is below:
https://semiconductor.samsung.com/resources/software-resources/Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe

Save this toolkit executable to a convenient location. It is portable and does not need to be installed.

Open a command prompt with Administrator privileges. Then navigate to the location of the download. Run the executable via the command line and you should be presented with something similar to:

================================================================================================
Samsung DC Toolkit Version 2.1.W.Q.0
Copyright (C) 2017 SAMSUNG Electronics Co. Ltd. All rights reserved.
================================================================================================
Usage: Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe [operation] …

Allowed Operations:
————————————————————————————————
-L [ –list ] Shows disks attached to the system
-I [ –info ] Displays the disk details
-ID [ –identify ] Shows Identify Informations
-F [ –firmware-update ] Updates firmware to specified disk
-E [ –erase ] Securely Erases all data from specified disk
-S [ –smart ] Shows SMART values of specified disk
-M [ –setmax ] Perform SetMax related operations on specified disk
-X [ –sct ] Executes SCT Commands on specified disk
-V [ –vendor-utility ] Execute Vendor Unique command on specified disk
-NG [ –nvme-get-log-pages ] Display Log Pages on specified NVMe disk
-NF [ –nvme-format-namespace ] Execute format command on specified NVMe disk
-NM [ –nvme-management-namespace ] Execute management command on specified NVMe disk
-ND [ –nvme-firmware-download ] Updates firmware to specified NVMe disk
-NC [ –nvme-firmware-commit ] Commit the firmware image on specified NVMe disk
-NV [ –nvme-vendor-utility ] Execute Vendor Unique command on specified NVMe disk
-HM [ –health-monitor ] Execute Health Monitor feature.
-C [ –command-history ] Shows history of the previously executed commands
-H [ –help ] Shows detailed help
————————————————————————————————

The first step is to run it again, but add the list option -L to generate a list of all available disks. The output should be similar to the below:

================================================================================================
Samsung DC Toolkit Version 2.1.W.Q.0
Copyright (C) 2017 SAMSUNG Electronics Co. Ltd. All rights reserved.
================================================================================================
—————————————————————————————————————————————————————————-
| Disk | Path | Model | Serial | Firmware | Optionrom | Capacity | Drive | Total Bytes | NVMe Driver |
| Number | | | Number | | Version | | Health | Written | |
—————————————————————————————————————————————————————————-
| 0 | \\.\PHYSICALDRIVE0 | SAMSUNG MZ7LM3T8HMLP-00003 | <serial number> | GXT5003Q | N/A | 3576 GB | GOOD | 1360.29 TB | N/A |
—————————————————————————————————————————————————————————-

Make note of the drive number in the list. In the example above, there was only a single drive in the machine so the drive number was assigned 0.

The next step is to download the appropriate firmware.  The SED and non SED firmwares are both available at the link below (GXT5103Q_nonSED.bin and GXT5404Q.bin).  Since the drive in my possession was a non SED model, I used the latest number 3 firmware available: GXT5103Q.

https://c.gmx.net/@324567863383819227/SlDWEtrmRueJ4nCqdGfOsQ/1186031158467499200

Save the firmware to the same location as the toolkit executable.

To upgrade the firmware, we will be using the -F option.  If you run the toolkit executable with just this flag, you will see something similar to the below:

————————————————————————————————
Usage:
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d [diskindex] -F [ –firmware-update ] [parameter-list]

Example:
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe –disk 1 –firmware-update –fwpackage-path /path/dsrdenc
[or] Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d 1 -F -p /path/dsrdenc
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe –disk 1 –firmware-update –fwpackage-path /path/dsrdenc
[or] Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d 1 -F -p /path/dsrdenc
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe –disk 1 –firmware-update –fwpackage-path /path/dsrdenc
[or] Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d 1 -F -p /path/dsrdenc
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe –disk 1 –firmware-update –fwpackage-path /path/dsrdenc –force
[or] Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d 1 -F -p /path/dsrdenc –force
Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe –disk A –firmware-update –fwpackage-path /path/dsrdenc –source “ABCD1234” (–force)
[or] Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -d A -F -p /path/dsrdenc -s “ABCD1234” (–force)

Sub Options:
-d [ –disk ] Disk-Number of the disk or A to select all supported disks to update firmware on.
-p [ –fwpackage-path ] Path to the FW binary file.
–force [ –force ] Enables the user to perform Firmware Download without prompting for any confirmations.
-s [ –source ] source firmware revision, use with option ‘A'(update multiple devices at ones).
A [ A ] updating all SATA devices(except primary device) to specific target firmware, use character ‘A’ instead of disk number.
————————————————————————————————

Here we can see we need 2 additional sub options for the firmware update, -d and -p. This will allow us to specify which disk number (from our previous list output) and also the location of the firmware (downloaded earlier).

Perform the firmware upgrade on the drive.  In this example, I used:

Samsung_SSD_DC_Toolkit_for_Windows_V2.1.exe -F -p GXT5103Q_nonSED.bin -d 0

Proceed by providing a yes confirmation.

If the flash was successful, you should see an output similar to the below:

————————————————————————————————
[[ WARNING ]]

Please Note that Firmware Update may format the disk and you will lose your data.
Please Ensure that data backup is taken before proceeding to Firmware Update.
If you are sure then only proceed, otherwise restart the application after taking a backup.
Continue Firmware Update ? [ yes ]: yes
————————————————————————————————
[F/W Update] Disk is Updated with the New Firmware.
————————————————————————————————
[F/W Update] Success
————————————————————————————————

Power cycle the machine, and you should now be running the latest firmware!

Notes:
If you try to flash an SED firmware on a non SED drive (or vice versa), then the firmware update will fail and you will receive this error:

————————————————————————————————
[ERROR] Firmware Update Failed Due to a failure in device interaction.
————————————————————————————————
[F/W Update] Failure
————————————————————————————————

References:
https://forums.servethehome.com/index.php?threads/firmware-package-for-samsung-sm883-mz7kh3t8hals.37154/

https://forums.servethehome.com/index.php?threads/pm863-fw-file.18084/

https://c.gmx.net/@324567863383819227/SlDWEtrmRueJ4nCqdGfOsQ/ROOT

 

Posted in Uncategorized | Leave a comment

Macbook Error: The Installer information on the recovery server is damaged.

I was attempting to wipe and reinstall MacOS X on an older Intel based Macbook by following this guide:

https://support.apple.com/en-us/102639

To begin this process, the directions have you press and hold Command-R.

The Disk Utility to wipe the computer was successful. However upon trying the next step to Reinstall macOS (in this case Sierra), it would result in the following error.

The Installer information on the recovery server is damaged.

Regardless of how many times I repeated the reinstall, it would always result in this error.

The root cause is due to the age of the laptop.  Internet Recovery was attempting to install a version of macOS that was originally shipped with the computer, but no longer existed on Apple servers.

Depending on the age of the computer, the solution may be found using this guide:

https://support.apple.com/guide/mac-help/use-macos-recovery-on-an-intel-based-mac-mchl338cf9a8/mac

What worked for me was the second option:

Option-Command-R: Start up from macOS Recovery over the internet. Use this key combination to reinstall macOS and upgrade to the latest version of macOS that’s compatible with your Mac.

This presented me with the option to Reinstall macOS Ventura, which was still available on Apple servers.

 

Posted in Uncategorized | Leave a comment

Unable to Wipe Replacement Drive in OpenMediaVault

I was replacing a failed drive in an existing array in OMV.  After I connected a replacement disk, I went to Multiple Device -> Recover.

However the list of available drives for recovery was blank.  The next step I tried was to format the replacement drive under Storage -> Disk -> select the drive -> Wipe button.

Do you really want to wipe the device /dev/XXX ? All data will be lost.
I clicked Confirm.

At that point the GUI threw an error:

Connection Lost

500 – Internal Server Error
Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev –rereadpt ‘/dev/XXX’ 2>&1′ with exit code ‘1’: blockdev: ioctl error on BLKRRPART: Device or resource busy

In the notification area, an error was also logged:

Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev –rereadpt ‘/dev/XXX’ 2>&1′ with exit code ‘1’: blockdev: ioctl error on BLKRRPART: Device or resource busy

OMV\ExecException: Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev –rereadpt ‘/dev/XXX’ 2>&1′ with exit code ‘1’: blockdev: ioctl error on BLKRRPART: Device or resource busy in /usr/share/openmediavault/engined/rpc/diskmgmt.inc:295
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(622): Engined\Rpc\DiskMgmt->Engined\Rpc\{closure}()
#1 /usr/share/openmediavault/engined/rpc/diskmgmt.inc(227): OMV\Rpc\ServiceAbstract->execBgProc()
#2 [internal function]: Engined\Rpc\DiskMgmt->wipe()
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
#5 /usr/sbin/omv-engined(535): OMV\Rpc\Rpc::call()
#6 {main}

The reason for these errors is because the replacement disk had an existing superblock on it from another array.   When it was inserted into the OMV system, the system interpreted it as another array.  You can verify this by pulling up an OMV console and running the command:

cat /proc/mdstat

You should see listed your primary array marked as active, but also a second array marked as inactive and with only one device in it.  The device name will match the errors above and it represents the replacement drive.

Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
mdXXX : inactive XXX[20](S)

Now if you go back to Multiple Deive -> Recover, the list of drives is no longer blank and the GUI presents you with the replacement drive. However, if you select the drive and click the Save button, the GUI will throw a new error:

500 – Internal Server Error
Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; mdadm –manage ‘/dev/mdXXX’ –add /dev/XXX 2>&1′ with exit code ‘1’: mdadm: Unknown keyword INACTIVE-ARRAY mdadm: Cannot open /dev/XXX: Device or resource busy

And in the notification area:

Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; mdadm –manage ‘/dev/mdXXX’ –add /dev/XXX 2>&1′ with exit code ‘1’: mdadm: Unknown keyword INACTIVE-ARRAY
mdadm: Cannot open /dev/XXX: Device or resource busy

OMV\ExecException: Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; mdadm –manage ‘/dev/mdXXX’ –add /dev/XXX 2>&1′ with exit code ‘1’: mdadm: Unknown keyword INACTIVE-ARRAY
mdadm: Cannot open /dev/XXX: Device or resource busy in /usr/share/php/openmediavault/system/process.inc:247
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/mdmgmt.inc(419): OMV\System\Process->execute()
#1 [internal function]: Engined\Rpc\MdMgmt->add()
#2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
#3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
#4 /usr/sbin/omv-engined(535): OMV\Rpc\Rpc::call()
#5 {main}

 

You can see here the superblock on the replacement drive is causing an issue with the scripts due to the presence of an inactive array.

The solution is pretty straightforward:

  1. Disconnect the replacement drive and wait for it to spin down.
  2. Reattach it to OMV and wait for it to fully spin up.
  3. Find it in the list of Disks
  4. Use the GUI to perform a Wipe, either Quick or Secure.
  5. The wipe should completely successfully
  6. Navigate to Multiple Device and click Recover
  7. Select your replacement Disk
  8. Click Save to begin the recovery

At this point if you perform another scan of your arrays:

cat /proc/mdstat

You will still see the inactive array in the list. It wont cause any immediate problems to leave it, but you can flush it from the list by rebooting OMV.

Posted in Uncategorized | Leave a comment

Openmediavault GRUB failed to install, unable to identify a filesystem

When performing a manual apt-get upgrade command from the OMV CLI, I ran into this error when it tried to upgrade the grub-pc package.

grub-install: error: unable to identify a filesystem in hostdisk//dev/sdx; safety check can’t be performed.

where x is a device letter (e.g., sda, sdg, etc.)

The solution is pretty simple.

When presented with the Package configuration screen for grub-pc, there is the error:

GRUB failed to install to the following devices:

/dev/sdx

Do you want to continue anyway? If you do, your computer may not start up properly.

Writing GRUB to boot device failed – continue?

  1. Choose the option for No.
  2. Then find the correct boot device in the list and select it.  Double check that no other devices are selected.
  3. Continue with the install
Posted in Uncategorized | Leave a comment