Ceph OSD Batch Creation

Source: Internet
Author: User

Have no time to write on business trip ...

Create 150 OSD Today, find manual write ceph.conf a bit big, researched the increment function of vim.

Very simple is a command:

: Let I=0|g/reg/s//\=i/|let i=i+1

It can match the Reg in your text and then follow your i+n, increasing +n per pass

The function of the above command is to find the Reg character in the text, then replace it with 0 from the first, then +1


So in the ceph.conf, we can first copy out 150 [OSD.GGGG], and then in the use of the above command to increment, while Vim also supports CTRL + a digital +1,ctrl+x to the number 1, the feeling is quite convenient.


Forced Amway a wave of vim operation.


Of course, slowed is best with a for loop.

For i in ' seq 10 '; Do Echo [osd.${i}]>>/tmp/osd.conf; echo "host = Compute${b}" >>/tmp/osd.conf; b=$ ((b+1)); Done

Additionally add:

1, when the Ceph hangs the disk when using the partition disk character mount, may encounter the drive character drift problem, SDA becomes the SDB this, notice the use UUID mount.

Mount-u uuid/var/lib/ceph/osd/ceph-$i

2, in the maintenance of ceph, sometimes you put the OSD disk manually out, and then also down, and even deleted the OSD ID, but if you continue to delete the Crushmap information, ceph OSD Crush Remove OSD. $i, This can cause crushmap changes, and then a second PG migration occurs.

This article is from the "Danielqu" blog, make sure to keep this source http://qujunorz.blog.51cto.com/6378776/1891193

Ceph OSD Batch Creation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.