From Fedora Project Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 144: Line 144:
=== Test case 2.B: / on bcache (LVM) ===
=== Test case 2.B: / on bcache (LVM) ===


Now we have a stable system with /home on LVM on bcache, we can go forward and have / on bcache.
==== step 1: / on bcache with fallback  ====
Now we have a stable system with /home on LVM on bcache, we can go forward and have / on bcache. Consider thought that bcache is EXPERIMENTAL!
 
To get / on bcache:
* create a Logical Volume: lvcreate -L 2G -n ROOTFS BCACHE
* create a filesystem: mkfs -t ext4 -L ROOTFS /dev/BCACHE/ROOTFS
* mount it: mount /dev/BCACHE/ROOTFS /mnt
* copy your current root filesystem to /mnt: cp -ax / /mnt
* edit /mnt/fstab so your root fs is mounted like: LABEL=ROOTFS / ext4 defaults 1 1
 
Now we have a duplicate root filesystem on /dev/BCACHE/ROOTFS. To use it we need to build a new initramfs:
* rename your current initramfs: mv /boot/initramfs...img /boot/initramfs...img.sav
* create a new initramfs: dracut -N
 
Now reboot your system. Edit your default grub entry:
* replace the root=UUID=... parameter in the "linux" line by: root=LABEL=ROOTFS
* remove any rd.lvm=0 occurrence
* boot it.
 
If all goes well, your system now boots fine and it's running on bcache!
* Edit your /etc/grub2.cfg file..
* .. duplicate the first "menuentry ... { ...}" (about 15 lines).
* Now change the first one and replace the root=UUID=... parameter in the "linux" line by root=LABEL=ROOTFS
* reboot again
 
Now your system should boot fine.


Step by step instructions are available on [[QA:Testcase_bcache-tools_root_on_bcache_(LVM)|this page]]


== Participants ==
== Participants ==
Please note that all contributions to Fedora Project Wiki are considered to be released under the Attribution-Share Alike 4.0 International (see Fedora Project Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please solve the following task below and enter the answer in the box (more info):

Cancel Editing help (opens in new window)