ceph中使用sgdisk

ceph中使用sgdisk

使用sgdisk创建分区

  • ceph中两种类型分区的type code:
type type code
journal 45b0969e-9b03-4f30-b4c6-b4b80ceff106
osd 4fbd7e29-9d25-41b8-afd0-062c0ceff05d
  • 总结:
    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”

  • 示例:

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

参考:

sgdisk详细用法: sgdisk基本用法

你可能感兴趣的:(分布式存储,ceph)