From Fedora Project Wiki

(Fix testday app-generated results to use {{result}} template for bug references)
(34 intermediate revisions by 6 users not shown)
Line 9: Line 9:
| fedora_mailing_list = test
| fedora_mailing_list = test
}}
}}
{{admon/warning | In construction | The Test Day page is yet in construction. It will be ready for the Test Day - when this message is removed :) .}}


{{admon/note | Can't make the date? | If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at [http://bugzilla.redhat.com Bugzilla], and add your results to the results section. If this page is more than a month old when you arrive here, please check the [[QA/Test_Days|current schedule]] and see if a similar but more recent Test Day is planned or has already happened.}}
{{admon/note | Can't make the date? | If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at [http://bugzilla.redhat.com Bugzilla], and add your results to the results section. If this page is more than a month old when you arrive here, please check the [[QA/Test_Days|current schedule]] and see if a similar but more recent Test Day is planned or has already happened.}}
Line 16: Line 14:
== What to test? ==
== What to test? ==


Today's instalment of Fedora Test Day will focus on bcache based SSD Caching in Fedora 20. Although dm-cache is another SSD caching implementation, today we'll only focus on the bcache implementation.
Today's instalment of Fedora Test Day will focus on SSD Caching in Fedora 20, specifically bcache. SSD Caching allows you to speedup your disk access by combining your slow HDD with a fast SSD. The SSD will be used to store copies of frequently accessed blocks on your HDD, so you'll experience a good performance while also having the large storage capacity of your HDD.
 
Although dm-cache is another SSD caching implementation, today we'll only focus on the bcache implementation.


=== General test objective ===
=== General test objective ===
Line 44: Line 44:
* Quality Assurance - [[User:ignatenkobrain|Igor Gnatenko]] (ignatenkobrain), [[User:rolffokkens|Rolf Fokkens]] (rolffokkens)
* Quality Assurance - [[User:ignatenkobrain|Igor Gnatenko]] (ignatenkobrain), [[User:rolffokkens|Rolf Fokkens]] (rolffokkens)


== Prerequisite for the Test Day ==  
== External documentation ==
You can find some relevant documentation at bcache.evilpiepirate.org[[http://bcache.evilpiepirate.org/]].
 
== Prerequisites for the Test Day ==  


=== Limitations ===
=== Limitations ===
Line 64: Line 67:
   * internet connection
   * internet connection


* bootable media containg Rawhide/F20 (?) netinst (?) image.
* bootable media containg (one of):
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-DVD.iso Fedora 20 Beta TC2 x86_64 DVD]
 
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-i386-DVD.iso Fedora 20 Beta TC2 i386 DVD]
 
Because doing updates (particularly the kernel) is part of the test, it's best not to install latest and greatest.
 
=== Disk partitioning ===
To prepare for the test cases, it is important to use the following partitioning:
 
  sda:
  sda1 500MB  /boot
  sda2 2GB    /home
  sda3 2GB    /
  sda4 (>4G) free space (only used when testing in combination with LVM)
 
  sdb:
  sdb1 >2GB  (caching device)
 
sda is (or models) the rotational disk device, sdb is (or models) the solid state disk device. It would be best to have sdb (on) a true SSD, but if you don't have an SSD then an ordinary disk will do as well for the testing (except for performance testing)
 
When using a VM sda may and sdb may be read as vda and vdb.
 
=== SElinux ===
Please disable SElinux. There's some copying involved in the testcases, and SElinux may break the testcases when the copied data is not accessible.
 
To disable SElinux you should edit your /etc/selinux/config and set SELINUX=permissive instead of SELINUX=enforcing.


=== Other requirements ===
=== Other requirements ===
Line 70: Line 99:
* Knowledge on how to use the Linux command line (There's no graphical installer yet)
* Knowledge on how to use the Linux command line (There's no graphical installer yet)
* A desire to break software
* A desire to break software
=== Further reading ===
Here's a chunk which is commonly used for most Test Days. Replace XX with whatever Fedora release is pending:
* An updated [http://fedoraproject.org/get-prerelease Fedora 20 pre-release], [[Releases/Rawhide|Rawhide]] (tips on installing Rawhide below), or a [http://alt.fedoraproject.org/pub/alt/nightly-composes/desktop/ nightly live image]


== How to test? ==
== How to test? ==
Line 94: Line 117:
* it allows to install other packages later (yum groupinstall) as part of the test activities.
* it allows to install other packages later (yum groupinstall) as part of the test activities.


Both the partitioning and the installation of Fedora can be done by any of the iso's in https://dl.fedoraproject.org/pub/alt/stage/, e.g. Fedora-20-Alpha-x86_64-netinst.iso.
Use bootable media containg
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-DVD.iso Fedora 20 Beta TC2 x86_64 DVD]
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-i386-DVD.iso Fedora 20 Beta TC2 i386 DVD]
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-netinst.iso Fedora 20 Beta TC2 x86_64 netinstall]
[http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC2/Fedora/x86_64/iso/Fedora-20-Beta-TC2-x86_64-netinst.iso Fedora 20 Beta TC2 i386 netinstall] to install Fedora 20. This does not contain the most recent packages, so lateron <code>yum update</code> can be used as a test.


== Test Cases ==
== Test Cases ==
Line 105: Line 132:


=== Test case 1.B: / on bcache (no LVM) ===
=== Test case 1.B: / on bcache (no LVM) ===
Now we have a stable system with /home on bcache, we can go forward and have / on bcache without using LVM.


==== step 1: / on bcache with fallback  ====
Step by step instructions are available on [[QA:Testcase_bcache-tools_root_on_bcache_(no_LVM)|this page]].
Now we have a stable system with /home on bcache, we can go forward and have / on bcache. Consider thought that bcache is EXPERIMENTAL!
 
To get / on bcache we'll stop using /home on bcache first:
* if needed make a bachup of /home on your root filesystem.
* comment /home out in your /etc/fstab
* umount /home
* if needed restore your bachup to the /home directory
 
Now your /home is in your root filesystem. Next:
* create a new filesystem on /dev/bcache0: mkfs -t ext4 -L ROOTFS /dev/bcache0
* mount it: mount /dev/bcache0 /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/bcache0. 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
* 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 2: / on bcache no fallback ====
 
Now your system boots fine you can drop the fallback root filesystem. Consider though that bcache is EXPERIMENTAL and a fallback may be important.


=== 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! Do the following steps:
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!
 
* 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
Step by step instructions are available on [[QA:Testcase_bcache-tools_home_on_bcache_(LVM)|this page]]
* 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???
=== Test case 2.B: / on bcache (LVM) ===


Now you have a system with /home on LVM2 on bcache.
Now we have a stable system with /home on LVM on bcache, we can go forward and have / on bcache.
* reboot your system to see if it boots OK.
* do some other testing if you like.
 
=== Test case 2.B: / on bcache (no LVM) ===
 
==== 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 ==
Line 206: Line 153:
! User
! User
! IRC nickname
! IRC nickname
|-
| Kent Overstreet
| py1hon
|-
|-
| [[User:ignatenkobrain|Igor Gnatenko]]
| [[User:ignatenkobrain|Igor Gnatenko]]
Line 217: Line 167:
== Test Results ==
== Test Results ==


Construct a table or list to allow testers to post results. Each column should be a test case or configuration, and each row should consist of test results. Include some instructions on how to report bugs, and any special instructions. Here's an example, from a Palimpsest test day:
<!-- metadata: https://fedoraproject.org/wiki/User:Jskladan/Sandbox:F20SSDCacheTestday
    To update the results tool, put the metadata url in the following form and submit: http://testdays.qa.fedoraproject.org/testdays/admin/update_testday
 
'''We are tracking test results in a web application [http://testdays.qa.fedoraproject.org/testdays/show_event?event_id=8 over here]'''
 
Results from this web application will be automatically transferred to the Wiki a week after the test day, and the reporting system will be shutdown. Feel free to continue testing and filling the wiki even after this date.
 
Should you encounter any problem while using the web application, please contact jskladan on #fedora-qa channel at freenode, or send an email to jskladan@fedoraproject.org
-->
 


If you have problems with any of the tests, report a bug to [https://bugzilla.redhat.com Bugzilla] usually for the component [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=13&component=bcache-tools bcache-tools]. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you. Once you have completed the tests, add your results to the Results table below, following the example results from the first line as a template. The first column should be your name with a link to your User page in the Wiki if you have one. For each test case, use the [[Template:result|result template]] to enter your result, as shown in the example result line.
If you have problems with any of the tests, report a bug to [https://bugzilla.redhat.com Bugzilla] usually for the component [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=13&component=bcache-tools bcache-tools]. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you. Once you have completed the tests, add your results to the Results table below, following the example results from the first line as a template. The first column should be your name with a link to your User page in the Wiki if you have one. For each test case, use the [[Template:result|result template]] to enter your result, as shown in the example result line.
Line 229: Line 188:
! References
! References
|-
|-
| [[User:SampleUser|Sample User]]
| [[User:werkman|werkman]]
| {{result|none}}  
| {{result|pass}}
| {{result|pass}}
| {{result|none}}
| {{result|warn}} <ref>Test pass, but also encountered {{bz|54321}}</ref>
| {{result|none}}
| {{result|fail}} <ref>{{bz|12345}}</ref>
| {{result|none}}
| <references/>
|-
| [[User:ambush|PAVLEG]]
| {{result|warn}}<ref>Test pass, but nothing works. {{bz|1018615}}</ref>
| {{result|none}}
| {{result|none}}
| {{result|none}}
| <references/>
|-
| [[User:roshi|roshi]]
| {{result|warn||1018615}}
| {{result|warn}} <ref>Hit this bug with wget {{bz|1018615}}</ref>
| {{result|none}}
| {{result|none}}
| <references/>
|-
|}
 
=== Mock tests (optional) ===
 
{|
! User
! [[QA:Testcase_bcache-tools_mock_on_bcache_(no_LVM)|mock on bcache (no LVM)]]
! References
|-
| [[User:Sampleuser|Sample User]]
| {{result|inprogress}}
| <references/>
| <references/>
|-
|-
|}
|}


[[Category:Test Days]] [[Category:Fedora 20 Test Days]]
[[Category:Test Days]] [[Category:Fedora 20 Test Days]]

Revision as of 23:01, 25 December 2014

Fedora Test Days
Echo-testing-48px.png
SSD Cache

Date 2013-10-13
Time all day

Website QA/Fedora_20_test_days
IRC #fedora-test-day (webirc)
Mailing list test


Note.png
Can't make the date?
If you come to this page before or after the test day is completed, your testing is still valuable, and you can use the information on this page to test, file any bugs you find at Bugzilla, and add your results to the results section. If this page is more than a month old when you arrive here, please check the current schedule and see if a similar but more recent Test Day is planned or has already happened.

What to test?

Today's instalment of Fedora Test Day will focus on SSD Caching in Fedora 20, specifically bcache. SSD Caching allows you to speedup your disk access by combining your slow HDD with a fast SSD. The SSD will be used to store copies of frequently accessed blocks on your HDD, so you'll experience a good performance while also having the large storage capacity of your HDD.

Although dm-cache is another SSD caching implementation, today we'll only focus on the bcache implementation.

General test objective

The objective of this Test day is to demonstrate a working Fedora 20 system using bcache. Te be more specific:

  • The system boots OK; after booting bcache is operating as expected
  • The system updates ("yum update") OK. After updating specifically the kernel the system boots OK.
  • The system is bootable when the caching device is disabled.

Scope

The bcache implementation of SSD caching is a new feature (since kernel 3.9) and should be considered experimental. The focus of this Test day is to evaluate the alignment of bcache-tools with other relevant Fedora packages to support a good basis for experimenting with SSD caching:

  • bcache-tools (version 0-0.14.20130909git or later)
  • util-linux (version 2.24-0.1 or later)
  • dracut (version 034 or later)
  • lvm2 (version 2.02.102-1 or later)
  • kernel (version 3.9 or later)

Anaconda support for bcache is expected to be available not until Fedora 21, so this is not in scope for the test day.

In general issues related to the bcache kernel driver are not in scope; SSD caching is not production yet so they should be addressed in the regular development process. This includes performance related issues. Only when the Test day demonstrates a unworkable situation, issues related to the bcache driver in the kernel are in scope on the Test day.

Who's available

The following cast of characters will be available testing, workarounds, bug fixes, and general discussion ...

External documentation

You can find some relevant documentation at bcache.evilpiepirate.org[[1]].

Prerequisites for the Test Day

Limitations

There's no "easy way" yet to convert an existing filesystem to a bcache based filesystem: bcache is an additional block layer that writes its own superblock on the underlying block devices. There is a blocks [[2]] tool under development, but for now the only solution is to backup your data some where, recreate your filesystem on a bcache device, and then restore the data.

Another limitation is the fact that bcache is EXPERIMENTAL. Although it works really well in general, you should be careful to store important data on it.

Physical or Virtual

Although performance (of course) is a very important aspect of SSD caching, testing it is not required on the test day. Because of this testing can be done both on physical and virtual hardware, on a true SSD or a HDD. There is however a slight preference to do the testing on real hardware, with a real SSD.

Whenever the terms HDD or SDD are used below, they can be both physical and virtual. The same is true for the terms "system", "CPU", "RAM`and "bootable media".

Hardware & Software requirements

  • A fresh system:
 * 10GB+ HDD
 * 2GB+ SSD
 * 256MB+ RAM
 * x86 CPU (32bit or 64bit)
 * internet connection
  • bootable media containg (one of):

Fedora 20 Beta TC2 x86_64 DVD

Fedora 20 Beta TC2 i386 DVD

Because doing updates (particularly the kernel) is part of the test, it's best not to install latest and greatest.

Disk partitioning

To prepare for the test cases, it is important to use the following partitioning:

 sda:
 sda1 500MB  /boot
 sda2 2GB    /home
 sda3 2GB    /
 sda4 (>4G)  free space (only used when testing in combination with LVM)
 
 sdb:
 sdb1 >2GB   (caching device)

sda is (or models) the rotational disk device, sdb is (or models) the solid state disk device. It would be best to have sdb (on) a true SSD, but if you don't have an SSD then an ordinary disk will do as well for the testing (except for performance testing)

When using a VM sda may and sdb may be read as vda and vdb.

SElinux

Please disable SElinux. There's some copying involved in the testcases, and SElinux may break the testcases when the copied data is not accessible.

To disable SElinux you should edit your /etc/selinux/config and set SELINUX=permissive instead of SELINUX=enforcing.

Other requirements

  • Knowledge on how to build physical or virtual machines
  • Knowledge on how to use the Linux command line (There's no graphical installer yet)
  • A desire to break software

How to test?

Because Anaconda does not support bcache yet, the test may be executed following certain steps: preparation and test case 1 to test case 3. The end result will be a F20 system running its root filesystem on bcache. These steps are merely suggestions, to allow testing in limited time. Of course testers are free to choose other ways of testing. As a suggestion, testers can focus on the following criteria:

  • Do the tools to create / manage bcache operate as expected?
  • Are your 'bcached' filesystems automatically operational after a reboot?
  • Are your 'bcached' filesystems automatically operational after a kernel update?

Each demonstrates the proper allignment of dracut, util-linux, lvm2 (when used), bcache-tools and the kernel.

Preparation: install F20

The first step is to do a minimal install:

  • this is the fastest install
  • it also saves time when copying the root filesystem during later test cases
  • it allows to install other packages later (yum groupinstall) as part of the test activities.

Use bootable media containg Fedora 20 Beta TC2 x86_64 DVD Fedora 20 Beta TC2 i386 DVD Fedora 20 Beta TC2 x86_64 netinstall Fedora 20 Beta TC2 i386 netinstall to install Fedora 20. This does not contain the most recent packages, so lateron yum update can be used as a test.

Test Cases

Test case 1.A: /home on bcache (no LVM)

Once your fresh Fedora 20 system is running, we will "move" /home to a bcache device without using LVM.

Step by step instructions are available on this page

Test case 1.B: / on bcache (no LVM)

Now we have a stable system with /home on bcache, we can go forward and have / on bcache without using LVM.

Step by step instructions are available on this page.

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!

Step by step instructions are available on this page

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 by step instructions are available on this page

Participants

User IRC nickname
Kent Overstreet py1hon
Igor Gnatenko ignatenkobrain
Rolf Fokkens rolffokkens

Test Results

If you have problems with any of the tests, report a bug to Bugzilla usually for the component bcache-tools. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you. Once you have completed the tests, add your results to the Results table below, following the example results from the first line as a template. The first column should be your name with a link to your User page in the Wiki if you have one. For each test case, use the result template to enter your result, as shown in the example result line.

User /home on bcache (no LVM) / on bcache (no LVM) /home on bcache (LVM) / on bcache (LVM) References
werkman
Pass pass
none
none
none
PAVLEG
Warning warn
[1]
none
none
none
  1. Test pass, but nothing works. RHBZ #1018615
roshi
Warning warn [1]
Warning warn
[2]
none
none
  1. RHBZ #1018615
  2. Hit this bug with wget RHBZ #1018615

Mock tests (optional)

User mock on bcache (no LVM) References
Sample User
Inprogress inprogress