mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-30 16:49:29 +00:00
cephfs: upgrading mount syntax
Getting FsID instead of ClusterID as parameter Signed-off-by: mageekchiu <qiukang@mail.ustc.edu.cn>
This commit is contained in:
parent
21d1d640e2
commit
42b818b59e
@ -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,
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user