Ceph Client mount file system, boot auto Mount
[Admin-node node] installation Ceph-common, authorization apt-get install ceph-common[email protected]:~# cat / Etc/hosts172.16.66.143 admin-node172.16.66.150 node8172.16.66.144 ceph-client [Email protected]:~# ssh-copy-id node8[node8 node] installation ceph [email protected]:~# apt-get install ceph -y[email protected]:~# ceph -vceph version 0.94.5 (9764da52395923e0b32908d83a9f7304401fee43) [Admin-node node] Create mds[email protected]:~# cd / home/my-cluster/[email protected]:/home/my-cluster# ceph-deploy mds create node8[ The Admin-node node]ceph file system requires at least two pool, one to store data, and one to store metdata data [Email protected]:/home/my-cluster# ceph osd pool create cephfs_data 10[email protected]:/home/my-cluster# ceph  OSD POOL CREATE CEPHFS_METADATA 10 Enable filesystem[email protected]:/home/ My-cluster# ceph fs new my_fs cephfs_metadata cephfs_datanew fs with metadata pool 9 and data pool 8 View Fs[email protected]:/home/my-cluster# ceph fs lsname:  MY_FS, METADATA POOL: CEPHFS_METADATA, DATA POOLS: [CEPHFS_DATA ] View mds Status [email protected]:/home/my-cluster# ceph mds state16: 1/1/1 up {0=node8=up:active}, 1 up:standby View Certifications [email protected]:/home/my-cluster# cat / etc/ceph/ceph.client.admin.keyring [client.admin] key = aqc8yihw2gslebaawum3nqi6h8x0veciakld1w== "Client on Ceph" [email protected]:~# echo " aqc8yihw2gslebaawum3nqi6h8x0veciakld1w== " > /etc/ceph/admin.secret Installation ceph-fs-common[email protected]:~# apt-get install ceph-fs-common[email protected]:~# mkdir /mnt/ mycephfs[email protected]:~# echo "Aqc8yihw2gslebaawum3nqi6h8x0veciakld1w== " > /etc/ceph/admin.secret Specifies any one of the Mon nodes ip [email protected]: ~# mount -t ceph 172.16.66.140:6789:/ /mnt/mycephfs -o name=admin, Secretfile=/etc/ceph/admin.secret[email protected]:~# df -ht172.16.66.140:6789:/ ceph 2.9t 195g 2.7t 7% /mnt/ MYCEPHFS Uninstall [email protected]:~# umount /mnt/mycephfs== "boot using kernel Load" Client file system table Mount ceph FS as the kernel driver, add the following to/etc/fstab:172.16.66.142:6789 any Mon node IP, port/mnt/mycephfs mount point ceph Hanging on type name=admin in/etc/ceph/ceph.client.admin.keyring See adminsecretfile with aqc8yihw2gslebaawum3nqi6h8x0veciakld1w== The file vim /etc/fstab172.16.66.142:6789:/ /mnt/mycephfs ceph name=admin,secretfile=/etc/ceph/admin.secret 0 2 Restart the machine, you can see that the [Email protected]:~# df -ht file system has been identified type capacity used available used% mount point 172.16.66.142:6789:/ ceph 2.9t 195g 2.7t 7% /mnt/mycephfs
"Mount Ceph FS as a fuse" boot automatically mounts to user space
"On the client host" copies the Ceph configuration file from the monitoring host to the/etc/ceph directory [email protected]:~# mkdir -p /etc/ceph[email protected]:~# scp 172.16.66.142:/etc/ceph/ceph.conf /etc/ceph/ceph.conf copy ceph keys from the monitoring host to/etc/ Ceph Directory [email protected]:~# scp 172.16.66.142:/etc/ceph/ceph.keyring /etc/ceph/ceph.keyring [EMAIL PROTECTED]:~# MKDIR -P /HOME/MYSQL/CEPHFS mounts to MySQL's home directory [email protected]:~# ceph-fuse -m 172.16.66.142:6789 /home/mysql/cephfs[email protected]:~# df -htceph-fuse fuse.ceph-fuse 2.9t 195g 2.7t     7% /HOME/MYSQL/CEPHFS "Uninstall" [Email protected]:/home/user1/cephfs# cd[email protected]:~# umount /home/user1/cephfs == "boot using kernel load" 172.16.66.142:6789 IP of any Mon node, port/home/user1/cephfs mount point fuse.ceph hanging on type name=admin in/etc/ceph/ ceph.client.admin.keyring See adminconf ceph configuration file for cluster VIM /ETC/FSTABID=ADMIN,CONF=/ETC/CEPH/CEPH.CONF /HOME/USER1/CEPHFS fuse.ceph defaults 0 0 Restart the machine, you can see that the [Email protected]:~# df -ht file system has been successfully mounted type Capacity used available used% mount point ceph-fuse fuse.ceph-fuse 2.9t 195g 2.7t 7% /home/user1/ Cephfs
Multiple clients are hanging in this FS, putting the data
Other clients can see the resulting data directly
This article comes from "Life is endless, tossing and turning." "blog, declined reprint!"
Ceph File System Combat