In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how to restore the permissions in the auth table of osd. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
Reason: when you accidentally delete the auth information of osd, restart the osd service, and ceph-s check and find osd down
Such as:
[root@ceph] # ceph osd treeID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY-1 0.02719 root default-2 0.01849 host ceph68 0 0.01849 osd.0 up 1.00000 1.00000-3 0.00870 host ceph38 1 0.00870 osd.1 up 1.00000 1.00000 cluster OSD all up [root@ceph ~] # ceph auth listinstalled auth entries:osd.0 key: AQDZ7T5ZmLx3MBAAR8Vhqt1UvreMUwSSmdfeSw== caps: [mon] allow profile osd caps: [osd] allow * osd.1 key: AQDAFkRZEHhnGxAAjfbGRNNNT5kWvGl4jpKjYg== caps: [mon] allow profile osd caps: [osd] allow * client.admin Key: AQBA7T5ZAAAAABAAlJhtiG0oJVOeXlBc0Mzokw== caps: [mds] allow * caps: [mgr] allow * caps: [mon] allow * caps: [osd] allow * client.bootstrap-osd key: AQDA7T5ZBzemGhAAwQgt7wU3kVJps7IoLAg0TA== caps: [mon] allow profile bootstrap-osd# view the auth table at this time The authentic values of both osd.0 and osd.1 are normal [root@ceph ~] # ceph auth del osd.1 # remove the osd.1 authentic value from the auth table updated [root@ceph ~] # ceph auth list installed auth entries:osd.0 key: AQDZ7T5ZmLx3MBAAR8Vhqt1UvreMUwSSmdfeSw== caps: [mon] allow profile osd caps: [osd] allow * client.admin key: AQBA7T5ZAAAAABAAlJhtiG0oJVOeXlBc0Mzokw== caps: [mds] allow * caps: [mgr] Allow * caps: [mon] allow * caps: [osd] allow * client.bootstrap-osd key: AQDA7T5ZBzemGhAAwQgt7wU3kVJps7IoLAg0TA== caps: [mon] allow profile bootstrap-osd# found that the authentic value of osd.1 has been cleared from the auth table [root@ceph ~] # systemctl restart ceph-osd@1 # restart osd [root@ceph ~] # ceph osd treeID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY-1 0.02719 root default -2 0.01849 host ceph68 0 0.01849 osd.0 up 1.00000 1.00000-3 0.00870 host ceph38 1 0.00870 osd.1 down 1.00000 1.00000 osd.1 was found to be down at this time
How to recover?
The steps are as follows:
Enter / var/lib/ceph/osd/ceph-*
[root@ceph] # cd / var/lib/ceph/osd/ceph-1 [root@ceph ceph-1] # lstotal 60 Murray RW Murray. 1 root root 202 Jun 17 01:34 activate.monmap-rw-r--r--. 1 ceph ceph 3 Jun 17 01:44 activelrwxrwxrwx. 1 ceph ceph 58 Jun 17 01:34 block-> / dev/disk/by-partuuid/87f73ff4-7add-4e83-94e9-29869c7c0123lrwxrwxrwx. 1 ceph ceph 58 Jun 17 01:34 block.db-> / dev/disk/by-partuuid/f70d731a-666b-4828-8cb7-59c4aa498a91Kui RWMui. 1 ceph ceph 37 Jun 17 01:34 block.db_uuid-rw-r--r--. 1 ceph ceph 37 Jun 17 01:34 block_uuidlrwxrwxrwx. 1 ceph ceph 58 Jun 17 01:34 block.wal-> / dev/disk/by-partuuid/fbe8751d-c2ae-4db4-8a35-7ab699401b58Murray RWKui. 1 ceph ceph 37 Jun 17 01:34 block.wal_uuid-rw-r--r--. 1 ceph ceph 2 Jun 17 01:34 bluefs-rw-r--r--. 1 ceph ceph 37 Jun 17 01:34 ceph_fsid-rw-r--r--. 1 ceph ceph 37 Jun 17 01:34 fsid-rw-. 1 ceph ceph 124 Jun 17 18:10 keyring-rw-r--r--. 1 ceph ceph 8 Jun 17 01:34 kv_backend-rw-r--r--. 1 ceph ceph 21 Jun 17 01:34 magic-rw-r--r--. 1 ceph ceph 4 Jun 17 01:34 mkfs_done-rw-r--r--. 1 ceph ceph 6 Jun 17 01:34 ready-rw-r--r--. 1 ceph ceph 0 Jun 17 01:44 systemd-rw-r--r--. 1 ceph ceph 10 Jun 17 01:34 type-rw-r--r--. 1 ceph ceph 2 Jun 17 01:34 whoami# where the keying file records the osd partial authentic value
Modify the keying file
[root@ceph ceph-1] # cat keyring [osd.1] key = AQDAFkRZEHhnGxAAjfbGRNNNT5kWvGl4jpKjYg== # default [root@ceph ceph-1] # cat keyring [osd.1] key = AQDAFkRZEHhnGxAAjfbGRNNNT5kWvGl4jpKjYg== caps mon = "allow profile osd" # add caps osd = "allow *" # add
Upload the contents of the keying file to mon
[root@ceph ceph-1] # ceph auth import-i keyring imported keyring [root@ceph ceph-1] # systemctl restart ceph-osd@1 [root@ceph ceph-1] # ceph osd treeID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY-1 0.02719 root default-2 0.01849 host ceph68 0 0.01849 osd. 0 up 1.00000 1.00000-3 0.00870 host ceph38 1 0.00870 osd.1 up 1.00000 1.00000 the above is shared by the editor on how to restore the permissions in osd's auth table. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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.