Menu

Question - SnapRAID on top of mdadm / LVM - more curiosity than need

Help
2015-09-09
2018-09-05
  • Eric Clemons

    Eric Clemons - 2015-09-09

    Using snapraid in my home NAS and loving it so far. I've got five 4TB disks, and have added one as parity to SnapRAID and the rest as data/content pooled via aufs. Works great.

    I just have a couple of questions... Not for any particular need but just for curiosity's sake.

    I was playing around with a couple of spare 2TB disks. And I joined them together with mdadm to create /dev/md0 - formatted the result as ext4, mounted it, and added it to snapraid

    Now, if I try to run the commands snapraid smart or devices I get the following errors.

    # snapraid smart
    Failed to open '/sys/dev/block/8:32/slaves/sdk/dev'.
    Failed to expand device '9:0'.
    SMART unsupported in this platform.
    
    # snapraid devices
    Failed to open '/sys/dev/block/8:32/slaves/sdk/dev'.
    Failed to expand device '9:0'.
    List unsupported in this platform.
    

    I discovered I got a very similar error when I, instead, joined the disks together in LVM as a Logical volume instead of a mndam stripe or linear set.

    Is this expected behavior in a case like this? Are LVM/mdadm volumes missing something that SnapRAID expects a 'real' volume to have?

    Of course, in reality, this is no problem - I can simply format the raw /dev/sdn disks and tell SnapRAID to use them and join them with my unionFS of choice. Like I said, this is mainly for curiousity's sake and my own education.

    Thanks!
    Eric

    Additional info:
    I'm using Openmediavault and doing a lot of this in the UI. But I am familiar with the linux command line.

    The lines added to the SnapRAID conf were:

    #####################################################################
    # OMV-Name: snapraid1  Drive Label: testraid
    2-parity /media/4a423a0e-4b1b-4267-804c-00af5b5247f8/snapraid.2-parity
    

    Versions used

    # mdadm --version
    mdadm - v3.2.5 - 18th May 2012
    
    # lvm version 
    LVM version:     2.02.95(2) (2012-03-06)
    Library version: 1.02.74 (2012-03-06)  
    Driver version:  4.27.0
    
    # snapraid --version
    snapraid v8.1 by Andrea Mazzoleni, http://snapraid.sourceforge.net
    
     

    Last edit: Eric Clemons 2015-09-09
  • rubylaser

    rubylaser - 2015-09-10

    I wouldn't expect smart to work on an mdadm array or LVM volume the same way that smartctl won't work on either of those. It expects an individual disk to be passed to it to query values. In regards to the devices option, I haven't looked at the code to see what this option is actually doing, but I expect that it too, is looking for an individual disk assigned to a file path.

     
  • Eric Clemons

    Eric Clemons - 2015-09-19

    Thanks for the feedback. I didn't think to just look in the code... I took a quick look and while my C is rusty and I don't have an IDE setup for it - I think you're absolutely right. Also, both the 'devices' and 'smart' option end up going down the same code path - hence the same errors.

     
  • Hendrik Friedel

    Hendrik Friedel - 2018-09-01

    Hello,

    I am having the same problem. How can I work around it?
    The drive on which the failure happens is not even part of my snapraid-array.

    Greetings,
    Hendrik

     
    • rubylaser

      rubylaser - 2018-09-05

      Can you provide the exact error? That sounds like just a standard SMART error alert. SnapRAID only works on the disks that are mentioned in your snapraid.conf file.

       

Log in to post a comment.