mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-27 06:21:11 +01:00
This implements the first round of changes, replacing the volume backend with the new implementation, while keeping most of the external interfaces intact. See #8367 Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
25 lines
650 B
Go
25 lines
650 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package mount
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/siderolabs/talos/pkg/makefs"
|
|
)
|
|
|
|
// repair a filesystem.
|
|
func (p *Point) repair(printerOptions PrinterOptions) error {
|
|
printerOptions.Printf("filesystem on %s needs cleaning, running repair", p.source)
|
|
|
|
if err := makefs.XFSRepair(p.source, p.fstype); err != nil {
|
|
return fmt.Errorf("xfs_repair: %w", err)
|
|
}
|
|
|
|
printerOptions.Printf("filesystem successfully repaired on %s", p.source)
|
|
|
|
return nil
|
|
}
|