<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Uhhg! What a disaster! Thank god for
backups!<br>
<br>
It all started when I attempted to up date my VirturalBox and run
the usual kernel module setup. It complained about an
inconsistency with the kernel version. I attempted to sort that
out - somehow my kernel was not the same as the rest of the
installed software - can't remember how that happened - probably
too much meddling! Anyway I switch to a kernel compatible with
everything else and found that my BTRFS data partition was not
accessible even though it was properly mounted and I could see it
from:<br>
<br>
btrfs filesystem show<br>
<br>
that the data was still there. In spite of a long long search I
could find no help on this on how to get it back. I deleted the
BTRFS partitions and re-configured them - re-loaded all my data
from backup and I was good to go again. Then I thought I had
better fix GRUB menu and get rid of the old kernels; this I did
using Suse's Yast system manager and managed to lose all access to
BTRFS partitions again! Couldn't figure out what happened unless
it was to do with GRUB not being compatible with BTRFS. Totally
mystified! To cut a very long story short during which the air was
"blue" with curses, I have returned to good old ext4 and backups.
Moral of the story "if it ain't broke don't fix it".<br>
<br>
To cap it all my media server got messed up in the process so my
wife could not watch her videos - that put me in the dog house.<br>
<br>
<br>
<br>
John<br>
<br>
<br>
On 11/05/2014 04:28 PM, John Blomfield wrote:<br>
</div>
<blockquote cite="mid:545AC0C8.5020303@shaw.ca" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.oldjohnbslinux.wordpress.com">http://www.oldjohnbslinux.wordpress.com</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Discuss@vlug.org">Discuss@vlug.org</a>
<a class="moz-txt-link-freetext" href="http://lists.vlug.org/mailman/listinfo/discuss">http://lists.vlug.org/mailman/listinfo/discuss</a>
</pre>
</blockquote>
<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>