All of lore.kernel.org
 help / color / mirror / Atom feed
* mixing raid1 and raid0?
@ 2020-07-25  6:02 Eric Wong
  2020-07-25  6:10 ` Andrei Borzenkov
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2020-07-25  6:02 UTC (permalink / raw)
  To: linux-btrfs

Hey all, I've started using btrfs recently with old HDDs of
various sizes in a btrfs raid1 pool.  It seems pretty good from
a flexibility and redundancy standpoint.

However, things like temporary files, caches, etc. don't need to
be raid1, and raid0 might allow me to reduce wear on HDDs; so
I'd like to make part of it raid0 while keeping most of it raid1.

If my btrfs is mounted as /mnt/btrfs, would the following do
what I want?

  btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/btrfs/precious
  btrfs balance start -dconvert=raid0 -mconvert=raid0 /mnt/btrfs/junk

Or should I make a separate FS for temporary and disposable
raid0 data?

Thanks

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

* Re: mixing raid1 and raid0?
  2020-07-25  6:02 mixing raid1 and raid0? Eric Wong
@ 2020-07-25  6:10 ` Andrei Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2020-07-25  6:10 UTC (permalink / raw)
  To: Eric Wong, linux-btrfs

25.07.2020 09:02, Eric Wong пишет:
> Hey all, I've started using btrfs recently with old HDDs of
> various sizes in a btrfs raid1 pool.  It seems pretty good from
> a flexibility and redundancy standpoint.
> 
> However, things like temporary files, caches, etc. don't need to
> be raid1, and raid0 might allow me to reduce wear on HDDs; so
> I'd like to make part of it raid0 while keeping most of it raid1.
> 
> If my btrfs is mounted as /mnt/btrfs, would the following do
> what I want?
> 
>   btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/btrfs/precious
>   btrfs balance start -dconvert=raid0 -mconvert=raid0 /mnt/btrfs/junk
> 
> Or should I make a separate FS for temporary and disposable
> raid0 data?
> 
> Thanks
> 

Balance does not work on logical directory or subvolume level. Even if
it did, btrfs filesystem has only one target profile and it is the last
one used (i.e. the target profile of the last convert). So any new
writes after the last balance command would be using raid0 profile
everywhere.

Different allocation profiles for different subvolumes comes pretty
regular as wish list.

So you in your case you will need separate filesytem.

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

end of thread, other threads:[~2020-07-25  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25  6:02 mixing raid1 and raid0? Eric Wong
2020-07-25  6:10 ` Andrei Borzenkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.