Beiträge von KanyonKris

    Mace,


    Thanks for the tips and info. I did what you suggested tonight.


    The backport btrfs-tools went fine, and yes they were much newer (v3.14.1 instead of 0.19).


    I blundered around a bit with subvolumes. I used OMV to mount the btrfs filesystem since that was the only way I was able to create the /media/<UUID> mount. I hope that didn't mess it up and create that "mkdir" mess. Is it necessary to mount from the terminal? If you wouldn't mind, please look over steps 7 and 8.

    I couldn't find instructions for installing OMV with btrfs, if they exist please post a link.


    I have a simple system with 3 disks (the 2 data disks will be mirrored, RAID1):


    /dev/sda Data disk 1, 4TB HD
    /dev/sdb Data disk 2, 4TB HD
    /dev/sdc Boot disk, 64GB SSD



    INSTRUCTIONS:


    1 - Install OMV. Install from image (CD, USB, whatever) to boot disk (SSD for me). Reboot, make sure OMV starts OK from your boot disk.


    2 - Install OMV-extras plugin. You need this to get a newer linux kernel (3.16) that supports btrfs. Follow this guide - http://omv-extras.org/simple/i…install-omv-extras-plugin


    3 - Select 3.16 kernel. Log into web interface, go to System / OMV-Extras.org, select the Kernel tab, click Install Backports 3.16 kernel, Save and Apply, Reboot, go back to OMV-Extras.org and make sure "Debian GNU/Linux, with Linux 3.16..." is selected.


    4 - Get terminal access. Some steps below use the command line so you will need a terminal. You can use the local terminal if you have a keyboard and monitor connected to your OMV. I prefer to use a remote terminal via SSH (Secure SHell), here's how: From OMV web interface select Services, SSH, check Enable. Use a SSH client (like PuTTY) to connect to your OMV. You will need to know the hostname or IP address (System, Network, Interfaces). Connect and login as root.


    5 - Install btrfs-tools. Even though btrfs is part of the 3.16 kernel, you need the utility programs in btrfs-tools to, for example, create a btrfs filesystem. From the command line type the following to get the newer backport btrfs-tools:
    echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports.list
    apt-get update
    apt-get -t wheezy-backports install btrfs-tools


    6 - Create the btrfs filesystem. A default mirrored (RAID1) filesystem with mirrored metadata and non-mirrored data is created with this command:
    mkfs.btrfs /dev/sda /dev/sdb
    I wanted my data to also be mirrored so I did this:
    mkfs.btrfs -d raid1 /dev/sda /dev/sdb
    For more information, see this beginners guide to btrfs - https://www.howtoforge.com/a-beginners-guide-to-btrfs


    7 - Mount the filesystem. In the OMV web interface go to: Storage, File Systems, select any of the data disks (for my system, /dev/sda or /dev/sdb) then click the mount button. The disks should now show as btrfs in the "File system" column.


    8 - Create subvolumes. This is optional but recommended since creating shares on the btrfs root will cause problems, like preventing snapshots (see macester's post below). Type the command df -h in the terminal and look for a line like this:
    /dev/sda 7814037168 1344 7811881600 1% /media/eee51012-49d2-423f-8f79-80a8594130ec


    NOTE: the long string after /media/ is the UUID. If you copy and paste from this post, be sure to replace this example UUID with the one for your system.


    To create subvolume for backups, type this:
    btrfs subvolume create /media/eee51012-49d2-423f-8f79-80a8594130ec/@Backups


    How about another for data:
    btrfs subvolume create /media/eee51012-49d2-423f-8f79-80a8594130ec/@Data


    To verify they were created, type ls -l /media/eee51012-49d2-423f-8f79-80a8594130ec and you should see something like this:
    drwxr-xr-x 1 root root 0 Mar 11 23:43 @Backups
    drwxr-xr-x 1 root root 18 Mar 11 23:57 @Data


    9 - Create shares. In the OMV web interface go to: Access Rights Management, Shared Folders, click on the Add button. To create a share for pictures, for Name enter Pictures, for Volume select /dev/sda (or whatever your btrfs volume is), for Path click the folder button and select @Data then click OK, now add the Pictures folder so the full path is /@Data/Pictures, select the Permissions you want, then click Save.


    Optional:
    - Create snapshots of subvolumes
    - Create a System, Scheduled Jobs to run scrub occassionally to check, and attempt to correct, any error in the btrfs filesystem


    Corrections and improvements welcome.

    Installed OMV 1.9 from CD last night. GRUB failed to install. Here are my disks:


    /dev/sda Data disk 1, 4TB HD
    /dev/sdb Data disk 2, 4TB HD
    /dev/sdc Boot disk, 64GB SSD


    GRUB was trying to install to /dev/sda even though in previous steps I had selected /dev/sdc as the disk I wanted to install too / boot from.


    I tried running disk detect again, still GRUB only wanted /dev/sda


    For kicks I ran the LILO step, it listed all 3 drives for me to choose to install to. I wanted GRUB so I aborted LILO.


    I solved the problem by powering down, unplugging the 2 data disks, powering up and doing the install. With only the SSD available, GRUB installed fine. After install I powered down again, plugged in the data HDs and set them up for data storage.


    It would be nice if GRUB installed to the disk already selected as the boot disk, or allowed the user to choose the disk to install to.