Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize File sharing based on ceph-rbd

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to achieve ceph-rbd-based file sharing, the article is very detailed, has a certain reference value, interested friends must read it!

Ceph rbd can provide block devices for hosts, and we can implement a set of simple file sharing services by using block devices.

Dependent environment

1. First of all, the ceph client host kernel supports rados block driver. If not, please refer to the Linux kernel of ceph-rbd environment configuration (1). two。 Check to see if the client host already supports NFS.

# rpm-qa | grep nfs

3. Install NFS

# yum-y install nfs-utils rpcbind# yum install nfs-utilsceph-clinet create rbd block device # rados mkpool shareimage/ / create a separately shared pool# rbd create shareimage/share1-- size 10240 # rbd map shareimage/share1# rbd showmapped# mkfs.ext4-M0 / dev/rbd/shareimage/share1 # mkdir / mnt/nfs-share# mount-t ext4 / dev/rbd/shareimage/share1 / mnt/nfs-shareNFS server-side configuration # vim / etc/exports / mnt/nfs-share 10.20.room.* (rw No_root_squash,no_all_squash,sync)

Configuration file description: / mnt is the shared directory, that is, the directory where rbd is mounted, using an absolute path. 10.20.permission. * the IP that the client is allowed to access, () is the permission control.

Start NFS service # service rpcbind start# service nfs start client mount (any host with network segment 10.20.room.*) # mkdir / mnt/remote-share# showmount-e 10.20.16.177 / / 10.20.16.177:nfs-server ip# mount-t nfs / mnt/nfs-share / mnt/remote-share

Multiple hosts can be successfully mounted to test file sharing.

The above is all the contents of the article "how to achieve ceph-rbd-based file sharing". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report