Mounting Loop/Block Devices

  • Not sure if this is a feature request but I believe it may be. I'd like to be able to define virtual disk images and mount the filesystems they contain.


    Here's some background...I'd like to serve the root filesystem for several Raspberry PIs through NFS on my OMV server.


    Currently, I have copied the root filesystem for one of the available Debian/Raspbian images to a directory on a hard drive. I've shared that directory and have mounted it through NFS. I've created only one of these directories, so far.


    What I'd like to do is to create an image file of the root system and mount it as a loop device. In doing that, I can minimize the number of files by a very large amount. So instead of a directory with thousands of files and hundreds of directories, you would only have one file in its place. This makes managing several images easier and allows copying and testing changes to them easier and faster.


    I'd like to do this through the Web GUI. Maybe change "Physical Disks" to "Disks" and have the ability to define a "virtual" disk. A column could say if the entry is physical or virtual and show the file name if it's virtual. Or, a separate entry below "Physical Disks" could be created for "Virtual Disks". These would be stored in some configuration/XML file.


    When I mount the image, I use something like "mount -o loop,offset=$((10 * 512)) disk.img /media/mnt_point


    The offset is calculated by using fdisk to determine start block/sector and multiplying by sector size. This could be automated for disk images with one partition or mount all found partitions or have some user interface to pick and choose the partitions to mount.


    I'm trying to determine how I could do this now with OMV. I'm thinking updating config.xml manually to add the entries to fstab for the disk image files.


    Any comments or suggestions? How would I go about submitting the feature request?


    Thanks

    • Offizieller Beitrag

    While this might be handy for the three of us (me included), there isn't a lot of people asking for it. So, I'm sure it would be low on Volker's todo list.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    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!

  • An easy (?) approach would be to be able to specify a script to be executed after mounting the drive. This would make it possible to just write the mounting and sharing in bash.

    • Offizieller Beitrag

    While that is possible, it wouldn't allow using the device in other parts of OMV. Changes would also be overwritten by changes in OMV web interface. It would be best added to current OMV framework.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    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!

Jetzt mitmachen!

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