Data that already exists will only be compressed on re-write. You can
do it with btrfs fi defrag and a script that traverses the fs to call
defrag on every file. Another good way is the find command that has
been outlined here:

https://btrfs.wiki.kernel.org/index.php/Problem_FAQ#Defragmenting_a_directory_doesn.27t_work

On Sun, May 26, 2013 at 12:29 AM, Leonidas Spyropoulos
<artafi...@gmail.com> wrote:
> On Sat, May 25, 2013 at 1:13 PM, Martin Steigerwald <mar...@lichtvoll.de> 
> wrote:
>> Am Samstag, 25. Mai 2013, 03:58:12 schrieb Duncan:
>> [...]
>> And can be verified by:
>>
>> martin@merkaba:~> grep ssd /proc/mounts
>> /dev/mapper/merkaba-debian / btrfs rw,noatime,compress=lzo,ssd,space_cache 0 >> 0
>> /dev/mapper/merkaba-debian /mnt/debian-zeit btrfs
>> rw,noatime,compress=lzo,ssd,space_cache 0 0
>> /dev/mapper/merkaba-home /home btrfs rw,noatime,compress=lzo,ssd,space_cache >> 0
>> 0
>> /dev/mapper/merkaba-home /mnt/home-zeit btrfs
>> rw,noatime,compress=lzo,ssd,space_cache 0 0
>> martin@merkaba:~> grep ssd /etc/fstab
>> martin@merkaba:~#1>
>> [...]
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> I see you are using compression. I don't have compression at the
> moment and I would like to use it. What will happen to the data that
> are already on the partitions? Will it be compressed when I use them?
> Do I have to re-write them? Would it be compressed with btrfs defrag
> command?
>
> Thanks for the information
>
> --
> Caution: breathing may be hazardous to your health.
>
> #include <stdio.h>
> int main(){printf("%s","\x4c\x65\x6f\x6e\x69\x64\x61\x73");}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to