btrfs or Butter FS is a filesystem and has some interesting features:
- One can have FS snapshots. It is like a freeze of the filesystem at some point of time.
- btrfs is a extent-based filesystem. This means there are no lists of pointers. btrfs tracks contiguous blocks.
- btrfs makes checksums of data and metadata. Therefore it can detect errors in the filesystem in “realtime”.
- One can switch from ext3/4 to btrfs.
- btrfs is supported from UEK-2 and above.
Follow the below steps to Install Oracle Linux (UEK-2) with btrfs as a root filesystem
1. Start the system from Oracle 6.3 boot DVD
2. Select “Rescue installed system”
3. When prompted select “local cd/dvd” as the installation source
4. When prompted to start the network interface choose “no”
5. When prompted “The rescue environment….” select “Skip”
6. Open “shell”.
7. To find your system volume group, e.g. vg_vm003:
# vgscan
8. Activate the LVM volume
# lvchange -ay vg_vm003
9. To find your system partition (now ACTIVE), e.g. /dev/vg_vm003/lv_root
# lvscan
10. Verify/Repair the filesystem and convert it to btrfs
# fsck -fy /dev/vg_vm003/lv_root # btrfs-convert /dev/vg_vm003/lv_root
11. Mount the system partition (Do NOT use /mnt)
# mkdir /me # mount /dev/vg_vm003/lv_root /me
12. Modify fstab to change the fstype of your lv_root partition from “ext4” to “btrfs”
# vi /me/etc/fstab
13. To address problems with SELinux, do the following to prevent “Respawning too fast. Stopped” errors at startup.
# touch /me/.autorelabel
14. Finally dismount the partition
# umount /me
Now, remove the boot DVD and reset the computer. When the system restarts use default Oracle UEK kernel with btrfs support.