Ceph uses block storage, and the system kernel needs to 3.0 and above the kernel to support some ceph modules.
You can specify a type when creating a block (Type1 and type2) , only type2 can protect the snapshot and protect it before cloning.
Complete operation process with block device:
1 , creating a block device ( in M)
RBD Create yjk01--size 1024x768--pool vms--image-format 2RBD info yjk01--pool VMSRBD map yjk01--pool VMSRBD showmappedmkfs . ext4/dev/rbd0mount/dev/rbd0/mnt
2 , Automatic mounting
Write Fstab First (Blkid See the UUID of the corresponding disk )
uuid=/mnt ext4 Defaults,noatime,_netdev 0 0
Add the following to /etc/rc.local
RBD Map Yjk01--pool vmsmount-a
3 , block expansion
RBD Resize Vms/yjk01--size 2048resize2fs/dev/rbd0
4 , Block Deletion
Umount/dev/rbd0
Delete related content in /etc/ceph/rbdmap and /etc/fstab or /etc/rc.local
RBD UNMAP/DEV/RBD0RBD RM yjk01--pool VMS
only before the map can be mounted, reboot will not automatically map (/etc/init.d/rbdmap has a bug),fstab boot priority higher than the automatic map the priority level
The following script ensures that the system does not get stuck when it restarts, and that a normal auto-mount block device is turned on.
The script does the following:
# CP auto_unmap/etc/rc.d/init.d/# chmod +x/etc/rc.d/init.d/auto_unmap# chkconfig--add auto_unmap# chkconfig auto_unmap On
Content
#!/bin/bash### chkconfig: 02345 99 1# description: delete all service pid and lockfile############## ######### #readme ########################################## cp auto_unmap /etc/rc.d/init.d/# chmod +x /etc/rc.d/init.d/auto_unmap# chkconfig --add auto_unmap# chkconfig auto_unmap on###################### #readme ######################################### function action_start () {echo ' automap_info_in_rc.local '}function action_stop ( ) {mount_devices= ' rbd showmapped|sed ' 2, $p ' -n|awk ' {print $5} ' for i in $mount _devicesdoumount $irbd unmap $idone}case "$" instart);; Stop) action_stopecho ' Auto-unmap is ok ';; status);; *) echo "Usage: $0 {start}" exit&Nbsp;1esac
This article from "Life is endless, struggle not only!" "Blog, be sure to keep this provenance http://linuxnote.blog.51cto.com/9876511/1788682
CEPH uses block device complete operation process