I'll skip the bits that were already dealt with.

On Thu, Aug 6, 2015 at 5:19 AM, Peter Humphrey <pe...@prh.myzen.co.uk> wrote:
>
> First, btrfs balance. I had no idea that was needed, so of course I didn't
> include it in my attempts. Could that be why, on booting, the kernel couldn't
> mount the file system?

It isn't necessarily essential, but btrfs fi df /mnt/gentoo will show
you that before the balance there are still some chunks in single mode
- it seems like mkfs creates the first device and adds the second one,
leaving some residual non-RAID chunks (that hopefully will never have
data written to them).  The balance of an empty filesystem is really
fast and completely converts it to raid1, so I figured it would be
cleaner to do it this way.  I have no idea what happens if those
single chunks remain and you degrade the array.

>
> Third, why do you do your kernel compiling in /var/tmp/linux? It seems like
> extra work and I can't see a reason for it.

I usually still do my compiling as root (though this isn't an ideal
practice).  I build in /var/tmp for a few reasons:

1.  It keeps my sources clean.  All the output goes in /var/tmp.
Every build is pristine, etc.
2.  /var/tmp is a tmpfs - so the build goes MUCH faster (only reads
from my raid1 btrfs /usr/src, all writes go to tmpfs).  Only the final
built stuff has to be installed back (a fraction of total bytes
written), and then you're reading from tmpfs and only writing to disk.
Anytime you can avoid simultaneous read/writes from a disk things go
much faster.  Btrfs isn't exactly known for its speed at this point,
especially for writes, so I try to avoid dumping junk on it.
3.  If you're using gentoo-sources they'll actually cleanly uninstall
since they aren't messed with.

(Thanks to all for the comments so far.  They offer opportunities for
testing/experimentation, and also indicate where more explanation will
be helpful when I turn this into an article.  And, hopefully, a few
will already benefit in getting their btrfs systems working with these
notes.)

(My article should also have a warning at the top - btrfs is
experimental so don't come to me if it eats your data and you didn't
have backups.  raid1 is fairly mature at this point but I tend to
stick with mature but recent longterm kernels (indeed, I should
probably use a 3.18 series kernel explicitly in the install, and not
let it go with 4.0 though that at least is starting to mature).)

--
Rich

Reply via email to