Beiträge von marknewfsd

    Zitat

    OpenMediaVault is a wonderful NAS solution if you want to build your own system. Is is derived from FreeNAS but uses GNU/Linux instead of FreeBSD. I am really happy with it, but one thing kept bugging me: For some reason, the developers decided that the main file system containing the OS and configuration can not be used for storage.


    As I am using an old laptop for my NAS system (which is both cost-efficient and eco-friendly), I do not want to sacrifice my whole 320GB harddisk just for configuration files. I have found a way to work around this limitation in a robust fashion.


    I've found 3 ways to do this. (I suggest you to read all the methods and then decide which one is the best for you (Step 3 is the most easiest way).


    Method 1
    Create a file that will act as the container of all your files. There is only one downside of this; you aren't able to change the size of this container later on.
    More information


    Method 2
    Instead of a file you can use a partition on the disk.

    • You must boot from the live cd and reduce the size of partition where you installed OpenMediaVault.
    • Create another unallocated partition and then follow the instructions.
    • Continue Method 1, but skip the creation of the file.
    • Replace “losetup /dev/loop1 /virtualdisk” to “losetup /dev/loop1 /dev/sda3″ (where sda3 is your new partition).
    • In lodev script replace “losetup /dev/loop1 /virtualdisk” to “losetup /dev/loop1 /dev/sda3″


    Copyright IlgizKs comment on the website of Method 1


    Method 3
    Volker suggested that I should be able to do this http://by using mount bind.

    • Attach an USB stick to your system, mount it.
    • Open CLI (Command Line Interface) and write these commands:

      Code
      cd /
      mkdir /omv/
      cd /media/
      ls


    • Then look which disk is your usb stick.

      Code
      mount --bind /omv/ /media/usb_stick_name/


      (replace usb_stick_name with the name you see with the ls command)


    • Code
      cd ../
      cd usb_stick_name


    • Now create a file by using your favorite file editor. I'll use nano for this;

      Code
      nano test.txt


      Write something in the document, save it and exit the editor.


    • Check if the file you created is really there:

      Code
      cd /omv/
      ls


    • Create a shared folder on this location (by using the Web UI)


    • Now remove your USB Flashdrive


    • Check if the share and the folder /media/usb_stick_name are still there.
      Now we've created a solution to store files. All files which are being stored in /media/usb_stick_name will actually be stored in /omv/ (a folder on the first harddisk).
      There is one problem left, this mount command is gone after a reboot. This can be solved by creating a script that will automaticly mount the folder during the boot of the system.


    • Code
      nano /etc/init.d/mountfirstdisk


      Write this inside the file:


      Save the file and exit the editor.

      Code
      update-rc.d mountfirstdisk defaults


    • Now reboot your system to check if everything works. Now simply create a share on the 'fake' usb stick.


    I've tried Method 3 out and it works wonderfull. However, I've done and written these steps, but I didn't test them afterwards (by using this guide), so in case something isn't working, please tell me. (Sorry for the buggy layout of each step, this is the fault of the forum system here)


    Warning: be sure to test each method first in VirtualBox before applying them into a production system. You don't want to break anything.[/quote]