SSD mode on HDD
Hey, I figured out that for some reason on both ubuntu and debian, SSD mode seems to be turned on even on HDD's (hard disk drives - eg. those with rotating disk). I figured out now, but it's been like this for at least a year or more and I didn't really had any problems with this. Is it OK to have SSD mode enabled on HDDs? -- 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
Re: New tool to recursive compress / decompress of files
There is a dozen of cases where you want to just compress some folders in your system, but you don't want to compress whole device, would you create a subvolume for each of them? On Sat, Mar 21, 2015 at 7:25 PM, Petr Bena wrote: > Ok, but what if I am just a non-root user who want to transparently > compress some of their data? What if I am a root user who does just > want to compress some large folder transparently and doesn't want to > mess up with subvolumes? > > I know that from sysadmin point of view, there is no need for this, > but from regular user point of view, who have btrfs on their laptop, > this could make life easier. > > On Sat, Mar 21, 2015 at 7:22 PM, Roman Mamedov wrote: >> On Sat, 21 Mar 2015 18:56:12 +0100 >> Petr Bena wrote: >> >>> unlike NTFS, compressing files in btrfs is not so simple >> >> There shouldn't be any need to micro-manage compression on Btrfs on a >> per-folder or per-file basis. Just mount the whole volume as >> compress=[method] >> (but not compress-force), there shouldn't be any downside, on the contrary, >> with the current ratio of CPU core count and their performance to disk I/O >> speed, you are likely to even see a speed-up. Also files which are detected >> to >> be incompressible are automatically skipped from compression (at least that's >> what it tries to do by design). >> >> If you want higher performance and less fragmentation on certain >> files/folders, >> you are supposed to set them NOCOW, at which point the compression is also >> automatically disabled. >> >> -- >> With respect, >> Roman -- 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
Re: New tool to recursive compress / decompress of files
Ok, but what if I am just a non-root user who want to transparently compress some of their data? What if I am a root user who does just want to compress some large folder transparently and doesn't want to mess up with subvolumes? I know that from sysadmin point of view, there is no need for this, but from regular user point of view, who have btrfs on their laptop, this could make life easier. On Sat, Mar 21, 2015 at 7:22 PM, Roman Mamedov wrote: > On Sat, 21 Mar 2015 18:56:12 +0100 > Petr Bena wrote: > >> unlike NTFS, compressing files in btrfs is not so simple > > There shouldn't be any need to micro-manage compression on Btrfs on a > per-folder or per-file basis. Just mount the whole volume as compress=[method] > (but not compress-force), there shouldn't be any downside, on the contrary, > with the current ratio of CPU core count and their performance to disk I/O > speed, you are likely to even see a speed-up. Also files which are detected to > be incompressible are automatically skipped from compression (at least that's > what it tries to do by design). > > If you want higher performance and less fragmentation on certain > files/folders, > you are supposed to set them NOCOW, at which point the compression is also > automatically disabled. > > -- > With respect, > Roman -- 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
Re: New tool to recursive compress / decompress of files
I am just wondering, does that defragment trick work for non-root users? Also, even if it did work, I could as well make my tools use this defragment trick instead, because I will probably never remember that hacky syntax of defrag command :P doing something like compress -r or decompress -r is just much more easy to remember than multiple commands. That thing I made is just a wrapper for other commands anyway On Sat, Mar 21, 2015 at 7:12 PM, Petr Bena wrote: > I would be certainly useful if this kind of tricks were mentioned on > https://btrfs.wiki.kernel.org/index.php/Compression or anywhere on > wiki > > On Sat, Mar 21, 2015 at 7:08 PM, Hugo Mills wrote: >> On Sat, Mar 21, 2015 at 06:56:12PM +0100, Petr Bena wrote: >>> Hi, I like the compress feature, but unlike NTFS, compressing files in >>> btrfs is not so simple. Just changing the flags using chattr will not >>> compress anything, only newly written data would be. >>> >>> For this reason I decided to create a new tool that makes this simple, >>> you can find it here: https://github.com/benapetr/compress >>> >>> It's very simple to use, for example to compress whole folder, you would do >>> >>> compress -rv >>> >>> the tool would recursively scan the folder, change all folders to +c >>> and copy all files, preserving attributes to a temporary file within >>> folder, then removes the original and move the copied, now fully >>> compressed file back. >> >>What does it do that this doesn't? >> >> $ chattr -R +c $dir >> $ btrfs fi defrag -r -c $dir >> >>(Sorry to do this to you, but better early in the life of the >> project than later). >> >>Hugo. >> >>> It's written in python despite I loathe it (I am a C++ programmer), >>> because most of people love it for some reason, any because this would >>> make it more simple for people to deploy it and modify it. >>> >>> The tool right now is in early alpha stage, probably full of bugs, I >>> made it few hours ago, but I would like to hear any feedback, whether >>> there would be any use for such a tool, feature requests etc :) >> >> -- >> Hugo Mills | You shouldn't anthropomorphise computers. They >> hugo@... carfax.org.uk | really don't like that. >> http://carfax.org.uk/ | >> PGP: 65E74AC0 | -- 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
Re: New tool to recursive compress / decompress of files
I would be certainly useful if this kind of tricks were mentioned on https://btrfs.wiki.kernel.org/index.php/Compression or anywhere on wiki On Sat, Mar 21, 2015 at 7:08 PM, Hugo Mills wrote: > On Sat, Mar 21, 2015 at 06:56:12PM +0100, Petr Bena wrote: >> Hi, I like the compress feature, but unlike NTFS, compressing files in >> btrfs is not so simple. Just changing the flags using chattr will not >> compress anything, only newly written data would be. >> >> For this reason I decided to create a new tool that makes this simple, >> you can find it here: https://github.com/benapetr/compress >> >> It's very simple to use, for example to compress whole folder, you would do >> >> compress -rv >> >> the tool would recursively scan the folder, change all folders to +c >> and copy all files, preserving attributes to a temporary file within >> folder, then removes the original and move the copied, now fully >> compressed file back. > >What does it do that this doesn't? > > $ chattr -R +c $dir > $ btrfs fi defrag -r -c $dir > >(Sorry to do this to you, but better early in the life of the > project than later). > >Hugo. > >> It's written in python despite I loathe it (I am a C++ programmer), >> because most of people love it for some reason, any because this would >> make it more simple for people to deploy it and modify it. >> >> The tool right now is in early alpha stage, probably full of bugs, I >> made it few hours ago, but I would like to hear any feedback, whether >> there would be any use for such a tool, feature requests etc :) > > -- > Hugo Mills | You shouldn't anthropomorphise computers. They > hugo@... carfax.org.uk | really don't like that. > http://carfax.org.uk/ | > PGP: 65E74AC0 | -- 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
New tool to recursive compress / decompress of files
Hi, I like the compress feature, but unlike NTFS, compressing files in btrfs is not so simple. Just changing the flags using chattr will not compress anything, only newly written data would be. For this reason I decided to create a new tool that makes this simple, you can find it here: https://github.com/benapetr/compress It's very simple to use, for example to compress whole folder, you would do compress -rv the tool would recursively scan the folder, change all folders to +c and copy all files, preserving attributes to a temporary file within folder, then removes the original and move the copied, now fully compressed file back. It's written in python despite I loathe it (I am a C++ programmer), because most of people love it for some reason, any because this would make it more simple for people to deploy it and modify it. The tool right now is in early alpha stage, probably full of bugs, I made it few hours ago, but I would like to hear any feedback, whether there would be any use for such a tool, feature requests etc :) Thanks -- 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
Re: btrfs doesn't report proper error when removing subvolume
hm, it's latest ubuntu version (ubuntu 12 LTS) kernel is some 3.2.x I think On Wed, Feb 20, 2013 at 8:57 PM, Petr Bena wrote: > hm, it's latest ubuntu version (ubuntu 12 LTS) kernel is some 3.2.x I think > > > On Wed, Feb 20, 2013 at 7:13 PM, Zach Brown wrote: >> >> > petrb@bots-bnr1:/mnt$ btrfs subvolume delete ext2_saved/ >> > Delete subvolume '/mnt/ext2_saved' >> > ERROR: cannot delete '/mnt/ext2_saved' >> > >> > this is not really very descriptive. It would be really cool if it >> > told me why it can't delete it. >> >> Hmm. I think this has been fixed for a long time. >> >> [zab@f18 ~]$ btrfs sub delete /mnt/btrfs/blah/ >> Delete subvolume '/mnt/btrfs/blah' >> ERROR: cannot delete '/mnt/btrfs/blah' - Operation not permitted >> >> >> http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs.git;a=commit;h=17cf679fb3622a9e3452777d07fcf3a346266ff1 >> >> Where'd you find that btrfs-progs version? :) >> >> - z > > -- 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