Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxd-to-incus: Add shiftfs check #311

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cmd/lxd-to-incus/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/lxc/incus/internal/linux"
"github.com/lxc/incus/internal/version"
incusAPI "github.com/lxc/incus/shared/api"
"github.com/lxc/incus/shared/util"
)

var minLXDVersion = &version.DottedVersion{4, 0, 0}
Expand Down Expand Up @@ -392,5 +393,21 @@ func (c *cmdMigrate) validate(source Source, target Target) error {
return fmt.Errorf("Source daemon running on btrfs but being moved to non-btrfs target")
}

// Shiftfs check.
if util.PathExists("/sys/module/shiftfs/") {
fmt.Println("")
fmt.Println("WARNING: The shiftfs kernel module was detected on your system.")
fmt.Println(" This may indicate that your LXD installation is using shiftfs")
fmt.Println(" to allow shifted passthrough of some disks to your instance.")
fmt.Println("")
fmt.Println(" Incus does not support shiftfs but instead relies on a recent")
fmt.Println(" feature of the Linux kernel instead, VFS idmap.")
fmt.Println("")
fmt.Println(" If your instances actively rely on shiftfs today, you may need")
fmt.Println(" to update to a more recent Linux kernel or ZFS version to keep")
fmt.Println(" using this shifted passthrough features.")
fmt.Println("")
}

return nil
}
Loading