Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jillian <[email protected]>
  • Loading branch information
Vicente-Cheng and jillian-maroket authored Oct 28, 2023
1 parent 33eba5a commit 0ef43c5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions kb/2023-02-01/scan_and_repair_filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,28 @@ 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 /
sda 8:0 0 40G 0 disk
├─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.
Expand All @@ -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
```
Expand Down

0 comments on commit 0ef43c5

Please sign in to comment.