Gluster Volume Snapshot Rajesh Joseph GlusterFS Dev Team
AGENDA Introduction Supported Configuration Accessing Snapshot Snapshot CLI commands Q&A 11/25/14
Snapshots in Gluster Volume level snapshots LVM2 based Operates only on thin-provisioned volumes Snapshot of a Gluster volume is a read-only Gluster volume A Gluster volume snapshot consists of LVM snapshots of the individual bricks making up the volume Crash consistent 11/25/14
Gluster Volume Gluster Volume Brick Brick Brick Brick Storage Node Storage Node Storage Node 11/25/14
Thinly Provisioned LVM2 Volume & Snapshot Storage devices Thin Pool Thin LV Snapshot Volume Group 11/25/14
Gluster Volume Snapshot Gluster Volume Storage Node Storage Node Brick1 Brick2 Snapshot volume Brick3 Brick4 Brick1_s1 Brick2_s1 Brick3_s1 Brick4_s1 11/25/14
AGENDA Introduction Supported Configuration Accessing Snapshot Snapshot CLI commands Q&A 11/25/14
Supported Volume Configuration Each volume brick should be on an independent thinly provisioned volume. Brick LVM should not be used for any other purpose. All the snapshot of the brick will be created on same thin pool. Thin pool should have sufficient free space. 11/25/14
Older Gluster Volume Configuration Storage devices mount Brick1 LV LV Brick2 Volume Group
New Volume Configuration for Snapshot Storage devices Thin Pool Thin Pool mount mount mount Thin LV Thin LV Brick1 Volume Group Brick2
AGENDA Introduction Supported Configuration Accessing Snapshot Snapshot CLI commands Q&A
Accessing Snapshots Snapshots are similar to Gluster volume and therefore it is mountable. Only fuse mount is supported as of now Can be mounted even if origin volume is down mount t glusterfs <hostname>:/snaps/<snap name>/<origin volname> /<mount_point>
User Serviceable Snapshots in Gluster Ease of use - Users can access snapshots of a volume without admin intervention Accessible via fuse, NFS and CIFS mount. Configurable feature. By default it is disabled. cd to.snaps virtual directory anywhere in the file-system to access your data
AGENDA Introduction Supported Configuration Snapshot CLI commands Accessing Snapshot Q&A
Snapshot Create gluster snapshot create <snap name> <vol name(s)> [description <description>] [force] Create snapshot of an active snapshot volume Snapshot is allowed if brick quorum is met Snapshot volume is started by default
Snapshot Delete gluster snapshot delete <snap name> Snapshot including the backend lvm will be removed Snapshot volume will be stopped before deleting it.
Snapshot Activate & Deactivate gluster snapshot activate <snap name> [force] gluster snapshot deactivate <snap name> Activate will start the snapshot volume Deactivate will stop the running snapshot volume
Snapshot List gluster snapshot list [vol name] [root@john]# guster snapshot list Snap1 Snap2 Snap3 Snap4 Snap5 [root@john]# guster snapshot list vol1 Snap1 Snap3
Snapshot Info gluster snapshot info [(<snap name> volume <vol name>)] [root@john]# guster snapshot info snap1 Snapshot : snap1 Snap UUID : 00f9a417 071c 46e5 b18e 062f736369df Created : 2014 04 13 11:18:55 Snap Volumes: Snap Volume Name : 09fec15b01964328adbbee26c002663c Origin Volume name : vol1 Snaps taken for vol1 : 3 Snaps available for vol1 : 253 Status : Started
Snapshot Status gluster snapshot status [(<snap name> volume <vol name>)] [root@john]# guster snapshot status snap1 Snap Name : snap1 Snap UUID : 00f9a417 071c 46e5 b18e 062f736369df Brick Path : john:/run/gluster/snaps/09fec15b01964328adbbee26c002663c/brick1 Volume Group : volgroup Brick Running : Yes Brick PID : 8967 Data Percentage : 1.04 LV Size : 1.00g
Snapshot config gluster snapshot config [vol name] Display the current configuration gluster snapshot config [vol name] [<snap max hard limit> <count>] [<snap maxsoft limit> <percentage>] [<auto delete> <enable disable>] [force] Configure maximum allowed snapshot for a volume Configure maximum allowed snapshot for the entire cluster Enable/disable auto-delete feature
Snapshot Restore gluster snapshot restore <snap name> Volume should be stopped Brick paths will be changed after restore Once the snapshot is restored it will be deleted
AGENDA Introduction Supported Configuration Snapshot CLI commands Accessing Snapshot Q&A