Moving Folders and Shares

  • hi there! I have a bunch of files (10TB) on an external HDD pulled from an old server, arranged into a particular folder structure. On my new OMV drive, I've set up my data drives pool as a single shared folders called "Server" (through MergerFS). If I use rsync to copy the entire HDD (with folder structure) into "Server," will the new folders show up as folders and be available for sharing within the OMV GUI? Or is it a better ID to create a folder structure within OMV first and move the contents of each folder over one at a time?


    Thanks!

    • Offizieller Beitrag

    will the new folders show up as folders and be available for sharing within the OMV GUI?

    As I understand you have currently one shared folder which is called "Server". If you now copy the data from the old drive in this folder, you will still have only one shared folder. But you can create additions shared folders in the GUI of OMV and point them to existing sub-folders in "Server".


    In the picture you can see, how to select an existing folder when creating a new shared folder.

    • Offizieller Beitrag

    You should move the data as the user that shall have access rights to these data. You can check this with a few files first, to see if everything is working.


    Regarding folder granularity, I think this is a matter of preference. However, you should avoid to have everything in one folder

    /Server/data/myname/

    unless there will be also folders on the same level as data or myname.


    If you have

    /Server/data

    /Server/movies

    ...

    it is easier for backup, as you only need to backup /Server/


    If you have

    /data

    /movies

    ....


    it can be easier when navigating to these folders e.g when setting up docker.


    Maybe somebody else sees some more important differences.

    • Offizieller Beitrag

    You will only have one top-level shared "server" folder.


    But in that folder you will have all normal sub-folders that were on the HDD you copied. And these sub-folders, along with their contents, will be shared as part of the main shared "server" folder.


    Unless you have some specific access/security requirements, I think it is better and easier to manage few (one?) shares with many sub-folders than a lot of separate shared folders with few sub-folders.


    Make sure you have the right storage policy set in mergerfs.

  • Thanks! Yeah, I think I will just have one folder, "Server," with the rest being subfolders that are not explicitly defined in the Shares menu in OMV. Make sense?


    By the "right storage policy," what do you mean?

  • You should move the data as the user that shall have access rights to these data. You can check this with a few files first, to see if everything is working.

    So don't run rsync as root?


    To be clear, I see there being a difference between the shared folders explicitly defined within OMV (which will only be "Server") and the actual folder structure, as imported from the old HDD, which will be "Server\Movies," "Server\Music," etc.

    • Offizieller Beitrag

    When you set up the rsync job you specify to preserve owner, group and permissions.

    Or you can add the --chown argument to the extra options to change owner and group.

    I am not aware how to inherit owner, group and permissions from the upstream folder.


    But you can reset permissions by using the resetperms plugin

  • When you set up the rsync job you specify to preserve owner, group and permissions.

    Or you can add the --chown argument to the extra options to change owner and group.

    I am not aware how to inherit owner, group and permissions from the upstream folder.


    But you can reset permissions by using the resetperms plugin

    Ah, interesting. I didn't realize that it would keep the old owner. Those are gonna be completely different from what OMV operates on now...But using resetperms makes sense, too.

    • Offizieller Beitrag

    Depending on what policy you use in mergerfs new files are not accepted, are stored on one drive until it is full, or spread out on all drives. It is all in the docs. Existing path, most/least free space and so on.


    I think it is called create policy, not storage policy.

  • Depending on what policy you use in mergerfs new files are not accepted, are stored on one drive until it is full, or spread out on all drives. It is all in the docs. Existing path, most/least free space and so on.


    I think it is called create policy, not storage policy.

    So, I have it on “most free space,” but it looks like the USB backup plugin is just dumping everything on one drive...

    UPDATE: Figured this out, it's because the policy was on "existing path."

  • Depending on what policy you use in mergerfs new files are not accepted, are stored on one drive until it is full, or spread out on all drives. It is all in the docs. Existing path, most/least free space and so on.


    I think it is called create policy, not storage policy.

    Further update! I notice that now, in light of the "most free space" policy (with no "existing path"), the files are getting moved around the various disks in order to find the right level. While this is going on, I can't seem to add any more files from the external USB drive ("Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; umount -v '/srv/84b7f8555478cb6519636c9623872717' 2>&1' with exit code '32': umount: /srv/84b7f8555478cb6519636c9623872717: target is busy."). Does this mean that I will run into problems adding new content while this drive balancing is occurring in the future?

    • Offizieller Beitrag

    There must be something else going on. The drive to use is decided when a file (or copy) is created. And after that it doesn't move unless you do something. Possibly excepting full drives?


    There is a balance tool available for mergerfs. But it doesn't run by itself. Are you running it?

Jetzt mitmachen!

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