Rolffokkens (talk | contribs) No edit summary |
Rolffokkens (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description= | |description= | ||
This page describes a test case for bcache-tools | This page describes a test case for bcache-tools: "/ on bcache using LVM" | ||
Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. The bcache-tools package contains the utilities for manipulating bcache | |||
Testing covers not only bcache-tools but also the interaction between bcache-tools and other packages: kernel, util-linux, dracut and lvm2. | Testing covers not only bcache-tools but also the interaction between bcache-tools and other packages: kernel, util-linux, dracut and lvm2. |
Revision as of 12:05, 12 October 2013
Description
This page describes a test case for bcache-tools: "/ on bcache using LVM"
Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. The bcache-tools package contains the utilities for manipulating bcache
Testing covers not only bcache-tools but also the interaction between bcache-tools and other packages: kernel, util-linux, dracut and lvm2.
Starting with a stable system with /home on LVM on bcache, we can go forward and have / on bcache. Consider thought that bcache is EXPERIMENTAL!
Prerequisites
This test requires the following test case as preparation: /home on bcache (LVM)
The prerequisites for running the bcache-tools testcases can be found on this page
Setup
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
- build a new initramfs:
dracut -N
Now reboot your system.
- while in grub 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
How to test
- reboot your system to see if it boots OK.
- do some other testing if you like.
Expected Results
- All steps complete without errors