BTRFS Questions

Discussion in 'Computer Games and General Discussion' started by MaK11-12, Oct 29, 2010.

  1. MaK11-12

    MaK11-12 GBAtemp Regular

    Jul 26, 2009
    Hi dudes,
    I have some questions about btrfs.
    1) Lets say i did a basic command-line install of ubuntu on a BTRFS drive, how would i be able to enable compression on it?
    2) If i enable compression, would it compress the files allready copied in the installation?
    3) By enabling compression it would make loading off a usb much faster, but what about the "ssd" command?
    4) If i enable "nobarrier" , to make the performance faster, is it even worth it?

    I got some info here: BTRFS Commands
    and here: BTRFS wiki

    Thanks dudes!
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    United States
    I am not overly familiar with this file system (indeed I have not used drive/FS level compression since I was rocking a 486- it was also about this time I started playing with video and things like that anyhow) but giving it a go. I am assuming your data is worth compressing- video and images (be they pictures or isos) are rarely worth it at the drive level although unless you force it to it seems BTRFS will not touch files like those.
    Equally I am not quite sure what you expect this file system to do (or indeed what your requirements/intentions are).

    I assume you mean you want to install your distro onto a BTRFS drive using said drive as a root drive (and for that matter if you kick the usr folders to another drive/partition).

    1) First it is important to make sure your kernel and anything like that support the file system (it hit mainline a while back) as a root file system (mounting and using as root may not be that far removed but it is a distinction worth observing in this case).
    I know ubuntu is something of an all in distribution (as of maverick meerkat apparently it is available as a choice for a root install) but it is worth making sure it does.
    Assuming that is all good you need to mount it with the -o compress added on (give or take the -o if you already have one), some commands
    Do pay attention to where you want to stick your mounted drives (some distributions do it differently which is OK but your desktop icons, auto scan folders and the like may be there if you do not do it "properly")

    That is simple enough from the CLI or possibly even your automount scripts but for a root drive you may well have to play in the startup scripts or maybe /etc/fstab (I am not familiar with the specifics of ubuntu or indeed if it has an automated tool to do it for you but should help if not).

    2) No not initially. If you force a write on the file (or defrag it) then it will get compressed as a matter of course, has what I would rewrite in response to this anyhow.

    3) Make loading off a USB quicker- the USB standard is already quite CPU heavy and adding compression (the fairly simple LZ compression BTRFS uses will fall flat in the case of the better stuff your other files probably already use) on top of it may not be ideal. Speak to someone that had to use a weak laptop with drive encryption (medics usually) if you want a nice example of how compression and encryption can slow things up.
    As SSD (and the flags you can to it) implies it is built for flash memory architecture (probably ram based as well) rather than electromechanical and should make a few changes when it comes to things like making new files. Looking at (note it is over a year old at this point) says it sped SSD drives up quite nicely.

    4) One of the main niceties of this file system is the measure of protection it affords. Why you might want to lose these I am trying hard to figure out.
  3. MaK11-12

    MaK11-12 GBAtemp Regular

    Jul 26, 2009
    Thank you.
    But i have another issue,
    I installed Ubuntu 10.10 on to my usb (/boot as ext3) (/ as btrfs) but once i finnished and reboot, Grub says 'MSDOS out of free space', and after a few seconds load a 'busybox' shell. I couldn't find anything regarding this.
    I would've liked to do this so it would compress the files in the installation. But since i could run 'btrfs fi defragment' to recompress everything, should i just go for a /boot ext3 and / ext4 install then once booted convert the ext4 (/) to a btrfs? or would i get the same error?

    Also, Could i do it in debian (preferebly "squeeze" cause of its updated repo) since its smaller than ubuntu?

    Thanks dude

    Oh i found this: