创建osd
所有存储节点执行相同操作
1.列出节点磁盘信息
ceph-deploy disk list ceph01
ceph-deploy disk list ceph02
ceph-deploy disk list ceph03
输出如下
...
[ceph01][INFO ] Disk /dev/sda: 480.1 GB, 480103981056 bytes, 937703088 sectors
[ceph01][INFO ] Disk /dev/sdb: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sdf: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sdd: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sde: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sdc: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sdg: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph01][INFO ] Disk /dev/sdh: 960.2 GB, 960197124096 bytes, 1875385008 sectors
...
...
[ceph02][INFO ] Disk /dev/sda: 480.1 GB, 480103981056 bytes, 937703088 sectors
[ceph02][INFO ] Disk /dev/sdb: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sdf: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sdd: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sde: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sdc: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sdg: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph02][INFO ] Disk /dev/sdh: 960.2 GB, 960197124096 bytes, 1875385008 sectors
...
...
[ceph03][INFO ] Disk /dev/sda: 480.1 GB, 480103981056 bytes, 937703088 sectors
[ceph03][INFO ] Disk /dev/sdb: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sdf: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sdd: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sde: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sdc: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sdg: 960.2 GB, 960197124096 bytes, 1875385008 sectors
[ceph03][INFO ] Disk /dev/sdh: 960.2 GB, 960197124096 bytes, 1875385008 sectors
...
其中/dev/sda-h
为SSD
类型磁盘,且/dev/sda
为系统盘
2.查看磁盘挂载
lsblk
输出如下
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:16 0 894.3G 0 disk
├─sda2 8:34 0 1G 0 part /boot
├─sda3 8:35 0 445.1G 0 part
│ ├─centos-swap 253:1 0 16G 0 lvm
│ └─centos-root 253:0 0 429.1G 0 lvm /
└─sda1 8:33 0 1G 0 part /boot/efi
sr0 11:0 1 4.2G 0 rom
sdb 8:0 0 894.3G 0 disk
sdc 8:32 0 894.3G 0 disk
sdd 8:0 0 894.3G 0 disk
sde 8:64 0 894.3G 0 disk
sdf 8:64 0 894.3G 0 disk
sdg 8:96 0 894.3G 0 disk
sdh 8:112 0 894.3G 0 disk
....
3.格式化磁盘
mkfs.ext4 /dev/sdb
mkfs.ext4 /dev/sdc
mkfs.ext4 /dev/sdd
mkfs.ext4 /dev/sde
mkfs.ext4 /dev/sdf
mkfs.ext4 /dev/sdg
mkfs.ext4 /dev/sdh
4.擦净节点磁盘
cd /etc/ceph/
for i in {b..h};do
ceph-deploy disk zap ceph01 /dev/sd$i
done
cd /etc/ceph/
for i in {b..h};do
ceph-deploy disk zap ceph02 /dev/sd$i
done
cd /etc/ceph/
for i in {b..h};do
ceph-deploy disk zap ceph03 /dev/sd$i
done
5.创建
osd
节点
cd /etc/ceph
for i in {b..h};do
ceph-deploy osd create --data /dev/sd$i ceph01
done
cd /etc/ceph
for i in {b..h};do
ceph-deploy osd create --data /dev/sd$i ceph02
done
cd /etc/ceph
for i in {b..h};do
ceph-deploy osd create --data /dev/sd$i ceph03
done