In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the ceph function. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Ceph is a distributed file system that can use the functions of block devices, file systems, and object storage.
Block equipment
Create a dedicated storage pool: ceph osd pool create cephfs_data_test
Create an image named foo size 1G in the cephfs_data_test storage pool: rbd create-- size 1024 cephfs_data_test/foo
View block devices for cephfs_data_test storage pools: rbd ls cephfs_data_test
Information: rbd info cephfs_data_test/foo
Expansion: rbd resize-size 2048 cephfs_data_test/foo
Zoom out: rbd resize-- size 1024 cephfs_data_test/foo-- allow-shrink
Delete: rbd rm cephfs_data_test/foo
Turn off property: rbd feature disable cephfs_data_test/foo object-map fast-diff deep-flatten
Then on the physical machine:
Configure ceph.repo Feed
Yum install ceph
Copy / etc/ceph/ceph.client.admin.keyring ceph.conf
Then mount: rbd map cephfs_data_test/foo-- id admin-- keyring / etc/ceph/ceph.client.admin.keyring
View mount on physical machine: rbd showmapped
Uninstall: rbd unmap / dev/rbd0
File system
Only one file system can exist in a cluster
View file system: ceph fs ls
If not, create:
Ceph osd pool create cephfs_data
Ceph osd pool create cephfs_metadata
Cephfs new for example: cephfs new cephfs cephfs_metadata cephfs_data
Check whether the mds is normal. If it is normal, you can mount it: ceph mds stat
Then you can mount: mount-t ceph ip:6789:/ / data-o name=admin,secret= key
Key look / etc/ceph/ceph.client.admin.keyring
Object storage
Create users and remember access_key and secret_key:radosgw-admin user create-- uid= "testuser"-- display-name= "testuser"
View user information: radosgw-admin user info-- uid=testuser
Modify user information: radosgw-admin user modify-- uid=testuser-- email= "123@qq.com"
Deactivate user: radosgw-admin user suspend-- uid=testuser
Enable user: radosgw-admin user enable-- uid=testuser
Delete user: radosgw-admin user rm-- uid=testuser
Set user quota: radosgw-admin quota set-- quota-scope=user-- uid=testuser-- max-objects=1024-- max-size=1024
Start user quota: radosgw-admin quota enable-- quota-scope=user-- uid=testuser
Disable user quota: radosgw-admin quota disable-- quota-scope=user-- uid=testuser
Obtain quota statistics: radosgw-admin user stats-- uid=testuser-- sync-stats
Get the current user consumption quota: radosgw-admin user stats-- uid=testuser
Specified user dosage: radosgw-admin usage show-- uid=testuser-- start-date=2020-03-01-- end-date=2021-04-01
All user usage: radosgw-admin usage show--show-log-entries=false
Delete usage information specified time: radosgw-admin usage trim-- start-date=2020-03-01-- end-date=2020-12-31
Delete usage information specified user: radosgw-admin usage trim-- uid=testuser
Users will not erase the disk immediately after deletion. You can run it: users created by radosgw-admin temp remove can use API S3 to access:
This is the end of the article on "how to use ceph". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.