From Fedora Project Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=This test case ensures that disk drive(s) are properly dismounted during a shut-down or a restart.
|description=This test case ensures that disk drive(s) are properly unmounted during a shut-down or a restart.
|setup=
|setup=
# Install the pre-released version of Fedora to be tested on bare metal using the default Anaconda disk settings except to delete all and reclaim all disk space.
# Install the pre-released version of Fedora to be tested on a bare metal system.
# Reboot the system to the hard drive after the install.
# Reboot the system to the hard drive after the install.
{{admon/warning| Be sure to reclaim all disk space.}}
{{admon/warning| Be sure to use a Bare Metal.}}


|actions=
|actions=
# 1. On the running system, change to a virtual console by pressing Ctrl+Alt+F2
# 1. On the running system, Switch to a free virtual console using Ctrl+Alt+F<n> shortcut and log in.
      Result: A virtual console appears with a login prompt.
# 2. At the command prompt, issue the following command: journalctl -b /usr/lib/systemd/systemd-fsck
# 2. At the virtual console, login as the root user
# 3. Review the journal output
      Result: Login accepted
 
# 3. Halt the system by running the command: “halt”
      Result: The `halt` is accepted and halts the system.  The screen is left powered on, showing the final shutdown messages.  No system filesystem / LVM device is left mounted / active when the system finally halts.  In some cases you might see a number of retries. This is okay as long as the last retry is successful.
# 4. Read the on-screen messages.
      Result: Check for messages indicating failures. Things like “journal recovery” are a problem.
# 5. You now need to manually re-boot the system. On most hardware (which complies with ACPI), you can manually power off by holding the power button down for five seconds. Then press the power button to power on again.
# 5. You now need to manually re-boot the system. On most hardware (which complies with ACPI), you can manually power off by holding the power button down for five seconds. Then press the power button to power on again.
       Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error. All expected disk partitions are cleanly mounted. Check boot logs to see that they do not show any”fsck” (filesystem repair) operations, or “recovering journal” (ext3/4 journal recovery.  The boot logs only need to be checked after one shutdown - reboot cycle. The logs can be checked using the command “journalctl -b /usr/lib/systemd/systemd-fsck”. A result similar to the following indicates clean mounting:
       Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error. All expected disk partitions are cleanly mounted. Check boot logs to see that they do not show any”fsck” (filesystem repair) operations, or “recovering journal” (ext3/4 journal recovery.  The boot logs only need to be checked after one shutdown - reboot cycle. The logs can be checked using the command “journalctl -b /usr/lib/systemd/systemd-fsck”. A result similar to the following indicates clean mounting:
Line 37: Line 33:
       Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error, and all expected disk partitions are cleanly mounted.
       Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error, and all expected disk partitions are cleanly mounted.
|results=
|results=
# All above steps should run without error
# 1. Good Result example: "Logs begin at Mon 2018-11-19 13:52:18 EST, end at Sat 2019-01-12 12:27:48 ES>
Jan 12 08:37:25 localhost.localdomain systemd-fsck[503]: /dev/mapper/fedora-roo>
Jan 12 08:37:36 localhost.localdomain systemd-fsck[745]: /dev/mapper/fedora-hom>
Jan 12 08:37:36 localhost.localdomain systemd-fsck[743]: /dev/sda1: clean, 412/>
# 2. Bad result example: -- Logs begin at Tue 2019-08-27 09:26:40 CEST, end at Tue 2019-11-26
14:50:14 CET. --
Nov 25 10:25:20 phoenix systemd-fsck[684]: root: recovering journal
Nov 25 10:25:20 phoenix systemd-fsck[684]: root: Clearing orphaned inode
12325283 (uid=1000, gid=1000, mode=0100644, size=641092)
Nov 25 10:25:20 phoenix systemd-fsck[684]: root: Clearing orphaned inode
12331101 (uid=1000, gid=1000, mode=0100644, size=641092)
..
Nov 25 10:25:20 phoenix systemd-fsck[684]: root: clean, 1023215/26869760
files, 46957728/107451392 blocks
Nov 25 09:25:22 phoenix systemd-fsck[877]: boot: recovering journal
Nov 25 09:25:22 phoenix systemd-fsck[878]: fsck.fat 4.1 (2017-01-24)
Nov 25 09:25:22 phoenix systemd-fsck[878]: 0x25: Dirty bit is set. Fs was
not properly unmounted and some data may be corrupt.
Nov 25 09:25:22 phoenix systemd-fsck[878]:  Automatically removing dirty
bit.
Nov 25 09:25:22 phoenix systemd-fsck[878]: Performing changes.
Nov 25 09:25:22 phoenix systemd-fsck[878]: /dev/nvme0n1p1: 34 files,
6897/51145 clusters
Nov 25 09:25:22 phoenix systemd-fsck[877]: boot: clean, 103/65536 files,
67833/262144 blocks
 
#  
#  
}}
}}

