Main disk disappeared from the list of physical devices after OMV update

  • I run OMV on a single-disk NAS box. After updating OMV to 4.1.27-1, the hard drive disappeared from the list of physical devices in Storage > Disks (screen shot attached). The disk always populated correctly in the previous OMV build I was using (4.1.23). The original setup was probably customized, so the update reverted some change to defaults.


    Attempted: reboting; using the Scan button. I tried attaching an external device to the USB port, and that one shows up under the list of available devices correctly as /dev/sdb


    Is there anything I can do to make the built-in hard drive show up again under Storage > Disks? Could it be that OMV does not like the name /dev/sataa instead of /dev/sda ? (this is not going to change, so I need to make OMV accept this path somehow).


    omv-rpc -u admin 'DiskMgmt' 'enumerateDevices'
    output:
    []



    fdisk-l output (trimmed):


    Disk /dev/sataa: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 9D4BAF77-4266-3DB4-36FB-5053740139E2


    Device Start End Sectors Size Type
    /dev/sataa1 34 2047 2014 1007K Microsoft basic data
    /dev/sataa2 2048 67583 65536 32M Microsoft basic data


    lsblk -f output:


    NAME FSTYPE LABEL UUID MOUNTPOINT
    sataa
    ├─sataa1
    ├─sataa2
    ├─sataa3
    ├─sataa4
    ├─sataa5
    ├─sataa6
    ├─sataa7
    ├─sataa8
    ├─sataa9
    ├─sataa10
    ├─sataa11
    ├─sataa12
    ├─sataa13
    ├─sataa14
    ├─sataa15
    ├─sataa16
    ├─sataa17
    ├─sataa18
    ├─sataa19
    ├─sataa20 /
    ├─sataa21 /var
    ├─sataa22 /usr
    ├─sataa23 [SWAP]
    └─sataa24 /srv/dev-sataa24



  • Update: I had to edit /usr/share/php/openmediavault/system/storage/backend/hd.inc to replace "hd" with "sata" so that /sataa appears in the list of hardware devices being scanned.


    Now, this fixes the issue *for now*, but it is in no way a gracious solution. Won't survive through OMV updates as we've seen. I wonder if there is a gracious way to fix this.


    function enumerate() {
    // Examples:
    // - /dev/hda
    return $this->enumerateProcFs("sata[a-z]+");
    }


    function isTypeOf($deviceFile) {
    // Examples:
    // - /dev/hdc2
    $regex = "sata[a-z]+[0-9]*";
    return $this->isTypeOfByName($deviceFile, $regex);
    }

  • SATA - /dev/sdX
    SSD - /dev/sdX
    SCSCi - /dev/sdX
    IDE - /dev/hdX


    even a usb3 mounted 8tb disk will be shown as /dev/sdX


    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • I am aware of the correct name schema for sata devices. In my case, OMV is installed on a single-disk WD My Cloud Home, which combines excellent hardware with unspeakably bad software. The device in question requires this exact naming scheme (and this exact partitioning) to boot. In other words, we are stuck with /dev/sataa. Granted, I could make an udev rule to make a permanent symlink to make it appear as /dev/sda, but I am not entirely sure if that would be the lesser evil.

  • Can you point us to some docs or specs of this hardware. Is there a guide available that describes how to replace the shipped software with something else based on Linux. Maybe we can enhance the backend to support it properly.

    That would be really great!!


    The specifications of the single-box WD My Home devices are as follows:


    Realtek RTD1295PBCG (4x1.4GHz), ARMv8
    1GB DDR3 Ram
    1x 10/100/1000 Mb/s Network (1Gbps)
    1x USB3 port


    This is very similar to e.g. Synology DS118. However, WD sells their My Home devices for less than the cost of the built-in WD Red drive, which makes the NAS enclosure itself essentially free (even negative-price) for the buyer. For example, I bought a 6TB WD My Cloud Home for 144 EUR; it officially comes equipped with WD Red (the 64MB cache version). The cheapest 6TB WD Red with 64MB cache costs around 175 EUR where I live.


    The hard drive is non-removable without physically breaking the case.


    This is how we replace the stock software with OMVDebian: http://4pda.ru/forum/index.php…28&st=12120#entry87961189


    This is in Russian. To make long thins short, the procedure is very simple:


    1. Follow the steps to fully set up WD My Home with stock WD software. Make sure it finishes updating and can log in. This is required to partition the hard drive.


    2. Download https://yadi.sk/d/ilASN4H6Ngr8tQ , unpack archive onto a FAT32 flash drive


    3. Turn off WD My Cloud Home. Insert flash drive. Push the Reset button on the back of the device with a pin. Turn on WD My Cloud Home. Keep pushing the Reset button until the front LED starts flashing.


    4. In 5-10 minutes, everything is installed and ready.


    Now, you probably don't need the full Debian/OMV package for your purposes. There is the smaller Rescue image for just booting the device from the flash drive and accessing the disk. Here it is:


    http://prime35.com/temp/wdmyhome_rescue.7z


    Forum post in Russian: http://4pda.ru/forum/index.php…28&st=12080#entry87843378

    • Offizieller Beitrag

    Hmmm, i think the better approach is to contact the author of the image and request to use a common device name schema instead of introducing its own.


    As an alternative simply add these two files to your installation, thus it will survive updates.


    /usr/share/php/openmediavault/system/storage/backend/sata.inc

    /usr/share/openmediavault/engined/inc/99wdhomestoragedevicebackend.inc

    PHP
    <?php
    namespace OMV\System\Storage\Backend;
    
    
    $mngr = Manager::getInstance();
    $className = sprintf("%s\%s", __NAMESPACE__, "Sata");
    $mngr->registerBackend(new $className());

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!