SnapRAID changing drive assignments arbitrarily ...?

  • Hope someone can solve this...


    I am trying to get a fresh installation of OMV7 on new hardware. OS drive is an NVMe drive, and data drives are 4 HDDs. My process has been, install OMV to NVMe from USB drive during boot, switch to webGUI and download updates, install OMV-extras, downloaded SnapRAID and a few other plugins. Write ext4 file system to all 4 HDDs (dev/sda, sdb, sdc, sdd). Create shares /home in /sda, /media in /sdb, /backup, /docker and /quarantine (for ClamAV) in /sdc. Set up SnapRAID using /sda as data1 drive, /sdb as data2 drive, and /sdc as data3 drive, with /sdd as parity drive. It all went well, during all the setup, but a few minutes later I heard substantial HDD noise, and then just by luck happened to check the shares and their assigned drives had changed, and so had the drive assignments in SnapRAID -- I now have /home in /sdc, /media stayed in /sdb, /backup and /quarantine are on /sdd !!! and no shares on /sda, so I went to the SnapRAID setup and checked the drive assignments, /sda is now the parity drive ! instead of what I had assigned before which was /sdd. (I've omitted the "1" after each drive name, as in /sda1, etc. as there is only one partition per drive). EDIT -- I may have done a reboot in the middle of the process above... I did not keep that close of an eye...


    I have gone through this twice, thinking that I had made a mistake assigning drives the first time around, but this is being done arbitrarily by OMV, and without user consent !


    What if I had been setting stuff up with drives already containing data ? changing /sda from a data drive to a parity drive would have wiped out all my data in /sda !


    Is what is happening OK ? I would like the shares I create to stay in the drives I chose, so that I know, if for some reason I have to unplug a drive that I know what its content is...


    I am definitely NOT an expert, but this seems very odd to me... am I missing something ?

  • ...or, perhaps the actual name, as in /dev/sda1 for a given drive is what changed, like to /dev/sdc1, and not the drive itself with its shares. Either way I think it is very confusing. Looking at the drives page, and the actual serial numbers on the drives, seems that this is what is going on, though not 100% sure. The drive that originally, at start of the installation, had the /sda label now has the /sdc label, /sdb remained the same, /sdc changed to /sdd, and /sdd changed to /sda. ...but why ? Is SnapRAID changing things ? I have to say I only noticed this after I finished setting up SnapRAID, maybe it was SnapRAID that did this, or maybe it was something else ? like SMB ? which I also set up before noticing all this.

    • Neu
    • Offizieller Beitrag

    The drives /sda /sdb ... /sdX can change arbitrarily during Linux startup. That is why UUIDs are used to identify units unambiguously using a unique identifier. https://wiki.archlinux.org/tit…stent_block_device_naming

    • Neu
    • Offizieller Beitrag

    snapraid isn't a service and doesn't change things on the fly.


    I'm curious how you setup snapraid because it shouldn't be using /dev/sda. It should be using /srv/dev-disk-by-uuid-887a4e49-832c-4dba-92e5-c65f41a93d1e if you used the plugin.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    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!

  • Thank you both for the replies. Good to know the bits about the drives "labels" (like /sda, etc) changing on boot up. I used Fedora almost 20 years ago (Fedora 14) and I recall using the /dev/sda labels in /etc/fstab to specify mounting, so then the "labels" were pretty static.


    Anyways, here is a screenshot of OMV in setting up a SnapRAID drive (I did use the plugin), the options given are indeed in the terms of /dev/sdX, not the UUID presented in the "absolute path" for the drives as presented in storage>shared _folders page. /dev/sdX is also used in the storage>files_systems page (screenshot 2). After taking screenshot 2, I rebooted, and indeed the /dev/sda labels changed, see screeshot 3. Thank you chente for pointing this out, while the UUIDs remained the same. I feel good now, and silly for having done a complete clean re-install when I first noticed this and thought it had been my fault in not picking the right drives based on the /dev/sdX labels.

    Cheers



  • Although the drive device labels /dev/sdX can and often do change from boot to boot, the filesystem UUIDs used by SnapRAID in its configuration file will not. Look in that configuration file across multiple boots to see this.


    And don't confuse Device names with OMV-Names. When specifying OMV-Names don't use device labels.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • chente

    Hat das Label gelöst hinzugefügt.
  • chente

    Hat das Label OMV 7.x hinzugefügt.

Jetzt mitmachen!

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