Rolffokkens (talk | contribs) No edit summary |
No edit summary |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Package bcache-tools test cases]] | [[Category:Package bcache-tools test cases]] | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description=/home on bcache ( | |description= | ||
This page describes a test case for bcache-tools; "/home on bcache without 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 and util-linux. | |||
Assuming you have a fresh Fedora 20 system is running, we will "move" /home to a bcache device. To do this it's convenient to have a minimum amount of data on /home. | |||
=== Prerequisites === | === Prerequisites === | ||
The prerequisites for running the bcache-tools testcases can be found on [[QA:Testcase_bcache-tools-prerequisites|this page]] | The prerequisites for running the bcache-tools testcases can be found on [[QA:Testcase_bcache-tools-prerequisites|this page]] | ||
Line 8: | Line 15: | ||
# Open terminal | # Open terminal | ||
# Switch to root user: <code>su -</code> | # Switch to root user: <code>su -</code> | ||
# | First of all we have to make sure no traces of bcache superblocks are left on /dev/sdb1 from earlier experiments. So <u>before installing bcache-tools</u> do the following: | ||
# If needed "backup" all data in /home to another place on your root filesystem | # update util-linux to the latest version (2.24 is required): <code>yum update util-linux</code> | ||
# Wipe whatever is on the /dev/sdb1 partition: <code>wipefs -a /dev/sdb1</code> | |||
# Next install bcache-tools: <code>yum install bcache-tools</code> | |||
## Make /dev/sda2 a bcache backing device: <code>make-bcache -B /dev/sda2</code> | # If needed "backup" all data in /home to another place on your root filesystem, <b>because all data on /dev/sda2 will be destroyed in the next steps</b>. | ||
## Make /dev/sdb1 a bcache caching device: <code>make-bcache -C /dev/sdb1</code> | # comment /home out in your /etc/fstab | ||
# | # unmount /home (which is on /dev/sda2) | ||
# reboot so bcache-tools is processed well | |||
|actions= | |||
# Erase the old /home from /dev/sda2: <code>wipefs -a /dev/sda2</code> | |||
# Make /dev/sda2 a bcache backing device: <code>make-bcache -B /dev/sda2</code> | |||
# Erase any existing metadata from /dev/sdb1: <code>wipefs -a /dev/sdb1</code> | |||
# Make /dev/sdb1 a bcache caching device: <code>make-bcache -C /dev/sdb1</code> | |||
# Retrieve the cset.uuid from your /dev/sdb1 caching device: <code>bcache-super-show /dev/sdb1</code> | |||
# Attach /dev/sdb1 to /dev/bcache0: <code>echo <cset.uuid> > /sys/block/bcache0/bcache/attach</code> | |||
Now you have a bcache device: /dev/bcache0 | Now you have a bcache device: /dev/bcache0 | ||
# use "<code>bcache-status -s</code>" to see details about your bcache device. | # use "<code>bcache-status -s</code>" to see details about your bcache device. | ||
Line 20: | Line 35: | ||
# create a /home entry in your /etc/fstab: <code>LABEL=HOME /home ext4 defaults 1 2</code> | # create a /home entry in your /etc/fstab: <code>LABEL=HOME /home ext4 defaults 1 2</code> | ||
# mount /home: <code>mount -a</code> | # mount /home: <code>mount -a</code> | ||
# If | # If applicable restore the /home backup you made earlier. | ||
Now you have a system with /home on bcache. | Now you have a system with /home on bcache. | ||
# reboot your system to see if it boots OK. | # reboot your system to see if it boots OK. | ||
# | # <code>cd /home && wget http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-DVD.iso</code> | ||
|results= | |results= | ||
# All steps complete without errors | # All steps complete without errors | ||
# wget should have the same speed of all time | |||
}} | }} |
Latest revision as of 23:34, 13 October 2013
Description
This page describes a test case for bcache-tools; "/home on bcache without 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 and util-linux.
Assuming you have a fresh Fedora 20 system is running, we will "move" /home to a bcache device. To do this it's convenient to have a minimum amount of data on /home.
Prerequisites
The prerequisites for running the bcache-tools testcases can be found on this page
Setup
- Open terminal
- Switch to root user:
su -
First of all we have to make sure no traces of bcache superblocks are left on /dev/sdb1 from earlier experiments. So before installing bcache-tools do the following:
- update util-linux to the latest version (2.24 is required):
yum update util-linux
- Wipe whatever is on the /dev/sdb1 partition:
wipefs -a /dev/sdb1
- Next install bcache-tools:
yum install bcache-tools
- If needed "backup" all data in /home to another place on your root filesystem, because all data on /dev/sda2 will be destroyed in the next steps.
- comment /home out in your /etc/fstab
- unmount /home (which is on /dev/sda2)
- reboot so bcache-tools is processed well
How to test
- Erase the old /home from /dev/sda2:
wipefs -a /dev/sda2
- Make /dev/sda2 a bcache backing device:
make-bcache -B /dev/sda2
- Erase any existing metadata from /dev/sdb1:
wipefs -a /dev/sdb1
- Make /dev/sdb1 a bcache caching device:
make-bcache -C /dev/sdb1
- Retrieve the cset.uuid from your /dev/sdb1 caching device:
bcache-super-show /dev/sdb1
- Attach /dev/sdb1 to /dev/bcache0:
echo <cset.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 filesystem:
mkfs -t ext4 -L HOME /dev/bcache0
- create a /home entry in your /etc/fstab:
LABEL=HOME /home ext4 defaults 1 2
- mount /home:
mount -a
- If applicable restore the /home backup you made earlier.
Now you have a system with /home on bcache.
- reboot your system to see if it boots OK.
cd /home && wget http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-DVD.iso
Expected Results
- All steps complete without errors
- wget should have the same speed of all time