Setup for swapping hdd's in Odroid HC2

  • Hi
    I have installed OMV (version 3.0.99, kernel Linux 4.9.61-odroidxu4) on an Odroid HC2. I am using it for backups and have 2 x 4TB hdd's, but only one hdd is inserted at any one time. The other one is located elsewhere and the hdd's are swapped monthly. The problem that I am having though is that mounting of the hdd partition is not happening automatically when the device reboots. I just want OMV to mount dev-sda1 each time and go from there. I want to avoid using uuid's and labels if possible. The shared folder on each hdd has the same name. Can anyone provide some guidance to help me get this done? I was looking at editing /etc/openmediavault/config.xml, but I want to make sure that I'm not at risk of breaking anything.

  • I just want OMV to mount dev-sda1 each time and go from there. I want to avoid using uuid's and labels if possible.

    Good luck relying on primitive and totally unreliable mechanisms from last century like those stupid device names starting with sd* (which can change anytime when devices are attached to different ports).


    Check the mount point of the HDD you configured first (most probably it's using the partition's label) and adjust the second disk in a similar way (of course using today's concepts like labels)

  • Is this an actual problem in this case?

    Not really.


    But the device naming scheme in Linux was/is really braindead since the beginning. Insert an USB thumb drive and /dev/sda is sdb, same with the stupid network naming scheme (ethX).


    Labels are a great improvement, UUIDs even more but I had to learn last year that UUIDs do not work with OMV semantics.

  • Thanks for the replies so far.


    Would it be safe to delete the uuid lines from the <fstab> and <sharedfolder> sections of config.xml, or would everything fall over if I did that?


    I'd like to have it so that the HC2 thinks that the 2 hdd's are the same thing. This would mean that I could never mount them concurrently, which I don't see as a problem.

  • I'd like to have it so that the HC2 thinks that the 2 hdd's are the same thing. This would mean that I could never mount them concurrently, which I don't see as a problem.

    Quick check on an OMV4 host:


    config.xml reads as this


    Code
    <mntent>
            <uuid>dae2f3d1-1a7a-4fd0-bf9e-73d521331686</uuid>
            <fsname>/dev/disk/by-label/BACKUP</fsname>
            <dir>/srv/dev-disk-by-label-BACKUP</dir>
            <type>btrfs</type>
            <opts>defaults,nofail</opts>
            <freq>0</freq>
            <passno>2</passno>
            <hidden>0</hidden>
          </mntent>

    And this is the result:


    Code
    root@backupsrv:/home/tk# cat /etc/fstab 
    UUID=fe4142df-92e9-489c-9752-d9350590f882 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
    /var/swap none swap sw 0 0
    tmpfs           /tmp            tmpfs   defaults        0       0
    # >>> [openmediavault]
    /dev/disk/by-label/BACKUP /srv/dev-disk-by-label-BACKUP btrfs defaults,nofail 0 2
    # <<< [openmediavault]

    My understanding is that the uuid is needed to define a unique entity but as long as you ensure both disks/partitions have exactly the same label the above config should be fine regardless of individual UUIDs since all that matters is the label and both disks ending up being available at the same path (fsname): '/dev/disk/by-label/BACKUP'

  • Thanks again for your help tkaiser. I'm still playing with it all. I made both hdd's have the same label but it didn't seem to help. One of the hdd's is auto-mounting fine just with using /dev/sda1. The other hdd needs to be mounted manually. I'm wondering if I should clone the good hdd onto the other hdd, using clonezilla?

Jetzt mitmachen!

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