From 0ef43c57b038ff3808f5b513543b74b1c94b2102 Mon Sep 17 00:00:00 2001 From: freeze <1615081+Vicente-Cheng@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:27:31 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jillian --- kb/2023-02-01/scan_and_repair_filesystem.md | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/kb/2023-02-01/scan_and_repair_filesystem.md b/kb/2023-02-01/scan_and_repair_filesystem.md index 4e27723b..ba6b59ab 100644 --- a/kb/2023-02-01/scan_and_repair_filesystem.md +++ b/kb/2023-02-01/scan_and_repair_filesystem.md @@ -65,19 +65,19 @@ This section will introduce how to scan the filesystem (e.g., XFS, EXT4) using r Before scanning, you need to know the filesystem's device/partition. -- Find the filesystem's device with the following instruction by checking the `Major:Minor` for the specific device. +- Identify the filesystem's device by checking the major and minor numbers of that device. - 1. Try to specify the volume named `pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58`. - ``` - // find the `Major:Minor` for it +1. Obtain the major and minor numbers from the listed volume information. + + In the following example, the volume name is `pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58`. + BACKTICKS harvester-node-0:~ # ls /dev/longhorn/pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58 -al brw-rw---- 1 root root 8, 0 Oct 23 14:43 /dev/longhorn/pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58 + BACKTICKS + The output indicates that the major and minor numbers are `8:0`. - // `Major:Minor` is `8:0` from the above output - ``` - - 2. Check the `lsblk` output to find the related device. - ``` +2. Obtain the device name from the output of the `lsblk` command. + BACKTICKS harvester-node-0:~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 3G 1 loop / @@ -85,9 +85,8 @@ Before scanning, you need to know the filesystem's device/partition. ├─sda1 8:1 0 2M 0 part ├─sda2 8:2 0 20M 0 part └─sda3 8:3 0 40G 0 part - - // You could see the `MAJ:MIN` is `8:0` for the device `sda`. So the /dev/sda is the related volume `pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58`. - ``` + BACKTICKS + The output indicates that `8:0` are the major and minor numbers of the device named `sda`. Therefore, `/dev/sda` is related to the volume named `pvc-ea7536c0-301f-479e-b2a2-e40ddc864b58`. - You should now know the filesystem's partition. In the example below, sda3 is the filesystem's partition. - Use the Filesystem toolbox image to scan and repair. @@ -100,8 +99,9 @@ Then we try to scan with this target device. ### XFS -When scanning a XFS filesystem, use the `xfs_repair` command as follows, where `/dev/sda3` is the problematic partition of the device. +When scanning an XFS filesystem, use the `xfs_repair` command and specify the problematic partition of the device. +In the following example, `/dev/sda3` is the problematic partition. ``` # xfs_repair -n /dev/sda3 ```