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)06/01 Report--
This article mainly introduces "the steps of adding osd manually to Ceph". In the daily operation, I believe many people have doubts about the steps of adding osd manually to Ceph. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "steps for Ceph to add osd manually". Next, please follow the editor to study!
1. Ceph version
The process of adding osd manually by ceph is actually the process of ceph-deploy that is manually executed by itself.
# ceph versionceph version 12.2.7 (3ec878d1e53e1aeb47a9f619c49d9e7c0aa384d5) luminous (stable) 2, disk partition bluestore storage method, data is the previous journal (vdc1) Block (vdc2) is the actual data store 2.1, Divide ceph data# uuidgen ff3db0d3-fd32-4b2d-8c35-1fb074e00cea# sgdisk-- new=1:0:+100M-- change-name=1: "ceph data"-- partition-guid=1:ff3db0d3-fd32-4b2d-8c35-1fb074e00cea-- typecode=1:89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be-- mbrtogpt-- / dev/vdcThe operation has completed successfully.# / usr/bin/udevadm settle-- timeout=600# / usr/bin/flock-s / dev/vdc / usr/sbin/partprobe / dev/vdc# / usr/bin/udevadm settle-- timeout=6002.2, Divide ceph block# uuidgen a44651fb-8904-4a86-adf6-541fefdf229e# sgdisk-- largest-new=2-- change-name=2: "ceph block"-- partition-guid=2:a44651fb-8904-4a86-adf6-541fefdf229e-- typecode=2:cafecafe-9b03-4f30-b4c6-b4b80ceff106-- mbrtogpt-- / dev/vdcThe operation has completed successfully.# / usr/bin/udevadm settle-- timeout=600# / usr/bin/flock-s / dev/vdc / usr/sbin/partprobe / dev/vdc# / usr/bin/udevadm settle-- timeout=6002.3, Check the partition # ls-lrt / dev/disk/by-partuuid/ | grep vdca44651fb-8904-4a86-adf6-541fefdf229e->.. / vdc2lrwxrwxrwx 1 root root 10 Jul 12 16:37ff3db0d3-fd32-4b2d-8c35-1fb074e00cea->.. /.. / vdc13, Format / dev/vdc1 to xfs# sgdisk-- typecode=2:cafecafe-9b03-4f30-b4c6-b4b80ceff106-- / dev/vdcThe operation has completed successfully.# udevadm settle-- timeout=600# flock-s / dev/vdc / usr/sbin/partprobe / dev/vdc# udevadm settle-- timeout=600# mkfs-t xfs-f-isize=2048-- / dev/vdc1meta-data=/dev/vdc1 isize=2048 agcount=4 Agsize=6400 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=25600, imaxpct=25 = sunit=0 swidth=0 blksnaming = version 2 bsize=4096 ascii-ci=0 ftype=1log = internal log bsize=4096 blocks=864 Version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime = none extsz=4096 blocks=0, rtextents=04, mount temporary directory (vdc1) # mkdir / var/lib/ceph/tmp/mnt.DlWdC2# mount-t xfs-o noatime Inode64-/ dev/vdc1 / var/lib/ceph/tmp/mnt.DlWdC2# fsid=$ (ceph-osd-- cluster=ceph-- show-config-value=fsid) # cat / var/lib/ceph/tmp/mnt.DlWdC2/ceph_fsid > $fsid > EOF# echo "ff3db0d3-fd32-4b2d-8c35-1fb074e00cea" > / var/lib/ceph/tmp/mnt.DlWdC2/fsid# restorecon-R / var/lib/ceph/tmp/mnt.DlWdC2/magic # cat / var/lib/ceph/tmp/mnt.DlWdC2/ Block_uuid > a44651fb-8904-4a86-adf6-541fefdf229e > EOF5, Establish block soft link (vdc2) # ln-s / dev/disk/by-partuuid/a44651fb-8904-4a86-adf6-541fefdf229e / var/lib/ceph/tmp/mnt.DlWdC2/block# echo bluestore > > / var/lib/ceph/tmp/mnt.DlWdC2/type# / usr/sbin/restorecon-R / var/lib/ceph/tmp/mnt.DlWdC2/# / usr/bin/chown-R ceph:ceph / var/lib/ceph/tmp/mnt.DlWdC2/# umount / var/lib/ceph / tmp/mnt.DlWdC2/# sgdisk-- typecode=1:4fbd7e29-9d25-41b8-afd0-062c0ceff05d-/ dev/vdcWarning: The kernel is still using the old partition table.The new table will be used at the next reboot.The operation has completed successfully.6, Start osd
Udev to realize the automatic mount of osd
# / usr/bin/udevadm settle-timeout=600# / usr/bin/flock-s / dev/vdc / usr/sbin/partprobe / dev/vdc# / usr/bin/udevadm settle-timeout=600# / usr/bin/udevadm trigger-action=add-sysname-match vdc17, Osd catalog file description # cd / var/lib/ceph/osd/ceph-4/# ls-lrttotal 52ceph ceph Jul 12 16:49 block_uuidlrwxrwxrwx 1 ceph ceph 58 Jul 12 16:50 block-1 ceph ceph 37 Jul 12 16:43 ceph_fsid-rw-r--r-- 1 ceph ceph 37 Jul 12 16:47 fsid-rw-r--r-- 1 ceph ceph 21 Jul 12 16:47 magic-rw-r--r-- 1 ceph ceph 37 Jul 12 16:49 block_uuidlrwxrwxrwx 1 ceph ceph 58 Jul 12 16:50 block Dev/disk/by-partuuid/a44651fb-8904-4a86-adf6-541fefdf229e root 12 16:57 activate.monmap-rw-r--r-- 1 ceph ceph 8 Jul 12 16:57 kv_backend-rw 1 ceph ceph 10 Jul 12 16:51 type-rw- 1 ceph ceph 56 Jul 12 16:57 keyring-rw-r--r-- 1 ceph ceph 2 Jul 12 16:57 whoami-rw-r--r-- 1 root root 384 Jul 12 16:57 -Rmurmurr Jul-1 ceph ceph 2 Jul 12 16:57 bluefs-rw-r--r-- 1 ceph ceph 4 Jul 12 16:57 mkfs_done-rw-r--r-- 1 ceph ceph 6 Jul 12 16:57 ready-rw-r--r-- 1 ceph ceph 3 Jul 12 16:57 active-rw-r--r-- 1 ceph ceph 0 Jul 12 16:57 systemdceph_fsid-fsidfsid of ceph cluster-fsid of osd It is also the drive letter idmagic of / dev/vdc1-- ceph osd volume v026block_uuid-- / dev/vdc2 drive letter idblock-- soft link, pointing to / dev/vdc2 drive letter type-- ceph storage type. Here is bluestorekeyring-- osd's secret key whoami-- osd sequence number activate.monmap-- active monmapkv_backend-- value is rocksdbbluefs-- value is 1mkfs_done-- value is yesready-- value is readyactive-- value is oksystemd-- empty file, and the study on "steps to manually add osd for Ceph" ends. I hope I can solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.