日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

gluster快照创建

發(fā)布時間:2024/3/26 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 gluster快照创建 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

先決條件

GlusterFS卷快照功能基于精簡配置的LVM快照。要使用快照功能,GlusterFS卷應滿足以下先決條件:每個模塊都應位于獨立的精簡配置LVM上。 磚LVM不應包含磚以外的任何其他數(shù)據(jù)。 磚塊都不應放在較厚的LVM上。 gluster版本應為3.6及更高版本。 有關如何創(chuàng)建精簡卷的詳細信息,請參見以下鏈接。https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Logical_Volume_Manager_Administration/LV.html#thinly_provisioned_volume_creation

快照創(chuàng)建

[root@abcabc certs]# gluster snapshot create bsbj my-data snapshot create: success: Snap bsbj_GMT-2020.06.07-08.34.41 created successfully

快照狀態(tài)

[root@abcabc certs]# gluster snapshot statusSnap Name : bsbj_GMT-2020.06.07-08.34.41 Snap UUID : dce3fa5d-ff90-4403-9e4d-a9c73c726624Brick Path : 2.1.1.120:/run/gluster/snaps/cdd3fe1919a0497a88c631ee872866f3/brick1Volume Group : N/A (Deactivated Snapshot)Brick Running : NoBrick PID : N/AData Percentage : N/ALV Size : N/ABrick Path : 2.1.1.121:/run/gluster/snaps/cdd3fe1919a0497a88c631ee872866f3/brick2Volume Group : N/A (Deactivated Snapshot)Brick Running : NoBrick PID : N/AData Percentage : N/ALV Size : N/A

刪除所有快照

[root@abcabc certs]# gluster snapshot delete all System contains 1 snapshot(s). Do you still want to continue and delete them? (y/n) y snapshot delete: bsbj_GMT-2020.06.07-08.34.41: snap removed successfully [root@abcabc certs]# gluster snapshot status No snapshots present [root@abcabc certs]# gluster snapshot info Snapshot : bbc-bck-01_GMT-2020.06.07-08.41.20 Snap UUID : 683edd31-882f-4a41-82c5-0c67f522145e Created : 2020-06-07 08:41:20 Snap Volumes:Snap Volume Name : 68f20c33b1464641a6e52485e9426eb1Origin Volume name : my-dataSnaps taken for my-data : 1Snaps available for my-data : 255Status : Stopped```

用戶可維護性

除了上述安裝快照的方法之外,還可以從訪問glusterfs卷(FUSE或NFS或SMB)的任何安裝點查看可用快照的列表以及每個快照的內容。為了使用戶可以使用快照,必須首先為卷啟用快照??梢允褂靡韵旅顬榫韱⒂糜脩艨删S護性。 root@abcabc certs]# gluster volume set my-data features.uss enable volume set: success

可用快照的信息

[root@abcabc certs]# gluster volume infoVolume Name: app-data Type: Replicate Volume ID: 6ea34e17-1c15-42c7-b4a0-b48559693c7f Status: Started Snapshot Count: 0 Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: 2.1.1.120:/bbc/datat Brick2: 2.1.1.121:/bbc/datat Options Reconfigured: transport.address-family: inet storage.fips-mode-rchecksum: on nfs.disable: on performance.client-io-threads: offVolume Name: my-data Type: Replicate Volume ID: 5892f2a3-6116-43f8-911b-c783f74d394f Status: Started Snapshot Count: 1 Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: 2.1.1.120:/mountpoint Brick2: 2.1.1.121:/mountpoint Options Reconfigured: features.uss: enable <<<<---------------啟動完全備份 features.barrier: disable transport.address-family: inet storage.fips-mode-rchecksum: on nfs.disable: on performance.client-io-threads: off

激活快照

[root@abcabc certs]# gluster snapshot activate bbc-bck-01_GMT-2020.06.07-08.41.20 Snapshot activate: bbc-bck-01_GMT-2020.06.07-08.41.20: Snap activated successfully

可用快照的信息

[root@abcabc certs]# gluster snapshot info Snapshot : bbc-bck-01_GMT-2020.06.07-08.41.20 Snap UUID : 683edd31-882f-4a41-82c5-0c67f522145e Created : 2020-06-07 08:41:20 Snap Volumes:Snap Volume Name : 68f20c33b1464641a6e52485e9426eb1Origin Volume name : my-dataSnaps taken for my-data : 1Snaps available for my-data : 255Status : Started <<<<-----激活了

模擬刪除文件恢復

客戶端刪除文件

[root@tset56 ~]# rm -rf /mnt/12123.txt [root@tset56 ~]# df -h 文件系統(tǒng) 容量 已用 可用 已用% 掛載點 devtmpfs 895M 0 895M 0% /dev tmpfs 910M 0 910M 0% /dev/shm tmpfs 910M 9.8M 900M 2% /run tmpfs 910M 0 910M 0% /sys/fs/cgroup /dev/sda3 46G 4.4G 41G 10% / /dev/sda1 1014M 179M 836M 18% /boot tmpfs 182M 0 182M 0% /run/user/0 2.1.1.120:/my-data 1014M 43M 972M 5% /mnt

卸載掛載點

[root@tset56 ~]# umount /mnt/

服務端操作

關閉復制卷

[root@abcabc certs]# gluster volume stop my-data Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y volume stop: my-data: success

查看卷名

[root@abcabc certs]# gluster snapshot statusSnap Name : bbc-bck-01_GMT-2020.06.07-08.41.20 <<<<-------需要恢復的卷 Snap UUID : 683edd31-882f-4a41-82c5-0c67f522145eBrick Path : 2.1.1.120:/run/gluster/snaps/68f20c33b1464641a6e52485e9426eb1/brick1Volume Group : gfs_vgBrick Running : YesBrick PID : 21400Data Percentage : 2.07LV Size : 1.00gBrick Path : 2.1.1.121:/run/gluster/snaps/68f20c33b1464641a6e52485e9426eb1/brick2Volume Group : gfs_vgBrick Running : YesBrick PID : 2350Data Percentage : 2.07LV Size : 1.00g

開始恢復快照

[root@abcabc certs]# gluster snapshot restore bbc-bck-01_GMT-2020.06.07-08.41.20 <<-------需要恢復的卷 Restore operation will replace the original volume with the snapshotted volume. Do you still want to continue? (y/n) y Snapshot restore: bbc-bck-01_GMT-2020.06.07-08.41.20: Snap restored successfully

啟動復制卷

[root@abcabc certs]# gluster volume start my-data volume start: my-data: success

再回到客戶端

掛載文件又恢復了

[root@tset56 ~]# mount -t glusterfs 2.1.1.120:/my-data /mnt/ [root@tset56 ~]# ll /mnt/ 總用量 1 -rw-r--r-- 1 root root 9 6月 7 16:34 12123.txt -rw-r--r-- 1 root root 9 6月 7 16:34 12313.txt

官方鏈接
https://docs.gluster.org/en/latest/Administrator%20Guide/Managing%20Snapshots/

總結

以上是生活随笔為你收集整理的gluster快照创建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。