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

如何挂载一个已有的cephfs目录 #2746

Closed
zm274310577 opened this issue Dec 25, 2021 · 3 comments
Closed

如何挂载一个已有的cephfs目录 #2746

zm274310577 opened this issue Dec 25, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@zm274310577
Copy link

使用ceph-deploy部署的ceph,可以创建pv来挂载cephfs的中已有的某个目录,如:
apiVersion: v1
kind: PersistentVolume
metadata:
name: cephfs-pv
labels:
pv: cephfs-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
cephfs:
monitors:
- 192.168.1.10:6789
- 192.168.1.11:6789
user: admin
path: /test/path
secretRef:
name: ceph-secret
readOnly: false
persistentVolumeReclaimPolicy: Delete

只要提供monitors、path、secret可以把cephfs上的/test/path目录挂载到pod的某个路径下,如/mnt/cephfs。那么从pod的/mnt/cephfs目录读取数据,就相当于从cephfs的/test/path中读取数据。

但是在rook中,无论csi中的 rbd 还是 cephfs,都是使用storageclass创建一个新的volume进行挂载。这样就不能使用cephfs中已有的数据了。

那位大神知道在rook中怎么实现挂载cephfs中已有目录的方法。万分感谢!

@nixpanic nixpanic added the help wanted Extra attention is needed label Jan 4, 2022
@nixpanic
Copy link
Member

nixpanic commented Jan 4, 2022

Sorry, not a lot of (if any) regular contributors will be able to read your language. Could you please elaborate it a little more, preferably in English? If you are reporting a problem, please include log messages from the start of the operation until the error happens.

@elrondwong
Copy link

elrondwong commented Jan 10, 2022

这个issue应该可以解决你的问题 #1119
参照cephfs-static-pvc

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jan 11, 2022

Closing this one. please feel free to open/update the issue with the template in English. and the above static PV is not as per the doc https://github.com/ceph/ceph-csi/blob/devel/docs/static-pvc.md#create-cephfs-static-pv.

@Madhu-1 Madhu-1 closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants