Ceph : Use as Block Device2018/12/25 |
Configure Clients to use Ceph Storage like follows.
| +--------------------+ | +--------------------+ | [dlp.srv.world] |10.0.0.30 | 10.0.0.x| [client.srv.world] | | Ceph-Deploy +-----------+-----------+ | | | | | | +--------------------+ | +--------------------+ +----------------------------+----------------------------+ | | | |10.0.0.51 |10.0.0.52 |10.0.0.53 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [node01.srv.world] | | [node02.srv.world] | | [node03.srv.world] | | Object Storage +----+ Object Storage +----+ Object Storage | | Monitor Daemon | | | | | | | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
For exmaple, Create a block device and mount it on a Client.
|
|
[1] | First, Configure Sudo and SSH key-pair for a user on a Client and next, Install Ceph from Ceph admin Node like follows. |
ubuntu@dlp:~/ceph$
ubuntu@dlp:~/ceph$ ceph-deploy install client ubuntu@dlp:~/ceph$ ceph-deploy admin client
sudo ceph osd pool create rbd 8 pool 'rbd' created ubuntu@dlp:~/ceph$ sudo rbd pool init rbd |
[2] | Create a Block device and mount it on a Client. |
# show list ubuntu@client:~$ sudo rbd ls -l NAME SIZE PARENT FMT PROT LOCK rbd01 10240M 2 # show mapping ubuntu@client:~$ rbd showmapped id pool image snap device 0 rbd rbd01 - /dev/rbd0ubuntu@client:~$ df -hT Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 1.9G 0 1.9G 0% /dev tmpfs tmpfs 395M 624K 394M 1% /run /dev/mapper/ubuntu--vg-root ext4 29G 2.3G 25G 9% / tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup tmpfs tmpfs 395M 0 395M 0% /run/user/0 /dev/rbd0 xfs 10G 44M 10G 1% /mnt |
Sponsored Link |