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 138: Line 138:
=== Test case 2.A: /home on bcache (LVM)===
=== Test case 2.A: /home on bcache (LVM)===


Once your fresh Fedora 20 system is running, we will "move" /home to a Logical Volume (LVM) on a bcache device. Because of the flexibility that LVM provides the approach is quite different from page 1.A, for example we'll start by using sda4!
Once your fresh Fedora 20 system is running, we will "move" /home to a Logical Volume (LVM) on a bcache device. Because of the flexibility that LVM provides the approach is quite different from page 1.A, for example we'll start by using sda4! Do the following steps:


Step by step instructions are available on [[QA:Testcase_bcache-tools_home_on_bcache_(LVM)|this page]]
* yum install bcache-tools lvm2
* Make /dev/sda4 a bcache backing device: make-bcache -B /dev/sda4
* Make /dev/sdb1 a bcache caching device: make-bcache -C /dev/sdb1
* Note the set uuid and attach /dev/sdb1 to /dev/sda2: echo <set uuid> > /sys/block/bcache0/bcache/attach
 
Now you have a bcache device: /dev/bcache0
* use "bcache-status -s" to see details about your bcache device.
* create a Physical Volume: pvcreate /dev/bcache0
* create a Volume Group: vgcreate BCACHE /dev/bcache0
* create a Logical Volume: lvcreate -L 2G -n HOME BCACHE
* create a filesystem: mkfs -t ext4 -L HOME /dev/BCACHE/HOME
This will be our new /home device. To use it first move the current /home to another mount point:
* replace /home entry in your /etc/fstab: LABEL=HOME /home ext4 defaults 1 2
* mkdir /home.old
* umount /home
* mount /dev/sda2 /home.old
* mount /home
* cp -ax /home.old/* /home
* umount /home.old
 
* build a new initramfs with dracut???
 
Now you have a system with /home on LVM2 on bcache.
* reboot your system to see if it boots OK.
* do some other testing if you like.


=== Test case 2.B: / on bcache (LVM) ===
=== Test case 2.B: / on bcache (LVM) ===
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)