Announcement

Collapse
No announcement yet.

BTRFS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BTRFS

    I just got a new hard drive and want to try out the new BTRFS file system on it with a fresh install of Kubuntu. I realize that it is still in development and for that reason I was wondering the following...
    Will the BTRFS filesystem be updated to reflect newly added features and bug fixes and what not every six months with major Kubuntu releases or would I only get those if I reformated the hard drive?

    #2
    Re: BTRFS

    The btrfs-tools package will receive updates, same as other packages, within the version that came with whichever Kubuntu version you install. The on-disk format (which is considered "finished" according to the wiki), will of course remain unchanged until the hard drive is reformatted.

    Should a new version of btrfs-tools be released, then unless the *buntu devs decide to backport it you would have to upgrade the Kubuntu version to get the newer package version. However, just speculating, one would think such an important package to the functioning of your system might well be backported.

    FYI, I've been running a two-drive btrfs filesystem for a couple months now -- seems quite solid as far as I can tell.

    Comment


      #3
      Re: BTRFS

      dibl: What's the usage on your btrfs filesystem? Have they solved the behavior problems when it reaches near-capacity? How often do you access it?

      I have a 3 partition btrfs file-system but I've only been using it as back-up storage so I don't access it often and it's 1.2TB in size so it's not near full.

      I think once all the features are fully implemented we'll have one heck of a fine file system!

      Please Read Me

      Comment


        #4
        Re: BTRFS

        I installed btrfs on a pair of new Western Digital WD1002FAEX drives. As I recall (I should have written it down), all I did was make a new partition table on each one, and didn't do anything else to them. Then (after installing btrfs-tools, and reading the wiki) as root I did:

        Code:
        mkfs-btrfs /dev/sdd /dev/sde
        To see the filesystem:

        Code:
        root@aptosidbox:/home/don# btrfs fi show /dev/sdd
        failed to read /dev/sdf
        failed to read /dev/sr0
        Label: none uuid: c112ed57-0e33-4d4b-82c9-5c55932c529d
            Total devices 2 FS bytes used 407.88GB
            devid  1 size 931.51GB used 206.15GB path /dev/sdd
            devid  2 size 931.51GB used 206.13GB path /dev/sde
        
        Btrfs Btrfs v0.19

        So, after dumping my music, videos, docs, and images onto this filesystem, which is at /mnt/DATA, here's what I see:


        Code:
        root@aptosidbox:/home/don# df -h
        Filesystem      Size Used Avail Use% Mounted on
        /dev/sda1       51G 5.7G  43G 12% /
        tmpfs         3.0G 8.0K 3.0G  1% /lib/init/rw
        udev         3.0G 280K 3.0G  1% /dev
        tmpfs         3.0G 684K 3.0G  1% /dev/shm
        /dev/sdb1       56G  35G  18G 67% /mnt/REVODATA
        /dev/sdc1       495M  60M 410M 13% /boot
        /dev/sde       1.9T 409G 1.5T 22% /mnt/DATA
        /dev/sdc2       15G 165M  14G  2% /mnt/WHATEVER
        none         3.0G  14M 3.0G  1% /tmp
        none         3.0G  15M 3.0G  1% /var/tmp
        none         3.0G 480K 3.0G  1% /var/log
        none         3.0G 4.0K 3.0G  1% /var/spool
        So, I have not pushed the limit -- it is mounted at bootime in /etc/fstab, and used daily/continuously.

        I am aware of the apparent idiosyncracies of btrfs usage reporting. I read an interesting discussion of the problem, I think it was in the wiki somewhere, but I cannot find it today. Basically it was from a developer perspective, i.e. "what do you really want to know?", and suggested that the perception of bugginess was not correct. He said it reports correctly what it is designed to report. With the metadata and data striping both on the metafilesystem (and allocated across member drives), and the need to maintain headroom for management and growth, apparently there is more that you need to know than xx% full. Maybe ....

        Also, for those checking into btrfs, don't overlook this: https://btrfs.wiki.kernel.org/index.php/Gotchas


        EDIT: the discussion on space allocation and usage measurement starts about halfway down this page: https://btrfs.wiki.kernel.org/index....RAID_volume.3F

        So, using the btrfs df command on my btrfs filesystem:

        Code:
        root@aptosidbox:/home/don# btrfs fi df /mnt/DATA
        Data, RAID0: total=410.00GB, used=407.34GB
        Data: total=8.00MB, used=0.00
        System, RAID1: total=8.00MB, used=36.00KB
        System: total=4.00MB, used=0.00
        Metadata, RAID1: total=1.12GB, used=554.58MB
        Metadata: total=8.00MB, used=0.00

        Finally, for anyone with the courage (@oshunluvr) to try the space_cache btrfs mount option, please proceed and the post back with your results. Me and my data are afraid to try it.

        http://www.phoronix.com/scan.php?pag...ce_cache&num=1

        Comment


          #5
          Re: BTRFS

          Thanks for the heads up. You know, it's weird. When I went to install it, it told me that BTRFS couldn't use the bootloader and the bootloader would have to be in a separate partition like ext3. That would be a rather annoying feature for people to deal with who are manually making partitions. Is that supposed to change in the future?

          oshunluvr, lets hope it also pulls ahead of ext4 in overall performance as well.

          Comment


            #6
            Re: BTRFS

            Originally posted by Prescience

            it told me that BTRFS couldn't use the bootloader and the bootloader would have to be in a separate partition
            That is actually not terribly uncommon -- jfs and xfs have the same limitation. If you know about it in advance, it's not a problem to make a small partition (couple of hundred megabytes) for /boot.

            Comment


              #7
              Re: BTRFS

              Don, I think I have to upgrade to the .37 kernel to use compression and space_cache. I added the maverick kernel backport ppa but haven't tried the kernel yet. I'm still using 10.04.1.

              The speed stats were a bit all over the place don't you think? I am planning on adding 2-4TB to my server soon so I'll have some more free space on my desktop for playing with btrfs...

              Prescience: I use a RAID0 device for my installs anyway so the separate partition is already in place for me if I choose to boot to a btrfs partition. Really, 100mb is plenty: I have 2 kernels and grub-pc and it's about 64MB. I usually recommend a separate /boot partition to all advanced users for reasons just like this one. In addition to that I use a separate partition for grub also.

              Please Read Me

              Comment


                #8
                Re: BTRFS

                Originally posted by oshunluvr
                Don, I think I have to upgrade to the .37 kernel to use compression and space_cache. I added the maverick kernel backport ppa but haven't tried the kernel yet. I'm still using 10.04.1.

                The speed stats were a bit all over the place don't you think? I am planning on adding 2-4TB to my server soon so I'll have some more free space on my desktop for playing with btrfs...
                Yes, you do need a .37 kernel. A Natty daily build installation would work ...

                I agree the performance tests don't impress, so far. But, btrfs is just now getting to the "tuning" phase of software development. Speed typically is the last focus of attention in software development, so I don't put a lot of stock in the benchmark tests, except to observe that they continue to get better as the software matures. So, time will tell.

                Comment


                  #9
                  Re: BTRFS

                  Just to be clear, the inability to have the bootloader on a BTRFS is here to stay? Or are there plans to add that ability later?

                  Comment


                    #10
                    Re: BTRFS

                    Originally posted by Prescience
                    Just to be clear, the inability to have the bootloader on a BTRFS is here to stay? Or are there plans to add that ability later?
                    You would have to ask the grub-pc developers that question -- I've seen no indication of plans to incorporate direct booting of btrfs filesystems. Remember, btrfs is designed to solve the problem of mega-terabyte servers having lots of hard drives, consolidating into a single filesystem. It really isn't targeted to the desktop user with his two Seagate hard drives. :P

                    Comment


                      #11
                      Re: BTRFS

                      Can ext4 be used for the /boot and the bootloader and does it matter if it is a primary or logical partition?

                      Comment


                        #12
                        Re: BTRFS

                        Yes.

                        However, since you only need 100MB for /boot on a normal hard drive (a single SSD erase block might be larger by necessity), the overhead and journalling required for ext3 and ext4 doesn't make a lot of sense on a partition that isn't going to have frequent data changes, so a lot of people use ext2 for the /boot partition. In other words, the files are only opened for a brief period during booting, and the only time that any data will change on your /boot partition is when you install a new kernel, or there's an update to the grub-pc package. So the "security" of the ext3/4 journalling is kind of a useless function 99% of the time. It's a matter of taste - you won't hurt anything with ext4.

                        I don't remember whether /boot can be a logical partition or not -- it might depend on whether your BIOS can see the "boot" flag, or needs one. Linux does not need the "boot" flag to boot the OS, but some BIOS's won't see the bootable partition without it.

                        Comment


                          #13
                          Re: BTRFS

                          Ok, thanks. I have it up and running and it's working great.

                          Once I get everything transferred over from my old ext4 hard drive to the new one, I'd like to reformat the drive, changing it's partition to BTRFS, but without adding a new operating system to it. Basically, it would just be an empty drive. What's the best way to do that? Is there a special app for that or can the Kubuntu install CD do that?

                          Comment


                            #14
                            Re: BTRFS

                            Nothing special.

                            Code:
                            sudo apt-get update && sudo apt-get install btrfs-tools
                            Assuming the target drive and partition is /dev/sdb1:

                            Code:
                            sudo mkfs-btrfs /dev/sdb1
                            Then you'll need to edit /etc/fstab to set it up for automatic mounting. Use mount "by-uuid". Use
                            Code:
                            sudo blkid
                            to find the blkid number of the new btrfs partition.

                            Comment


                              #15
                              Re: BTRFS

                              just to throw my 2 cents in -

                              I've had no problems having /boot on a logical partition, I use reisferfs for all my partitions.

                              Here's a decent wiki:

                              https://btrfs.wiki.kernel.org/index....ystem_Commands

                              Please Read Me

                              Comment

                              Working...
                              X