Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* Managing large volumes
@ 2014-01-02 22:28 Tim Cuthbertson
  2014-01-03  0:10 ` Chris Murphy
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tim Cuthbertson @ 2014-01-02 22:28 UTC (permalink / raw)
  To: linux-btrfs

I am a bit confused and I have probably managed to outsmart myself.
For about 15 months, I have been running my system on a single, large
btrfs volume. It is RAID-0 on two SATA-III HDD's for a total of 1.9
TB. This is a home system running Siduction (Debian Sid) Linux. While
I have root, home, and a special data directory each as separate
subvolumes, I am beginning to wonder whether I should have made each
of these on separate partitions and separate btrfs filesystems.

Am am at a point where I would like to do a fresh install of my OS
without losing my home and data contents. And I do not think separate
btrfs subvolumes will help me on that. Is that correct? Is there a way
to prevent an OS installation from formatting the /home and /data
subvolumes while completely replacing the root subvolume? Or do I need
to completely repartition my drives so I don't get into this
situation, again?

Thank you,
Tim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Managing large volumes
  2014-01-02 22:28 Managing large volumes Tim Cuthbertson
@ 2014-01-03  0:10 ` Chris Murphy
  2014-01-03  0:28 ` Duncan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chris Murphy @ 2014-01-03  0:10 UTC (permalink / raw)
  To: Tim Cuthbertson; +Cc: linux-btrfs


On Jan 2, 2014, at 3:28 PM, Tim Cuthbertson <ratcheer@gmail.com> wrote:
> 
> Am am at a point where I would like to do a fresh install of my OS
> without losing my home and data contents. And I do not think separate
> btrfs subvolumes will help me on that. Is that correct? Is there a way
> to prevent an OS installation from formatting the /home and /data
> subvolumes while completely replacing the root subvolume? Or do I need
> to completely repartition my drives so I don't get into this
> situation, again?

That's up to the installer. e.g. the Fedora installer requires a new subvolume for rootfs which can be either a new or existing Btrfs volume. Existing subvolumes for /home or /data can simply be assigned mountpoints, and behind the scene all that's really happening is an entry is made for them in fstab. So at least in the case of Fedora, it's even possible to install onto an existing Btrfs volume without replacing the prior rootfs until later if you wish. You aren't required to delete it, you only required to make a new one. I'm uncertain how Debian implements this in their installer.


Chris Murphy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Managing large volumes
  2014-01-02 22:28 Managing large volumes Tim Cuthbertson
  2014-01-03  0:10 ` Chris Murphy
@ 2014-01-03  0:28 ` Duncan
  2014-01-03  0:48 ` Kai Krakow
  2014-01-03  1:55 ` Russell Coker
  3 siblings, 0 replies; 5+ messages in thread
From: Duncan @ 2014-01-03  0:28 UTC (permalink / raw)
  To: linux-btrfs

Tim Cuthbertson posted on Thu, 02 Jan 2014 16:28:33 -0600 as excerpted:

> I am a bit confused and I have probably managed to outsmart myself. For
> about 15 months, I have been running my system on a single, large btrfs
> volume. It is RAID-0 on two SATA-III HDD's for a total of 1.9 TB. This
> is a home system running Siduction (Debian Sid) Linux. While I have
> root, home, and a special data directory each as separate subvolumes, I
> am beginning to wonder whether I should have made each of these on
> separate partitions and separate btrfs filesystems.
> 
> Am am at a point where I would like to do a fresh install of my OS
> without losing my home and data contents. And I do not think separate
> btrfs subvolumes will help me on that. Is that correct? Is there a way
> to prevent an OS installation from formatting the /home and /data
> subvolumes while completely replacing the root subvolume? Or do I need
> to completely repartition my drives so I don't get into this situation,
> again?

I'm not running Debian so won't attempt to answer that side of the 
question.  However, count me firmly on the side of independent 
partitions, here.  My thinking isn't so much with reinstallation (I run 
gentoo so that's not an issue), but on the fact that with subvolumes, 
it's still the same single huge filesystem tree, and that's *ALL* my data 
eggs in one filesystem basket!  What's worse is that said filesystem 
basket is still under development and thus even more than the always good 
sysadmin practice, I must be prepared with tested backups of anything I 
care about in that filesystem basket, should it turn out to be buggy.

Smaller individual filesystems are easier to manage from a backup 
perspective, especially if only one fails, and take less time to btrfs 
balance/scrub/whatever as well, so it's easier to keep them in reasonably 
good health.

That said, I know there are people that prefer either subvolumes or 
putting everything on LVM, as well, primarily because one doesn't have to 
worry about getting the size exactly correct or having too much space on 
one partition and too much data on another.  They have their valid 
reasons for what they do, too.  I just happen to know what I have found 
works best for me, after several decades of experience, over which I have 
had to deal with various disaster recovery situations.  I prefer to 
strictly limit my risk even when playing with still under development 
filesystems such as btrfs, and independent partitions is simply the most 
effective way I've found to do that for my own systems and use-cases, but 
that doesn't mean other people's approaches aren't better for their 
systems and their use-cases.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Managing large volumes
  2014-01-02 22:28 Managing large volumes Tim Cuthbertson
  2014-01-03  0:10 ` Chris Murphy
  2014-01-03  0:28 ` Duncan
@ 2014-01-03  0:48 ` Kai Krakow
  2014-01-03  1:55 ` Russell Coker
  3 siblings, 0 replies; 5+ messages in thread
From: Kai Krakow @ 2014-01-03  0:48 UTC (permalink / raw)
  To: linux-btrfs

Tim Cuthbertson <ratcheer@gmail.com> schrieb:

> I am a bit confused and I have probably managed to outsmart myself.
> For about 15 months, I have been running my system on a single, large
> btrfs volume. It is RAID-0 on two SATA-III HDD's for a total of 1.9
> TB. This is a home system running Siduction (Debian Sid) Linux. While
> I have root, home, and a special data directory each as separate
> subvolumes, I am beginning to wonder whether I should have made each
> of these on separate partitions and separate btrfs filesystems.
> 
> Am am at a point where I would like to do a fresh install of my OS
> without losing my home and data contents. And I do not think separate
> btrfs subvolumes will help me on that. Is that correct? Is there a way
> to prevent an OS installation from formatting the /home and /data
> subvolumes while completely replacing the root subvolume? Or do I need
> to completely repartition my drives so I don't get into this
> situation, again?

How about installing into a new root subvolume? I don't know if the Debian 
installer allows you to do that. But this way you could easily roll back 
later, or grab config files from there, or, or... And when you are done, 
simply remove the old root subvolume or deduplicate it using dedup and keep 
it around for archival purposes.

The one-partition layout is probably okay, tho many installers lack native 
support for it. But, at least this is how I think about it, take subvolumes 
as dynamically sized partitions from your storage pool.

Just keep in mind you don't want the installer to format your btrfs. You 
probably want to take a backup of your data first. It is probably possible 
to bootstrap your Debian installation by first creating your new subvolume, 
then mount it and use it as bootstrapped destination or chroot into it to 
run the installation. You could bind-mount your data and home there so it is 
visible to the installer for it to import your user id.

HTH
Kai


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Managing large volumes
  2014-01-02 22:28 Managing large volumes Tim Cuthbertson
                   ` (2 preceding siblings ...)
  2014-01-03  0:48 ` Kai Krakow
@ 2014-01-03  1:55 ` Russell Coker
  3 siblings, 0 replies; 5+ messages in thread
From: Russell Coker @ 2014-01-03  1:55 UTC (permalink / raw)
  To: Tim Cuthbertson; +Cc: linux-btrfs

On Fri, 3 Jan 2014, Tim Cuthbertson <ratcheer@gmail.com> wrote:
> I am a bit confused and I have probably managed to outsmart myself.
> For about 15 months, I have been running my system on a single, large
> btrfs volume. It is RAID-0 on two SATA-III HDD's for a total of 1.9
> TB. This is a home system running Siduction (Debian Sid) Linux. While
> I have root, home, and a special data directory each as separate
> subvolumes, I am beginning to wonder whether I should have made each
> of these on separate partitions and separate btrfs filesystems.

Why do you use RAID-0?

> Am am at a point where I would like to do a fresh install of my OS
> without losing my home and data contents. And I do not think separate
> btrfs subvolumes will help me on that. Is that correct? Is there a way
> to prevent an OS installation from formatting the /home and /data
> subvolumes while completely replacing the root subvolume? Or do I need
> to completely repartition my drives so I don't get into this
> situation, again?

A fairly standard OS install feature is to not run mkfs on a partition.  So if 
you had your system configured such that the current root is a subvol and that 
the root of the BTRFS filesystem has no names that match a regular 
installation (IE not having /usr etc) then it should just work.  Even if you 
use a /home subvol for the home directories that shouldn't be a real problem 
as the account creation process shouldn't remove old accounts.

One other issue you may have is that you need the installer to have a new 
enough kernel to support the filesystem.  If you install a system from a 
Debian/Wheezy CD and then upgrade it to Debian/Unstable then I think it gets 
some new filesystem features that make it impossible to mount with 
Debian/Wheezy.  I recall having to upgrade a Debian/Wheezy system to a 
Debian/Unstable kernel so it could mount a BTRFS removable device that had 
been mounted on a Debian/Unstable system.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-03  1:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 22:28 Managing large volumes Tim Cuthbertson
2014-01-03  0:10 ` Chris Murphy
2014-01-03  0:28 ` Duncan
2014-01-03  0:48 ` Kai Krakow
2014-01-03  1:55 ` Russell Coker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox