Posts by reddy

    Hello,


    I've just posted on wiki the very first draft of manual describing how to set up an encrypted OMV installation with aes-xts-plain64 cipher, random key for swap and exposing the rest of boot disk to store data.
    http://wiki.openmediavault.org…f_boot_disk_to_store_data


    I'll update it with screenshots soon. I hope you'll find it useful and maybe help to improve it.


    This thread is meant for feedback, discussion and ideas related to that manual.

    Quote from "fetto"

    This could probably be setup with dmcrypt quite easily, or even be integrated with a plugin or built into the control panel as default. Someone has to do it though :)


    Such a plugin would be great. I see from http://bugtracker.openmediavault.org/view.php?id=7 that support for encryption is planned, but with no work on the subject as of now.


    Quote from "ptruman"

    Do a custom install and/or select LVM with encryption. You'll have to enter the decrypt key on every boot however (meaning you'll need to be present or have an IP KVM).....


    I don't mind to enter the key manually on every boot.
    What are the pros and cons of each method (dm-crypt vs LVM)? Maybe other methods are worth considering (e.g. TrueCrypt)?
    I'm sorry for lame questions, but I'm new to encryption under Linux. Maybe somebody can write some tutorial or point to a good one?

    Thanks for the hint on the filesystem, I can still switch as I don't have a lot of data there yet. I built the NAS for reliability only, speed is not an issue (it works on USB drives anyway) so if there's something scary about XFS I'd prefer to switch to good old ext4.
    Nevertheless, I'd like to know why those mount points change...

    When rebuild finished everything seemed to be ok, mirror was mounted as originally defined to /dev/md0. However, after reboot the mirror is still clean but again changed mount point to /dev/md127 this time:




    This instability scares me a bit... Why it behaves in such a strange manner?


    For reference, current /proc/mdstat


    Code
    root@nas:/home/reddy# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md127 : active raid1 sdb[0] sdc[2]
    1953513424 blocks super 1.2 [2/2] [UU]
    unused devices: <none>


    and /etc/mdadm/mdadm.conf


    I tried to fix the array in following way:


    Code
    umount /dev/md126
    umount /dev/md127
    mdadm –stop /dev/md126
    mdadm –stop /dev/md127
    mdadm -A /dev/md0 -f –update=summaries /dev/sdb /dev/sdc
    mdadm /dev/md0 -a /dev/sdc


    And it started re-building the array:


    Code
    reddy@nas:~$ cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md0 : active raid1 sdc[2] sdb[0]
    1953513424 blocks super 1.2 [2/1] [U_]
    [===>.................] recovery = 17.6% (345273472/1953513424) finish=1285.7min speed=20846K/sec
    unused devices: <none>


    It will take quite a while. Is there any other way avoiding recovery? Both disks should already contain perfectly synchronized data in this case...

    I have rather unusual setup, namely I have two external USB disks connected to old netbook configured in raid1 (mirror). I set it up and it worked well for ~2 days. Today, however, when I turned my NAS on instead one mirror on /dev/md0 I see two degraded ones /dev/md126 and /dev/md127. The same disks are connected to the same USB ports all the time. The only thing which comes to my mind is the fact I was playing with partitions on system disk (not touching the mirror, both disks were disconnected that time) according to the method 4 from http://forums.openmediavault.o…topic.php?f=10&t=192#p734 (but I haven't run "mdadm /dev/md100 --create --force --level=linear --raid-devices=1 /dev/sda3" instruction proposed there to create linear array, I just simply mounted new /dev/sda3 from the Filesytems tab in the UI) - I wonder if that could do something wrong to the raid? Please find below all my current configuration.

    • What happened and how to fix it?
    • How to prevent this in the future?


    cat /proc/mdstat


    mdadm --detail /dev/md/mirror1


    mdadm --detail /dev/md126


    mdadm --detail /dev/md127


    cat /etc/fstab


    mount


    df

    Code
    root@nas:/home/reddy# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda1 8343480 1174032 6750020 15% /
    tmpfs 510256 4 510252 1% /lib/init/rw
    udev 504076 208 503868 1% /dev
    tmpfs 510256 0 510256 0% /dev/shm
    tmpfs 510256 8 510248 1% /tmp
    /dev/md126 1952559564 576696 1951982868 1% /media/fced0dfe-e95d-402d-8d66-4296b0736393
    /dev/sda3 106781756 32944 106748812 1% /media/ad146658-eed1-4447-8eeb-4659db35086a




    All 3 disks: internal system one and both USB drives are configured
    the same way to use minimum power, spin down after 10 minutes and
    enable S.M.A.R.T.:





    I'll post filesystems configuration screenshot in another post due to limit of 3 attachments per post.

    Unfortunately my account got mistakenly deleted together with all my posts hence I'm re-posting it again for reference. It's a copy from old forum: https://sourceforge.net/apps/p…&hilit=store+data+on+disk
    Al credits to the original author, marknewfsd


    Quote

    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.

    You're not alone, my account has been deleted with all posts, too. And I'm quite sure my accounts were not hacked, especially that I don't use Hotmail. I've re-created the account here and tried to re-post one post from old forum providing link to the source and this post was classified immediately as spam... I think something is wrong with the spam filter and we're getting false positives hence our accounts are deleted.
    What are the rules checking is a post is a spam or not?