Creating directories in OMV filesystem

  • Is it better to use Windows to create folders rather than going directly to bash.

    Also I don't particularly want to create shares for my filesystem.

    I think you two are talking past each other. You have to create at least one share on OMV so you can access it from your PC. Once you have created at least one share and made it available using the SMB service, you can access that share and then create your file system inside of it from your pc. Smb will be available to whichever users you give permission to it from OMV. Hope that helps.

    Easy data backup: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, Wetty, & Heimdall - NanoPi M4 (v.1): backups using Rsync and Rsnapshot - Odroid XU4 (Using DietPi): PiHole - hc2, xu4, Pi 3B+, Odroid H2, and VirtualBox: Testing and playing - Mac user converting to Linux, Debian 10 KDE.

  • I accept that OMV is a NAS and must obviously use shared folders, otherwise it wouldn't work. My comments were to do with structuring the linux filesystem. OMV contains a tool to mount a filesystem but no tool to create the directory structure inside it or even to view it.

    It does offer an ssh service (does ssh require shares?) so that you can use bash, or you can use a share to a different system and use the directory tools from that.


    I not trying to be critical. I'm just learning. Presumably you could create a share from / so that the whole of the OMV filesystem was shared. Would that be the best approach?

  • OMV contains a tool to mount a filesystem but no tool to create the directory structure inside it or even to view it.

    For that the client is used. E.g. explorer on Windows or nemo on LinuxMint or dolphin on KDE etc.


    Presumably you could create a share from / so that the whole of the OMV filesystem was shared.

    By default OMV does not allow to create shared folders on the rootfs. But there is the sharerootfs plugin which allows you to do that. However it is not advised to share the complete root fs.


    You could also use FIleZilla to manipulate the filesystem (e.g. using sftp)

  • As you can see, I am a beginner, so I am just trying to understand.

    It seems that OMV does create folders via the 'add shared folders'. These are folders as children of /srv/dev-disk-by-label-Data/

    They appear in the linux directory hierarchy whether they use SMB or not. The only exception is if you use the sharerootfs plugin. Perhaps fs root is not a directory.

    However you advise not to use this plugin which, I think, means there should be some folders hidden from Windows explorer (for example).

    I don't believe that OMV is just an NAS (a storage for data to be moved in and out by a client).

  • It seems that OMV does create folders via the 'add shared folders'. These are folders as children of /srv/dev-disk-by-label-Data/

    They appear in the linux directory hierarchy whether they use SMB or not.

    Exactly.

    First you create the shared folders. Once created you can add them to the services (like SMB, FTP, nfs etc).

    When creating a shared folder the folder on the filesystem is created.

    It is also possible to point a shared folder to an existing folder on the filesystem.

    However you advise not to use this plugin which,

    Not quite. The intention of the plugin is to be able to create shared folders also on the root filesystem. That is ok.

    You could also use it to share the complete root filesystem (at least I think so, have not tested it), and that is not advisable.


    However, the proposed concept of OMV is to have the root filesystem and the data on separated drives.

  • Thank you, I am beginning to understand.


    Doesn't the fact that you can point a shared folder at an existing folder on the filesystem mean you must know what the exiting filesystem is called? And, since it isn't yet a shared folder, you can't see it from an SMB client. So you need another mechanism to view the filesystem which doesn't involve shares. And this other mechanism could just as easily be used to create the fs structure you require.


    Of course shares must be used for the basic transfer of data between client and server. I'm just exploring why shares are needed for constructing the fs hierarchy.

  • Doesn't the fact that you can point a shared folder at an existing folder on the filesystem mean you must know what the exiting filesystem is called?

    When you create a shared folder, you select the device, which actually is the filesystem label.

  • You can also login directly on the OMV NAS using SSH and then create folders as you please and where you please using normal Linux commands and tools. Bash. In effect opening up the hood and directly messing with the internals. NOTE: Unprotected access...


    I often use mc (Midnight Commander) for this purpose.


    Typically you just want to create and rearrange sub folders in existing shared folders, or move files around. It is very easy to mess things up and make OMV unusable and possibly cause data loss. But if you do know what you are doing this is a VERY powerful and fast way to manage your files.


    Using mc on a Linux computer it is even possible to open up a remote pane on the OMV NAS over the network using the FISH protocol. Great for quickly copying files or editing scripts and so on.


    If you have to ask about this you most likely don't know enough to use it safely. And you are better off managing the shares and the contents from a client over SMB or NFS.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!