Union File System

  • I've been on this forum a lot lately. Have gotten lots a help just wanted to thank everyone who is experienced enough to help. On to the question. I use OMV to basically store movies to watch with plex. I have several hard drives and move files between the drives. It was very slow. The movies are kept at another location so I do not need to run a raid on the disks. I did want file transfer between the disks to be faster and it was suggested that I use union file system to pool all the drives together and use folders on the drives. I have successfully done that but my question is if i lose one of my drives how will i know what movies are kept on what drives if I need to replace them? Where before I had movies on each drive in alphabetical order so if I lost a drive I knew exactly what movies I lost if I lost a drive. Now when I add movies it puts them into a drive with the most space. Hopefully this makes sense and someone can help me.

    • Offizieller Beitrag

    Either backup each drive individually -or- when restoring from backup, use rsync to just replace the missing drives.

    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

    So there is no way to tell without backing up what is on each drive using union file system?

    Sure there is. You would have to add a scheduled job to keep it up to date though. If you create a task for each drive (mount point and list file need to updated for your system), here is a command you could use:


    find /srv/dev-disk-by-label-files/ | tee /root/drive1

    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

    Is there a simple way?

    How is that not simple? It is a one line command for each drive. Otherwise, you don't have to use the most free space policy with mergerfs. There are other policies that will try to keep files in their original folders.

    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

    I have not used the command line feature yet on OMV. Even though I have had it awhile I have always done everything on the gui screen.

    You don't need to do that in the command line. Use it in the scheduled jobs tab in the "command" textbox in the web interface. Schedule it to run hourly or how often you make changes.

    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!

  • Sure there is. You would have to add a scheduled job to keep it up to date though. If you create a task for each drive (mount point and list file need to updated for your system), here is a command you could use:
    find /srv/dev-disk-by-label-files/ | tee /root/drive1

    @ryecoaaron Sorry to jump on this very old thread. I'm looking to setup a regular job to list all the files on each of the drives in my Union File System. I've tried using the task details you shared on this thread, but just can't get it to work. At the risk of sounding like I have no idea what I'm doing, could you please give another example showing the changes I'd need to make? Thanks in advance for your help!

  • rsync


    rsync


    It takes a lot of time to read both the local and remote file info, but only transfers the files that are actually different.

    Thanks for the response @burnbasket ... I was asking specifically about the response relating to being able to tell (or list?) the contents of each drive, rather than automating differential backups (although that also sounds like it could be useful in my case, too).


    I was looking for some further guidance on how to edit the suggested syntax find /srv/dev-disk-by-label-files/ | tee /root/drive1 in order to create a scheduled task to list the drive contents.

    • Offizieller Beitrag

    Not sure where exactly you need guidance, so here some points that came to my mind:



    find /srv/dev-disk-by-label-files/ | tee /root/drive1


    you need to adjust /srv/dev-disk-by-label-files to the mount point of your drive. "files" will be different on your system.


    Then the command will list all files which are contained in /srv/dev-disk-by-label-files in a file called "drive1" in the folder /root/.
    /root/ is the "home" folder of the user "root".


    To run the command regularly you can add a scheduled job in the gui of OMV. If this is not working, create a script file (*.sh) and execute the script as scheduled job.

    • Offizieller Beitrag

    In plain english, what the oneliner does is:


    "Find all files on a certain drive and write all the names to a certain file." Can hardly be simpler. You just need to specify the drive and the file where you want the filenames to end up.


    find is the name of a utility used to find files. Given just the name of a drive as the example shows it will find all files on that drive.


    Try it using the /srv/... path to one of your own drives and see what happens.


    The vertical character | means that the output from find is sent (piped) to the next command. In this case tee.


    tee is used to both show the input on screen and write it to a file.


    So you have to edit what drive you want to use and where you want the file with filenames to end up.


    find /path/to/drive | tee /path/to/list/of/files.txt


    Change /path/to/drive to the path of the drive starting with /srv/
    Change /path/to/list/of/files.txt to the name and path of the file where you want the filenames to end up


    You need to run this command on each of the drives in the union filesystem. And you will end up with a text file for each drive.


    Put all the commands in one shell script and run it as a scheduled task, perhaps in connection with backup tasks.

Jetzt mitmachen!

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