zoukankan      html  css  js  c++  java
  • ceph中用sgdisk工具进行分区--------固定uuid

    • ceph中两种类型分区的type code:
    typetype code
    journal 45b0969e-9b03-4f30-b4c6-b4b80ceff106
    osd

    4fbd7e29-9d25-41b8-afd0-062c0ceff05d

    • 有人会好奇为啥要给分区设置固定的uuid呢,原因是ceph通过uuid来区分你是osd分区还是journal分区之后,再决定数据放在哪里
    • 参考文档有解释:http://www.cnblogs.com/gzxbkk/p/7737421.html
    • 总结:
      ceph中创建journal分区和data分区:
      sgdisk -n {part num}:0:+{part size}G {disk} -t {part num}:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -c {part num}:”ceph data”
      sgdisk -n {part num}:0:+{part size}G {disk} -t {part num}:45b0969e-9b03-4f30-b4c6-b4b80ceff106 -c {part num}:”ceph journal”

    • 示例:

    • 使用sgdisk创建分区

    root@host1:~# sgdisk -n 1:0:+20G /dev/nvme0n1 -t 1:45b0969e-9b03-4f30-b4c6-b4b80ceff106 -c 1:"ceph journal"
    Creating new GPT entries.
    The operation has completed successfully.
    
    root@host1:~# sgdisk -n 2:0:+20G /dev/nvme0n1 -t 2:45b0969e-9b03-4f30-b4c6-b4b80ceff106 -c 2:"ceph journal"
    The operation has completed successfully.
    
    root@host1:~# sgdisk -n 3:0:+150G /dev/nvme0n1 -t 3:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -c 3:"ceph data"
    The operation has completed successfully.
    
    root@host1:~# sgdisk -n 4:0:+150G /dev/nvme0n1 -t 4:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -c 4:"ceph data"
    The operation has completed successfully.
    
    root@host1:~# ceph-disk list
    /dev/nvme0n1 :
     /dev/nvme0n1p1 ceph journal
     /dev/nvme0n1p2 ceph journal
     /dev/nvme0n1p3 ceph data, unprepared
     /dev/nvme0n1p4 ceph data, unprepared
  • 相关阅读:
    Python 操作 MySQL 之 pysql 与 SQLAchemy
    Python 列表元素里面含有字典或者列表进行排序
    Windows PyCharm QtDesigner/pyuic5配置
    Python之科学运算Pandas模块
    Linux 主要目录速查表
    php读取文件大小
    上传视频云点播和查看视频
    wordppt转pdf
    微信登录
    微信公众号
  • 原文地址:https://www.cnblogs.com/gzxbkk/p/7737467.html
Copyright © 2011-2022 走看看