Xenserver and OVM S.M.A.R.T. behaviour

  • Hello everybody, I am new to OMV, as I recently installed a para-virtualized Debian OS and then OMV on top of it.
    So far so good, I even did a PCI pass-throught for the data HDD and everything runs smoothly, except that the virtual xenserver-managed main disk (/dev/xvda) is seen as an HDD capable of S.M.A.R.T. stuff, and I am getting errors in the console.


    The result is that every time I go in the SMART section of OMV, a "smartctl" command is issued on this disk (which is a virtual disk, so it should not be capable of doing SMART) and this error is returned:


    Code
    /dev/xvda: Unable to detect device type
    Please specify device type with the -d option.
    
    
    Error #0:
    exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; smartctl -x '/dev/xvda' 2>&1': smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
    Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org


    The only solution I was able to find is to manually modify the /usr/share/php/openmediavault/system/storage/backend/hdd.inc file, so that in the two regexps there, the "xvda" is ignored: a workaround, I know. This made disappear the /dev/xvda device from the SMART section and I was able to do SMART stuff on the actual SATA hdd I passed-through.


    I am wondering which is the right solution I should follow: how can I tell OMV that /dev/xvda is a virtual and not a SMART-capable HDD?
    Does anybody know?


    Thank you, kind regards,
    Marco

    • Offizieller Beitrag

    File a bug report here

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Could this have anything to do with the problem that I am dealing with?

    I was kind of thinking the same thing but your drive isn't virtual. Maybe something can still be done to not blow up the system if smart can't talk to the drive. @votdev

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I was kind of thinking the same thing but your drive isn't virtual. Maybe something can still be done to not blow up the system if smart can't talk to the drive. @votdev

    Well that makes me less concerned about bum RAM especially since I won't have enough free time to run memtest until Friday at the earliest. Has anyone else reported the log issue that I have been seeing?

    • Offizieller Beitrag

    I am wondering which is the right solution I should follow: how can I tell OMV that /dev/xvda is a virtual and not a SMART-capable HDD?
    Does anybody know?

    The solution is to tell the OMV backend that it has no SMARt capability. The class https://github.com/openmediava…rage/storagedevicehdd.inc must override the method hasSmartSupport and must do additional checks to find out if the device has SMART support or not. See also https://github.com/openmediava…ge/storagedevice.inc#L212.


    I can not do that because i do not have access to such a system or currently any idea how to solve that. Maybe a simple regex that will check the device file name could help to fix that issue. But the solution MUST not break existing functionality, thus it must be absolutely sure that xvda devices do not support SMART in general. So any contribution is welcome to support OMV and fix your issue.

  • Hi,


    i have the same Problem because I use OMV 3 in a VM on a XenServer. I would like to help you solve this problem, but would need some advice how.


    Greetings
    m0nKeY

  • Just jumping in to say that I have the same issue with OMV and XenServer.


    votdev, could the StorageDeviceHDD class override hasSmartSupport() with a simple comparison of the return value of IStorageDevice::getDeviceName() to xvd? xvdX, X=a,b,c,.. etc is the virtual disk driver of the OS which as far as I understand it does not support SMART by definition.


    Not a php coder but something along the lines of


    public function hasSmartSupport() {
    return !substr_compare($this->getDeviceName(),"xvd",0,3,1) && is_a($this, "\OMV\System\Storage\ISmartStorageDevice");
    }


    Or maybe the xvd check could go into the StorageDevice base class directly....

    • Offizieller Beitrag

    Please open a bugreport with all required information. Would be nice if you could make sure that XenServer really does not support SMART for virtual devices.

  • Hi votdev, I tried to raise an issue in the bug tracker but I keep getting the following error


    Invalid form security token. This could be caused by a session timeout, or accidentally submitting the form twice.


    My session had not timed out by the way. Regarding adding -d sat I tried this but it didn't work. It is just that smartctl cannot work with xvdX's at all.

Jetzt mitmachen!

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