Mounting Loop/Block Devices

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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
    • 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 4.0.6 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • 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 4.0.6 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!