<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    OpenSuse 13.2 with a default BTRFS file system is now out; however,
    I always wait a while before trying a new version so as to give the
    developers time to sort out the usual rush of new bugs that did not
    show up during beta testing. In the meantime I decided to try out
    BTRFS on my existing OpenSuse 13.1 installation but without a
    complete conversion. I have therefore just converted my data
    partition which resides on my SSD and mirror it with BTRFS RAID1 on
    my HD. My SSD is just 240 GB, my HD is 1 TB and my data partition is
    150 GB. This partition excludes photos and video since there is no
    room for those on my SSD and I access those infrequently compared to
    the stuff on my 150 GB data partition. Photos and Videos are in a
    partition on the 1 TB HD.<br>
    <br>
    My test then was on 150 GB SSD (sdb7) and 150 GB HD(sda9), mirrored
    with RAID 1. There are lots of articles and documents to view on
    BTRFS and quoting from one:<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <span style="color: rgb(51, 51, 51); font-family: Arial, Helvetica,
      sans-serif; font-size: 12px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      18px; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
      !important; float: none; background-color: rgb(255, 255, 255);">"The

      RAID in Btrfs has some differences from the old-fashioned RAID
      we're used to. In Btrfs RAID0 stripes your data across all
      available devices with no redundancy. RAID1 mirrors your data in
      pairs, round-robin across all available devices, so there are
      always two copies of your metadata regardless of how many devices
      are in the storage pool.</span>"<br>
    <br>
    So I could set up RAID 1 with mirrored meta data or with everything
    mirrored. I chose the latter. Before starting of course I made a
    fresh backup of my data (sdb7) and then tried:<br>
    <br>
    # btrfs-convert /dev/sdb7<br>
    <br>
    it seemed to work in that I could mount it and access it but when I
    tried to add a second drive (sda9) and convert it to RAID 1 it
    failed. eg<br>
    <br>
    # mount /dev/sdb7 /mnt/btrfs-test/<br>
    # btrfs device add -f /dev/sda9 /mnt/btrfs-test/<br>
    # btrfs balance start -dconvert=raid1 -mconvert=raid1
    /mnt/btrfs-test/<br>
    # "failed - error message", it didn't matter whether of not sda9 was
    formatted ext4 or btrfs. <br>
    <br>
    Since I had a fresh backup of sdb7 I decided to reformat both sdb7
    and sda9 and build a RAID 1 btrfs pair from scratch, I had already
    tried this out on a spare USB HD so I new it would work i.e.<br>
    <br>
    # mkfs.btrfs -f -d raid1 /dev/sdb7 /dev/sda9<br>
    # btrfs filesystem label /dev/sdb7 DATA        (I could have used
    the -L option in the above command to do this)<br>
    # mount /dev/sdb7 /home/john/data<br>
    <br>
    To see what has been done:<br>
    # btrfs filesystem show <br>
    <br>
    Finally it was necessary to update my /etc/fstab file which used to
    contain the mounting instruction:<br>
    <br>
    /dev/sdb7    /home/john/data        ext4           
    defaults,user_xattr        0 0<br>
    <br>
    and change to:<br>
    <br>
    /dev/sdb7    /home/john/data        btrfs   
    device=/dev/sdb7,device=/dev/sda9,defaults    0 0<br>
    <br>
    after saving /etc/fstab and unmounting;<br>
    <br>
    # umount /dev/sdb7<br>
    <br>
    and then re-mount:<br>
    <br>
    # mount -a<br>
    <br>
    SUCCESS!<br>
    <br>
    One more thing to note is that gparted shows a warning error on sdb7
    plus the normal mounted symbol (a key) and no used space info,
    whereas, sda9 shows no mounted symbol and the correct used space
    info. Also the normal commands df and du do not work correctly for
    BTRFS you need to use:<br>
    <br>
    # btrfs filesystem df /home/john/data/<br>
    <br>
    I shall still of course be running my regular daily and weekly
    backups since this is all automatic and unaffected by the change.
    Hopefully I will learn over the course of the coming weeks whether
    or not there are any problems with this setup and if I get any disk
    failures then it will be easy to fix.<br>
    <br>
    I hope the above was helpful to anyone who might try something
    similar.<br>
    <br>
    John<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
John Blomfield
Delivered by Thunderbird Email on Linux OpenSuse-KDE4

Old John B's Linux Notes <a class="moz-txt-link-freetext" href="http://www.oldjohnbslinux.wordpress.com">http://www.oldjohnbslinux.wordpress.com</a>


</pre>
  </body>
</html>