Add custom fstab options

  • Hi,


    I'm trying to use omv in order to make easy my life with home-nas.
    I have a simple question. Is a way in order to add a custom fstab option on filesystem mount?
    I cannot edit directly fstab because the omv-mkconf will change losing my additions.
    My problem is that the disks are born with btrfs filesystem (that I like) and I need to add a subvol=... option in order to keep the correct mounting schema.


    Thanks in advance


    luigi

    • Offizieller Beitrag

    You have to edit /etc/openmediavault/config.xml adding your options then run mkconf fstab and reboot or remount.
    Subvol options are very different for each disk so is not something that can be handled through environment variables like noexec or lzo or quota.
    So if the disks are gonna be permanently in there I recommend editing config.xml, for more subvolumes in the same disk add more mntent entries into the config.xml manually.

  • Hi,


    I directly modifed the config.xml adding the following:



    I have a btrfs subvolume @Documents mounted on the /Documents directory of the same fs. The filesystem is labeled as "Raid1".
    The (minor) problem is that filesystem (Raid1) is shon twice into the gui (e.g. volume combobox in Shared Folder).
    Is there a way to add custom mnt-entris into config.xml and at the same time avoid to show into the GUI?
    I cannot edit the fstab directly because I need to mount the Raid1 filesystem before to mount the subvolumes.
    I noticed that hidden semantic is not to "hide" the volume into the gui but instead to don't fill the fstab file.


    Thanks a lot for any suggestion.


    ciao


    luigi

  • The multi device shown twice is expected behaviour. It won't be fixed at the moment. It has been fixed in 3.0


    Hi subzero79,


    the omv3 patch avoid to show the volumes member of a "btrfs-raid" but it doesn't resolve when more subvolumes on the same btrfs volume are mounted.
    You can look the attached images. I have a raid1 btrfs partition with a lot of subvolumes mounted on it.


    ciao


    luigi

  • Interesting problem! Unfortunately it looks quite difficult to solve without more advanced support for btrfs subvolumes in OMV.


    You could work around it though.
    What is the tree of subvolumes in your btrfs filesystem like?
    You wish to have:

    Code
    /media/uuid -> @
    /media/uuid/Documents -> @Documents


    Hence you must have a folder Documents in @, so presumably your subvolumes list looks something like:

    Code
    ID a gen b top level c path @
    ID x gen y top level z path @Documents


    Why not just have the @Documents subvolume be a child of @? Like so:

    Code
    ID a gen b top level c path @
    ID x gen y top level z path @/@Documents


    Then you need only mount @ at /media/uuid to also have the @Documents subvolume accessible as /media/uuid/@Documents


    Only one volume will appear in OMV GUIs, to create shared folders in @, leave the path as automatically determined (e.g. shared folder with name 'sf1' fills in path as sf1/ and creates folder /media/uuid/sf1 (which is @/sf1). To create a shared folder for @Documents, type path as '@Documents/', OMV will use existing /media/uuid/@Documents folder (which is @Documents subvol).

Jetzt mitmachen!

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