Skip to content

Commit 1207054

Browse files
committed
chore: handle I/O error for xfs_repair
Run `xfs_repair` on `unix.EIO` error. ```text 16T18:19:30.85674118Z]: XFS (sdb5): Mounting V5 Filesystem 109.200.197.196: kern: info: [2024-04-16T18:19:30.92421418Z]: XFS (sdb5): Ending clean mount 109.200.197.196: kern: notice: [2024-04-16T18:19:36.42651618Z]: XFS (sdb6): Mounting V5 Filesystem 109.200.197.196: kern: info: [2024-04-16T18:19:36.49568918Z]: XFS (sdb6): Ending clean mount 109.200.197.196: kern: notice: [2024-04-16T18:19:36.54484918Z]: XFS (sdb6): Quotacheck needed: Please wait. 109.200.197.196: kern: notice: [2024-04-16T18:19:36.54586418Z]: XFS (sdb6): Quotacheck: Done. 109.200.197.196: kern: alert: [2024-05-13T15:13:11.99476118Z]: XFS (sdb6): log I/O error -5 109.200.197.196: kern: alert: [2024-05-13T15:13:11.99477118Z]: XFS (sdb6): Filesystem has been shut down due to log error (0x2). 109.200.197.196: kern: alert: [2024-05-13T15:13:11.99477318Z]: XFS (sdb6): Please unmount the filesystem and rectify the problem(s). ``` Signed-off-by: Noel Georgi <git@frezbo.dev>
1 parent b7afe26 commit 1207054

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/mount/mount.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func mountRetry(f RetryFunc, p *Point, isUnmount bool) (err error) {
151151
case unix.ENOENT, unix.ENODEV:
152152
// if udevd triggers BLKRRPART ioctl, partition device entry might disappear temporarily
153153
return retry.ExpectedError(err)
154-
case unix.EUCLEAN:
154+
case unix.EUCLEAN, unix.EIO:
155155
if errRepair := p.Repair(); errRepair != nil {
156156
return fmt.Errorf("error repairing: %w", errRepair)
157157
}

0 commit comments

Comments
 (0)