[关闭]
@tony-yin 2017-08-20T08:44:37.000000Z 字数 1511 阅读 747

Osd Disable And Enable

Magicloud


Osd Disable

  1. stop_ezs3_service: stop_ezs3_service
  2. stop osd
  3. disable osd

    • load config: /etc/mcs3/storage.conf (存储卷的配置信息,即osd的配置信息)
    • service ganglia-monitor stop' returns 'Stopping Ganglia Monitor Daemon: gmond.
    • get osd id by osd name
    • stop osd
      • ezs3-ha service_ceph stop osd0
      • kill -9 xxx
      • ceph osd down 0, ceph osd out 0, ceph osd rm 0
    • disable osd
    • umount:

      1. mount_point = "/data/osd.{}".format(self.get_osd_id())
      2. if os.path.ismount(mount_point):
      3. umount -f -l /data/osd.0 ?
    • sed -i '\@/data/osd.0@d' /etc/fstab

  4. delete part_map

  5. set partition map
  6. cl.node_management.osd_disabled

Osd Enable

  1. prepare enable osd

    • set public interace,cluster interface(if cluster interface is true) and save in ceph.conf (osd, interface等信息存放文件:/etc/ceph/ceph.conf)
    • consolidate_raid_configure
      • 查看池信息: /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCMD -Aall |grep Exit |tr -d "\n"
      • a series of megaci command
    • 记录osd的状态: role.set(OSD, RoleState.ENABLING)

    • enable osd (@monlock ?)

      • update task info (有空看下代码,如何实现ajax轮询的)
      • get_partition_map:

        1. try:
        2. kvstore.get('partition_map', timeout, timeout!=0)
        3. catch:
        4. rados -p .ezs3 get partition_map -
      • stop ezs3 service

      • 创建桶节点并且建立link

        1. if not host_osd_enabled:
        2. ceph osd crush add-bucket {} host".format(crush_host_bucket)
        3. ceph osd crush link {} pool=default".format(crush_host_bucket)
      • service ganglia-monitor stop

    • StorageVolume

    • enable_osd
      • ceph osd create
      • mount: mount -o noatime,user_xattr /dev/disk/by-partlabel/osd1-data /data/osd.0
      • add osd and save
      • ceph mon getmap -o /tmp/monmap (二进制文件)
      • ceph-osd -i {osd_id} --monmap /tmp/monmap --mkfs --mkjournal
    • start osd:

      1. ezs3-ha service_ceph start osd0
    • ceph osd crush add {osd_id} 0 pool=default host={crush_host_bucket}

    • set osd uuid and osd post stop command
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注