In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use ceph rbd to configure nfs, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Configure nfs with ceph rbd
A simple and practical storage method, which is as follows:
# install nfs rpm [root@osd1 current] # yum install nfs-utils rpcbindLoaded plugins: fastestmirror, priorities, refresh-packagekit SecurityLoading mirror speeds from cached hostfileepel/metalink | 5.5kB 00:00 * base: mirrors.cug.edu.cn * epel: mirrors.yun-idc.com * extras: mirrors.btte.net * rpmforge: ftp.riken.jp * updates: mirrors.btte.netCeph | | 951B 00:00 Ceph-noarch | 951B 00:00 base | | | 3.7 kB 00:00 ceph-source | 951B | 00:00 epel | 4.4 kB 00:00 epel/primary_db | | 6.3 MB 00:01 extras | 3.4 kB 00:00 rpmforge | | | 1.9 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | | | 188 kB 00:00 69 packages excluded due to repository priority protectionsSetting up Install ProcessPackage rpcbind-0.2.0-11.el6.x86_64 already installed and latest versionResolving Dependencies-- > Running transaction check--- > Package nfs-utils.x86_64 1buret 1.2.3-39.el6 will be updated--- > Package nfs-utils.x86_64 1purl 1.2.3-54.el6 will be an | Update-- > Finished Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Updating: nfs-utils x86'64 1purl 1.2.3-54.el6 base 326 kTransaction Summary=Upgrade 1 Package (s) Total download size: 326 kIs this ok [y yDownloading Packages:nfs-utils-1.2.3 N]: yDownloading Packages:nfs-utils-1.2.3-54.el6.x86_64.rpm | 326 kB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Updating: 1:nfs-utils-1 .2.3-54.el6.x86_64 1 Cleanup 2 Cleanup: 1:nfs-utils-1.2.3-39.el6.x86_64 2 Verifying: 1:nfs-utils-1.2.3-54.el6.x86_64 1 Verifying: 1:nfs-utils-1.2.3-39.el6.x86_64 2 Updated: nfs-utils.x86_64 1 Updated 1.2.3-54.el6 # create a block and format, Mount [root@osd1 current] # rbd create myrbd/nfs_image-s 1024000-- image-format=2 [root@osd1 current] # rbd map myrbd/nfs_image/dev/ rbd0 [root @ osd1 current] # mkdir / mnt/nfs [root@osd1 current] # mkfs.xfs / dev/rbd0log stripe unit (4194304 bytes) is too large (maximum is 256KiB) log stripe unit adjusted to 32KiBmeta-data=/dev/rbd0 isize=256 agcount=33 Agsize=8190976 blks = sectsz=512 attr=2, projid32bit=0data = bsize=4096 blocks=262144000, imaxpct=25 = sunit=1024 swidth=1024 blksnaming = version 2 bsize=4096 ascii-ci=0log = internal log bsize=4096 blocks=128000, version=2 = sectsz=512 sunit=8 blks, lazy-count=1realtime = none extsz=4096 blocks=0 Rtextents=0 [root@osd1 current] # mount / dev/rbd0-o rw,noexec,nodev,noatime,nobarrier / mnt/nfs# overwrites the exports file Add a line [root@osd1 current] # vim / etc/exports/mnt/nfs 192.168.108.0 to 24 (rw,no_root_squash,no_subtree_check Async) [root@osd1 current] # exportfs-r also need to execute the instruction service rpcbind start [root@osd1 current] # service nfs startStarting NFS services: [OK] Starting NFS quotas: [OK] Starting NFS mountd: [OK] Starting NFS daemon: [OK] Starting RPC idmapd: [OK] at this point, the client can mount it. Client runs: showmount-e 192.168.108.2 and then mounts: mount-t nfs 192.168.108.2:/mnt/nfs / mnt/nfs
If it cannot be mounted, run the service rpcbind start or service portmap start command to try it.
The above is all the contents of the article "how to configure nfs with ceph rbd". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.