* subvolume / folder compression flag
@ 2014-12-14 2:59 Ali AlipourR
2014-12-14 7:38 ` Robert White
2014-12-15 12:27 ` Austin S Hemmelgarn
0 siblings, 2 replies; 3+ messages in thread
From: Ali AlipourR @ 2014-12-14 2:59 UTC (permalink / raw)
To: linux-btrfs
Hi,
1- Do setting compression flag per subvolume is implemented?
(I did read on wiki that it is not implemented, but I can set it via
"btrfs property")
2- If I set compression flag via "btrfs property" or "chattr" on a
subvolume, and rsync files without compression flag from ext4 file
system and preserve attributes by rsync -AX, do these files on that
btrfs subvolume will be compressed?
I mean do files will be compressed even if their compression flag
wasn't set, and just their subvolume compression flag was set?
3- what if I do same as 2 but on normal folder instead of subvolume
(chattr +c that folder), Do files within that folder will be
compressed even if their compression flag wasn't set?
Thanks,
Ali
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: subvolume / folder compression flag
2014-12-14 2:59 subvolume / folder compression flag Ali AlipourR
@ 2014-12-14 7:38 ` Robert White
2014-12-15 12:27 ` Austin S Hemmelgarn
1 sibling, 0 replies; 3+ messages in thread
From: Robert White @ 2014-12-14 7:38 UTC (permalink / raw)
To: Ali AlipourR, linux-btrfs
On 12/13/2014 06:59 PM, Ali AlipourR wrote:
> 2- ... and rsync files without compression flag ...
The --compress flag for rsync has nothing to do with how the files are
stored on either end. It determines whether the data is compressed as it
passes from the source rsync to the destination rsync process over the
network or whatever.
I don't have any information about the rest of the question but the
rsync option doesn't change the data as read or written, just as
transmitted.
The only difference between using compressed or not is:
source --normal--> rsync --compressed--> rsync --normal--> dst
source --normal--> rsync --not_compressed--> rsync --normal--> dst
If the fielsystems at source or dst do transparent compression then that
will be done/undone transparently.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: subvolume / folder compression flag
2014-12-14 2:59 subvolume / folder compression flag Ali AlipourR
2014-12-14 7:38 ` Robert White
@ 2014-12-15 12:27 ` Austin S Hemmelgarn
1 sibling, 0 replies; 3+ messages in thread
From: Austin S Hemmelgarn @ 2014-12-15 12:27 UTC (permalink / raw)
To: Ali AlipourR, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
On 2014-12-13 21:59, Ali AlipourR wrote:
> Hi,
>
> 1- Do setting compression flag per subvolume is implemented?
> (I did read on wiki that it is not implemented, but I can set it via
> "btrfs property")
AFAIK, it's the compression related mount options that don't work
per-subvolume. Using chattr +c or btrfs properties should work (I don't
know if btrfs properties are inherited by default though).
>
> 2- If I set compression flag via "btrfs property" or "chattr" on a
> subvolume, and rsync files without compression flag from ext4 file
> system and preserve attributes by rsync -AX, do these files on that
> btrfs subvolume will be compressed?
> I mean do files will be compressed even if their compression flag
> wasn't set, and just their subvolume compression flag was set?
>
> 3- what if I do same as 2 but on normal folder instead of subvolume
> (chattr +c that folder), Do files within that folder will be
> compressed even if their compression flag wasn't set?
These depend on many things. Using -A won't (barring bugs in rsync)
affect anything set by either chattr or btrfs properties. Using -X
MIGHT clear the btrfs properties, but I don't think it affects stuff set
by chattr unless you are root (I know that it doesn't preserve
immutability or append-only flags unless you are root). In both 2 and
3, I believe that the files will be uncompressed on the btrfs volume.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-15 12:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 2:59 subvolume / folder compression flag Ali AlipourR
2014-12-14 7:38 ` Robert White
2014-12-15 12:27 ` Austin S Hemmelgarn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).