QA:Testcase bcache-tools home on bcache (no LVM)

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
Line 15: Line 15:
 
# Install bcache tools: <code>yum install bcache-tools</code>
 
# Install bcache tools: <code>yum install bcache-tools</code>
 
# If needed "backup" all data in /home to another place on your root filesystem:
 
# If needed "backup" all data in /home to another place on your root filesystem:
## comment /home out in your /etc/fstab
+
# comment /home out in your /etc/fstab
## unmount /home (which is on /dev/sda2)
+
# unmount /home (which is on /dev/sda2)
## Make /dev/sda2 a bcache backing device: <code>make-bcache -B /dev/sda2</code>
+
|actions=
## Make /dev/sdb1 a bcache caching device: <code>make-bcache -C /dev/sdb1</code>
+
# Make /dev/sda2 a bcache backing device: <code>make-bcache -B /dev/sda2</code>
## Note the set uuid and attach /dev/sdb1 to /dev/sda2: <code>echo <set uuid> > /sys/block/bcache0/bcache/attach</code>
+
# Make /dev/sdb1 a bcache caching device: <code>make-bcache -C /dev/sdb1</code>
 +
# Note the set uuid and attach /dev/sdb1 to /dev/sda2: <code>echo <set 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 27: Line 28:
 
# If needed restore the /home backup you made earlier.
 
# If needed 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.
|actions=
 
 
# reboot your system to see if it boots OK.
 
# reboot your system to see if it boots OK.
 
# do some other tests generation I/O on /home if you like.
 
# do some other tests generation I/O on /home if you like.

Revision as of 05:54, 12 October 2013


Contents

Description

/home on bcache (no LVM) This page describes a test case for bcache-tools, 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 and dracut.

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

  1. Open terminal
  2. Switch to root user: su -
  3. Install bcache tools: yum install bcache-tools
  4. If needed "backup" all data in /home to another place on your root filesystem:
  5. comment /home out in your /etc/fstab
  6. unmount /home (which is on /dev/sda2)

How to test

  1. Make /dev/sda2 a bcache backing device: make-bcache -B /dev/sda2
  2. Make /dev/sdb1 a bcache caching device: make-bcache -C /dev/sdb1
  3. 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

  1. use "bcache-status -s" to see details about your bcache device.
  2. create a filesystem: mkfs -t ext4 -L HOME /dev/bcache0
  3. create a /home entry in your /etc/fstab: LABEL=HOME /home ext4 defaults 1 2
  4. mount /home: mount -a
  5. If needed restore the /home backup you made earlier.

Now you have a system with /home on bcache.

  1. reboot your system to see if it boots OK.
  2. do some other tests generation I/O on /home if you like.

Expected Results

  1. All steps complete without errors