All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs subvolume mount with different options
@ 2018-01-12 17:49 Konstantin V. Gavrilenko
  2018-01-12 20:27 ` Timofey Titovets
  2018-01-12 20:37 ` Roman Mamedov
  0 siblings, 2 replies; 4+ messages in thread
From: Konstantin V. Gavrilenko @ 2018-01-12 17:49 UTC (permalink / raw)
  To: Linux fs Btrfs

Hi list,

just wondering whether it is possible to mount two subvolumes with different mount options, i.e.

|
|- /a  defaults,compress-force=lza
|
|- /b  defaults,nodatacow


since, when both subvolumes are mounted, and when I change the option for one it is changed for all of them.


thanks in advance.


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

* Re: btrfs subvolume mount with different options
  2018-01-12 17:49 btrfs subvolume mount with different options Konstantin V. Gavrilenko
@ 2018-01-12 20:27 ` Timofey Titovets
  2018-01-12 20:37 ` Roman Mamedov
  1 sibling, 0 replies; 4+ messages in thread
From: Timofey Titovets @ 2018-01-12 20:27 UTC (permalink / raw)
  To: Konstantin V. Gavrilenko; +Cc: Linux fs Btrfs

2018-01-12 20:49 GMT+03:00 Konstantin V. Gavrilenko <k.gavrilenko@arhont.com>:
> Hi list,
>
> just wondering whether it is possible to mount two subvolumes with different mount options, i.e.
>
> |
> |- /a  defaults,compress-force=lza
> |
> |- /b  defaults,nodatacow
>
>
> since, when both subvolumes are mounted, and when I change the option for one it is changed for all of them.
>
>
> thanks in advance.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Not possible for now.

-- 
Have a nice day,
Timofey.

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

* Re: btrfs subvolume mount with different options
  2018-01-12 17:49 btrfs subvolume mount with different options Konstantin V. Gavrilenko
  2018-01-12 20:27 ` Timofey Titovets
@ 2018-01-12 20:37 ` Roman Mamedov
  2018-01-15 13:57   ` Konstantin V. Gavrilenko
  1 sibling, 1 reply; 4+ messages in thread
From: Roman Mamedov @ 2018-01-12 20:37 UTC (permalink / raw)
  To: Konstantin V. Gavrilenko; +Cc: Linux fs Btrfs

On Fri, 12 Jan 2018 17:49:38 +0000 (GMT)
"Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com> wrote:

> Hi list,
> 
> just wondering whether it is possible to mount two subvolumes with different mount options, i.e.
> 
> |
> |- /a  defaults,compress-force=lza

You can have use different compression algorithms across the filesystem
(including none), via "btrfs properties" on directories or subvolumes. They
are inherited down the tree.

$ mkdir test
$ sudo btrfs prop set test compression zstd
$ echo abc > test/def
$ sudo btrfs prop get test/def compression
compression=zstd

But it appears this doesn't provide a way to apply compress-force.

> |- /b  defaults,nodatacow

Nodatacow can be applied to any dir/subvolume recursively, or any file (as long as it's created but not
written yet) via chattr +C.

-- 
With respect,
Roman

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

* Re: btrfs subvolume mount with different options
  2018-01-12 20:37 ` Roman Mamedov
@ 2018-01-15 13:57   ` Konstantin V. Gavrilenko
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin V. Gavrilenko @ 2018-01-15 13:57 UTC (permalink / raw)
  To: Linux fs Btrfs; +Cc: Roman Mamedov

Thanks, chattr +C is that's what I am currently using.
Also you already answered my next question, why it is not possible to set +C attribute on the existing file :)


Yours sincerely,
Konstantin V. Gavrilenko


----- Original Message -----
From: "Roman Mamedov" <rm@romanrm.net>
To: "Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com>
Cc: "Linux fs Btrfs" <linux-btrfs@vger.kernel.org>
Sent: Friday, 12 January, 2018 9:37:49 PM
Subject: Re: btrfs subvolume mount with different options

On Fri, 12 Jan 2018 17:49:38 +0000 (GMT)
"Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com> wrote:

> Hi list,
> 
> just wondering whether it is possible to mount two subvolumes with different mount options, i.e.
> 
> |
> |- /a  defaults,compress-force=lza

You can have use different compression algorithms across the filesystem
(including none), via "btrfs properties" on directories or subvolumes. They
are inherited down the tree.

$ mkdir test
$ sudo btrfs prop set test compression zstd
$ echo abc > test/def
$ sudo btrfs prop get test/def compression
compression=zstd

But it appears this doesn't provide a way to apply compress-force.

> |- /b  defaults,nodatacow

Nodatacow can be applied to any dir/subvolume recursively, or any file (as long as it's created but not
written yet) via chattr +C.

-- 
With respect,
Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-01-15 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 17:49 btrfs subvolume mount with different options Konstantin V. Gavrilenko
2018-01-12 20:27 ` Timofey Titovets
2018-01-12 20:37 ` Roman Mamedov
2018-01-15 13:57   ` Konstantin V. Gavrilenko

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.