Revision as of 15:22, 27 November 2019

Description

This test case ensures that disk drive(s) are properly unmounted during a shut-down or a restart.

Setup

  1. Install the pre-released version of Fedora to be tested on a bare metal system.
  2. Reboot the system to the hard drive after the install.
Warning.png
Be sure to use a Bare Metal.

How to test

  1. 1. On the running system, Switch to a free virtual console using Ctrl+Alt+F<n> shortcut and log in.
  2. 2. At the command prompt, issue the following command: journalctl -b /usr/lib/systemd/systemd-fsck
  3. 3. Review the journal output
  1. 5. You now need to manually re-boot the system. On most hardware (which complies with ACPI), you can manually power off by holding the power button down for five seconds. Then press the power button to power on again.
      Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error. All expected disk partitions are cleanly mounted. Check boot logs to see that they do not show any”fsck” (filesystem repair) operations, or “recovering journal” (ext3/4 journal recovery.  The boot logs only need to be checked after one shutdown - reboot cycle. The logs can be checked using the command “journalctl -b /usr/lib/systemd/systemd-fsck”. A result similar to the following indicates clean mounting:

“Example: -- Logs begin at Mon 2018-11-19 13:52:18 EST, end at Sat 2019-01-12 12:27:48 ES> Jan 12 08:37:25 localhost.localdomain systemd-fsck[503]: /dev/mapper/fedora-roo> Jan 12 08:37:36 localhost.localdomain systemd-fsck[745]: /dev/mapper/fedora-hom> Jan 12 08:37:36 localhost.localdomain systemd-fsck[743]: /dev/sda1: clean, 412/>”

  1. 6. After the system boots, again change to a virtual console by pressing Ctrl+Alt+F2.
      Result: Virtual console appears
  1. 7. At the virtual console, login as the root user
      Result: Login successful
  1. 8. Reboot the system by running the command: “reboot”
      Result: The reboot is accepted and initiates a system reboot. The system reboots with no additional user interaction. Note: Manually booting the system may be required if the previous step fails.
  1. 9. After the system boots, once again change to a virtual console by pressing Ctrl+Alt+F2.
      Result: Virtual console appears.
  1. 10. At the virtual console, login as a non-root user. If no non-root user accounts are available, you can create a new user account as follows: Login as the root user and use the command: “useradd” to add a non-root user. Logout of root and login as the new non-root user.
      Result: User creation successful if used. Non-root login successful.
  1. 12. Power off the system by running the shutdown command. Consult the man page for different acceptable [TIME] values. For example, to power off the system immediately, type the following command: “shutdown now”
      Result: The shutdown is accepted and powers off the system without error.
  1. 13. Lastly, power on the system. Check that it boots successfully.
      Result: When the system boots, either after a halt, reboot or shutdown operation, the system successfully boots without error, and all expected disk partitions are cleanly mounted.

Expected Results

  1. 1. Good Result example: "Logs begin at Mon 2018-11-19 13:52:18 EST, end at Sat 2019-01-12 12:27:48 ES>

Jan 12 08:37:25 localhost.localdomain systemd-fsck[503]: /dev/mapper/fedora-roo> Jan 12 08:37:36 localhost.localdomain systemd-fsck[745]: /dev/mapper/fedora-hom> Jan 12 08:37:36 localhost.localdomain systemd-fsck[743]: /dev/sda1: clean, 412/>

  1. 2. Bad result example: -- Logs begin at Tue 2019-08-27 09:26:40 CEST, end at Tue 2019-11-26

14:50:14 CET. -- Nov 25 10:25:20 phoenix systemd-fsck[684]: root: recovering journal Nov 25 10:25:20 phoenix systemd-fsck[684]: root: Clearing orphaned inode 12325283 (uid=1000, gid=1000, mode=0100644, size=641092) Nov 25 10:25:20 phoenix systemd-fsck[684]: root: Clearing orphaned inode 12331101 (uid=1000, gid=1000, mode=0100644, size=641092) .. Nov 25 10:25:20 phoenix systemd-fsck[684]: root: clean, 1023215/26869760 files, 46957728/107451392 blocks Nov 25 09:25:22 phoenix systemd-fsck[877]: boot: recovering journal Nov 25 09:25:22 phoenix systemd-fsck[878]: fsck.fat 4.1 (2017-01-24) Nov 25 09:25:22 phoenix systemd-fsck[878]: 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Nov 25 09:25:22 phoenix systemd-fsck[878]: Automatically removing dirty bit. Nov 25 09:25:22 phoenix systemd-fsck[878]: Performing changes. Nov 25 09:25:22 phoenix systemd-fsck[878]: /dev/nvme0n1p1: 34 files, 6897/51145 clusters Nov 25 09:25:22 phoenix systemd-fsck[877]: boot: clean, 103/65536 files, 67833/262144 blocks