diff --git a/internal/cephfs/mounter/kernel.go b/internal/cephfs/mounter/kernel.go index 192e880c0..c7d90e382 100644 --- a/internal/cephfs/mounter/kernel.go +++ b/internal/cephfs/mounter/kernel.go @@ -74,7 +74,7 @@ func (m *kernelMounter) mountKernel( args := []string{ "-t", "ceph", - fmt.Sprintf("%s@%s.%s=%s", cr.ID, volOptions.ClusterID, volOptions.FsName, volOptions.RootPath), + fmt.Sprintf("%s@%s.%s=%s", cr.ID, volOptions.FsID, volOptions.FsName, volOptions.RootPath), mountPoint, } diff --git a/internal/cephfs/store/volumeoptions.go b/internal/cephfs/store/volumeoptions.go index 285b15ffc..883127a5e 100644 --- a/internal/cephfs/store/volumeoptions.go +++ b/internal/cephfs/store/volumeoptions.go @@ -46,6 +46,7 @@ type VolumeOptions struct { RequestName string NamePrefix string ClusterID string + FsID string MetadataPool string // ReservedID represents the ID reserved for a subvolume ReservedID string @@ -318,6 +319,11 @@ func NewVolumeOptions( return nil, err } + opts.FsID, err = opts.conn.GetFSID() + if err != nil { + return nil, err + } + opts.MetadataPool, err = fs.GetMetadataPool(ctx, opts.FsName) if err != nil { return nil, err @@ -442,6 +448,11 @@ func NewVolumeOptionsFromVolID( return nil, nil, err } + volOptions.FsID, err = volOptions.conn.GetFSID() + if err != nil { + return nil, nil, err + } + volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName) if err != nil { return nil, nil, err @@ -826,6 +837,11 @@ func NewSnapshotOptionsFromID( return &volOptions, nil, &sid, err } + volOptions.FsID, err = volOptions.conn.GetFSID() + if err != nil { + return &volOptions, nil, &sid, err + } + volOptions.MetadataPool, err = fs.GetMetadataPool(ctx, volOptions.FsName) if err != nil { return &volOptions, nil, &sid, err