Mount sparsebundle (I don't want to break OMV3)

  • Hi there, I'm hoping to rsync the contents of a sparse bundle disk image which is formatted in HFS+ (in OMV as share) with an external USB hard drive that is formatted in HFS+. I came across this link which enables mounting sparsebundle images: https://github.com/torarnv/sparsebundlefs


    One of its pre-requisites is to install FUSE. However, I have installed the unionfileplugin. As I understand, the plugin uses FUSE, so I must already have this installed. The github suggested to install FUSE and 'export PKG_CONFIG_PATH' before compiling it. I'm new to Linux, so don't exactly know how to do this or what this means. Export it to where?


    Keen not to break OMV3, I started the process but stopped - I thought it prudent to seek advice from here before proceeding. Can anyone help with describing the process to get this working in simpler terms?


    Thank you

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • In order to be a little more helpful, I have attached the installation instructions. There are very few steps so I'm hoping it won't be too difficult to get this working..


    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Quote

    Note: If your FUSE installation is in a non-default location you may have to export PKG_CONFIG_PATH before compiling.

    you don't need to set PKG_CONFIG_PATH since your fuse installed by debian package and it is installed in default location


    just

    Code
    curl -L https://github.com/torarnv/sparsebundlefs/tarball/master | tar xvz
    apt-get install libfuse-dev fuse
    make

    and follow usage

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

  • Thanks for this!


    I should have expected there to be issues.. curl didn't work, so I installed it. First and second command then ran fine. 'Make' wouldn't run at all. Installed make. Upon executing, I receive the following error..

    Code
    root@NAS:/# make
    make: *** No targets specified and no makefile found. Stop.


    I then navigated to the sparsebundlefs directory in which there is a makefile. I then received the following error:



    Code
    root@NAS:/sparsebundlefs# make
    /bin/sh: 1: g++: not found
    expr: syntax error
    g++ sparsebundlefs.cpp -o sparsebundlefs -Wall -O2 -g -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -lfuse -pthread -Wl,-rpath=/usr/lib/x86_64-linux-gnu -DFUSE_USE_VERSION=26
    make: g++: Command not found
    Makefile:23: recipe for target 'sparsebundlefs' failed
    make: *** [sparsebundlefs] Error 127


    I have no idea about how to interpret this || . Advice would be appreciated

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Brilliant.. that got me past the g++ issue..


    I ran make and received several statements. I then ran make again and then received " 'sparsebundlefs' is up to date". So I was confident that it has been installed.


    I proceeded to the next step but received the following. Do I have to be in a certain directory in order to get this to work? I acknowledge that I am well beyond the scope of OMV now..


    Code
    root@NAS:/# sparsebundlefs ~/Test.sparsebundle /tmp/my-disk
    bash: sparsebundlefs: command not found



    For reference, the 'several statements' that I eluded to above are:



    Final note: I tried to uninstall and reinstall 'sparsebundlefs' but received:



    Code
    root@NAS:/# sudo apt-get install --reinstall sparsebundlefs
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package sparsebundlefs


    I'm quite confused..

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • Code
    cd sparsebundlefs
    # you should include ./ to execute binary in current directory
    ./sparsebundlefs <options>
    # you can directly use command without adding `./`
    # after
    cp sparsebundlefs /usr/sbin/

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

  • Thanks for this!! It took me a while to figure out the syntax on the sparsebundlefs page. The syntax is quite foreign to me. I'm assuming 'cp' stands for 'copy process' or similar. And usr/sbin is a global directory of sorts?


    More to the point, I struggled with the syntax to get the dmg mounted, the syntax is:


    Code
    mount -o loop -t hfsplus /tmp/my-disk-image/sparsebundle.dmg /mnt/my-disk


    I have assumed:

    /tmp/my-disk-image = full path of the location of my image on my data drive


    however, i couldn't get /mnt/my-disk to work:






    Failing the mount, I proceeded to OMV to see if anything would show up - and low and behold - loop0 was there! So I used the GUI to mount. And I could access my files.


    Can you explain where I was going wrong with the syntax I used above / what I should have written in order to mount the dmg in the CLI? I'm just trying to figure it out but can't make sense of it.


    Thank you for all of your help so far!

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

  • as I know cp stands for copy
    /usr/sbin is in path environment variable, you can see all global path `echo $PATH` (similar windows %PATH%)
    more detail, there is article


    I cannot 100% sure what is need since I don't have HFS file
    but according this blog you need

    Code
    sudo modprobe loop
    sudo modprobe hfs
    sudo modprobe hfsplus

    before


    mount -o loop -t hfsplus /tmp/my-disk-image/sparsebundle.dmg /mnt/my-disk

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

  • Just what I needed, thank you :thumbsup:


    The complexity lies with accessing a sparse bundle opposed to a regular image (dmg). This requires the sparsebundlefs tool (in addition to the other tools which needed to be installed) to mount the sparse bundle as a dmg, which - with the support of your blogpost and commands above - may be mounted in OMV.


    It is a convoluted approach, however useful should I ever need to access a sparse bundle in OMV. It hadn't occurred to me that Rsync is happy to work with sparsebundles. Thus, I have decided to maintain two external backups. One created in OSX with the help of Carbon Copy Cloner to store the raw data, and another for Rsync to backup the sparsebundle itself. Hopefully, I will be covered that way without the need to use CLI to convert/mount sparsebundles (ugh that was a pia 8o )

    NAS OMV 3.0.59 Rig: DFI Lanparty nForce4 SLI-DR | Opteron 165 Dual Core (no overclock) | 4GB Corsair Non-ECC DDR400 RAM | OMV3: 1x100GB IDE | Data: 2x 250GB WD 7200rpm, 2x 3TB WD Red, 1x 4TB Samsung 5400rpm

Participate now!

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