This discussion is archived
13 Replies Latest reply: Aug 29, 2012 3:01 PM by Avi Miller RSS

btrfs root filesystem

jwmitchell Newbie
Currently Being Moderated
The release notes for OL6.3 indicate that its possible to create a btrfs root filesystem on install using the alternative boot ISO media (excerpt from release notes at https://oss.oracle.com/ol6/docs/RELEASE-NOTES-U3-en.html):

Note: The standard installation media does not have support for creating a btrfs root filesystem on initial install. If you want to install Oracle Linux 6 Update 3 and use btrfs as your root filesystem, please use the alternative boot ISO media which uses btrfs as the default root filesystem. Using the boot.iso requires that the full installation source be available via a network method, i.e. FTP, HTTP or NFS.

However I still don't see how to do this. Just as with the full DVD install there isn't an option to use btrfs when laying out the fileystem in the installer. Anyone know how to do this?
  • 1. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    Oracle Linux uses the RHEL 6 installer, which has no btrfs support. However, it is not difficult to convert your existing installation to btrfs. It takes only several minutes. You can boot the system from V33412-01 (Oracle 6.3 boot.iso) available from https://edelivery.oracle.com/linux

    The following worked for me:

    Start the system from Oracle 6.3 boot DVD
    Select "Rescue installed system"
    When prompted select "local cd/dvd" as installation source (we don't need it)
    When prompted to start the network interface choose "no" (we don't need it)
    When prompted "The rescue environment…." select "Skip"
    Open "shell"

    To find your system volume group, e.g. vg_vm003:
    <pre>
    vgscan
    </pre>
    Activate the LVM volume
    <pre>
    lvchange -ay vg_vm003
    </pre>
    To find your system partition (now ACTIVE), e.g. /dev/vg_vm003/lv_root
    <pre>
    lvscan
    </pre>
    Verify/Repair the filesystem and convert it to btrfs
    <pre>
    fsck -fy /dev/vg_vm003/lv_root
    btrfs-convert /dev/vg_vm003/lv_root
    </pre>
    Mount the system partition (Do NOT use /mnt!)
    <pre>
    mkdir /me
    mount /dev/vg_vm003/lv_root /me
    </pre>
    Modify fstab to change the fstype of your lv_root partition from "ext4" to "btrfs"           
    <pre>
    vi /me/etc/fstab
    </pre>
    To address problems with SELinux, do the following to prevent "Respawning too fast. Stopped" errors at startup.
    <pre>
    touch /me/.autorelabel
    </pre>
    Finally dismount the partition
    <pre>
    umount /me
    </pre>

    Then remove the boot DVD and reset the computer. When the system restarts use default Oracle UEK kernel with btrfs support builtin.
  • 2. Re: btrfs root filesystem
    jwmitchell Newbie
    Currently Being Moderated
    I understand what you are saying. However, the release notes state that it is possible to install, "[using] the alternative boot ISO media which uses btrfs as the default root filesystem". What I don't see is how to do this using the alternate boot ISO media. I have seen references to Oracle producing a yet-unreleased installer using UEK and btrfs. Are the release notes referencing that? If so, the release notes are very unclear that this media is not yet available.
  • 3. Re: btrfs root filesystem
    Avi Miller Guru
    Currently Being Moderated
    jwmitchell wrote:
    However I still don't see how to do this. Just as with the full DVD install there isn't an option to use btrfs when laying out the fileystem in the installer. Anyone know how to do this?
    The alternative installer ISO with UEK2 kernel has passed QA and is in the process of being released to E-Delivery now. However, as it's month-end, it takes longer than usual to get an ISO published. Once it's published, we'll also be publishing a README on how to prepare the network sources to support a btrfs-based root filesystem.
  • 4. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    There are reasons to setup a network install, but I think it is not very practical for the purpose of installing a root btrfs filesystem. What's wrong with simply converting the root file system after the installation?
  • 5. Re: btrfs root filesystem
    955242 Newbie
    Currently Being Moderated
    Dude - I think you're missing our point. It was stated in the release notes it could be done upon install, create btrfs root filesystem, when 6.3 was released. We now know, this was not the case, the supplemental ISO is lagging behind - that's fine, it's just the documentation was wrong. I will follow your guide above; thank you for posting that.

    Joe
  • 6. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    Well, I understood you have setup a network installation source and tried to install the system using the installer from the boot.iso according to the readme. And it seems this is not working as advertised in the readme. I have not tried it.

    My point is that I see no point to bother setting up a network install just for the purpose to setup a root btrfs filesystem. That's why I posted instructions how to convert the existing root partition using the boot.iso image. But, whatever suits....
  • 7. Re: btrfs root filesystem
    Avi Miller Guru
    Currently Being Moderated
    952239 wrote:
    Dude - I think you're missing our point. It was stated in the release notes it could be done upon install, create btrfs root filesystem, when 6.3 was released. We now know, this was not the case, the supplemental ISO is lagging behind - that's fine, it's just the documentation was wrong. I will follow your guide above; thank you for posting that.
    Yeah, that's my fault: I wrote the release notes, but forgot to change them when I held the release of the UEK2-boot ISO. The ISO now creates a btrfs snapshot on install, which is more aligned with best practices when using btrfs for a root filesystem. Obviously, you can install as normal and convert to btrfs, but that is way more tedious than installing onto btrfs from the start. I apologise for the inconvenience, and not editing the release notes. However, given that we're hopefully only a few days away from having the new ISO published and how long it takes to update release notes, I may just leave them in place for now. :)
  • 8. Re: btrfs root filesystem
    Avi Miller Guru
    Currently Being Moderated
    Dude wrote:
    My point is that I see no point to bother setting up a network install just for the purpose to setup a root btrfs filesystem. That's why I posted instructions how to convert the existing root partition using the boot.iso image. But, whatever suits....
    You don't want to convert with the normal RHCK install DVD: the version of btrfs in the Red Hat kernel is woefully old, which is why we don't use it and why we didn't modify anaconda to allow you to create btrfs root filesystems with it. Please wait until the UEK2-based boot ISO is released, both for normal installs and conversions.

    Also note that if you are planning to convert to btrfs, don't use LVM (as it just adds another layer). Use btrfs' built-in multi-device management instead.
  • 9. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    I guess that depends how tedious it is to setup a network installation for that ;-)
  • 10. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    Ok, I see. Old btrfs version with the existing boot.iso... That's certainly a point. I was actually assuming it was uek2, but did not check. Would it be ok to use the latest Fedora Live CD?

    Anyway, I still wonder why it is more tedious to convert the existing root partition. Think I'd still rather convert the file system using the new boot.iso with UEK2 kernel, when it is released, rather than setting up a network install. Ok, LVM is another thing. Is there a network install available with a ULN subscription?

    Edited by: Dude on Aug 29, 2012 2:24 PM
  • 11. Re: btrfs root filesystem
    Avi Miller Guru
    Currently Being Moderated
    Dude wrote:
    Ok, I see. Old btrfs version with the existing boot.iso... That's certainly a point. I was actually assuming it was uek2, but did not check. Would it be ok to use the latest Fedora Live CD?
    Yes, you can use the current Fedora Live CD without a problem. That's what I did during my demos and until the UEK2-based boot ISO was created.
    Anyway, I still wonder why it is more tedious to convert the existing root partition. Think I'd still rather convert the file system using the new boot.iso with UEK2 kernel, when it is released, rather than setting up a network install. Ok, LVM is another thing. Is there a network install available with a ULN subscription?
    You can do a network install without any subscription: ULN is not a network install source. Just copy the contents of the OL6U3 DVD to somewhere on your network that is accessible via HTTP or NFS. Boom, you're done. For the UEK2-based boot ISO, you then need to replace the install images in that source with the new ones from the Boot ISO. We will be releasing a README/how-to with the ISO when it's released.
  • 12. Re: btrfs root filesystem
    Dude! Guru
    Currently Being Moderated
    I think it would be great if Oracle Public yum or another service could also provide a Oracle Linux network install. Perhaps it won't necessarily mean more bandwidth considering that people do not need to download the entire distribution images anymore. Setting up another http or file server may be restricted in some corporate vLAN's. Perhaps scp or sshsf was an alternative, but sshsf is not part of the standard distribution and both are not an installer option.
  • 13. Re: btrfs root filesystem
    Avi Miller Guru
    Currently Being Moderated
    Dude wrote:
    I think it would be great if Oracle Public yum or another service could also provide a Oracle Linux network install. Perhaps it won't necessarily mean more bandwidth considering that people do not need to download the entire distribution images anymore. Setting up another http or file server may be restricted in some corporate vLAN's.
    Yes, we've been talking about having network-based install sources on public-yum.oracle.com, but haven't made a decision yet. Keep in mind that corporate installs would usually use local install sources over anything on the Internet, as they would already have servers for patching and provisioning. Most corporates already use network-based installs using PXE anyway. It's far more likely that this would be used by small companies rather than large ones.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points