Skip to content

Commit

Permalink
Merge pull request canonical#3325 from brauner/2017-05-16/handle_migr…
Browse files Browse the repository at this point in the history
…ation_on_btrfs_between_different_lxd_versions

storage: handle btrfs migration on different lxds
  • Loading branch information
stgraber authored May 16, 2017
2 parents 36c02d7 + af09d58 commit 0bed938
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lxd/storage_btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,10 @@ func (s *storageBtrfs) MigrationSink(live bool, container container, snapshots [
}

receivedSnapshot := fmt.Sprintf("%s/.migration-send", btrfsPath)
// handle older lxd versions
if !shared.PathExists(receivedSnapshot) {
receivedSnapshot = fmt.Sprintf("%s/.root", btrfsPath)
}
if isSnapshot {
receivedSnapshot = fmt.Sprintf("%s/%s", btrfsPath, snapName)
err = s.btrfsPoolVolumesSnapshot(receivedSnapshot, targetPath, true)
Expand Down

0 comments on commit 0bed938

Please sign in to comment.