Gluster Volume Snapshot
Rajesh Joseph
Raghavendra Bhatt
05/22/15
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Features
● Future Work
● Q&A
05/22/15
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
05/22/15
Gluster Volume
Gluster Volume
Storage Node Storage Node Storage Node
Brick Brick Brick Brick
05/22/15
Thinly Provisioned LVM2 Volume & Snapshot
Storage devices
SnapshotThin LV
Thin Pool
Volume Group
05/22/15
Gluster Volume Snapshot
Gluster Volume
Storage Node Storage Node
Brick1 Brick2
Brick3 Brick4
Brick1_s1 Brick2_s1
Brick4_s1Brick3_s1
Snapshot volume
Barrier
05/22/15
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Features
● Future Work
● Q&A
05/22/15
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.
Older Gluster Volume Configuration
Storage devices
LV
Volume Group
Brick1
Brick2
LV
mount
New Volume Configuration for Snapshot
Storage devices
Thin LV
Volume GroupBrick1 Brick2
mount
Thin Pool
mount
Thin LV
Thin Pool
mount
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Commands
● Future Work
● 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
User Serviceable Snapshots
● Snap Daemon
● GFAPI Based
● CIFS and NFS Access
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Features
● Future Work
● Q&A
Snapshot Clone
● Writable snapshot volume
● Space-efficient clone of snapshot.
● Back-end LVM is shared between the original Snapshot and the clone
● Similar to snapshot create
Snapshot Scheduling
● Provide snapshot scheduling capability.
● Based on cron
● Internally uses a meta-volume to manage scheduling
● Accepts same syntax as cron
● snap_scheduler.py provides the scheduling functionality
Other Snapshot Commands
● Create
● Delete
● Info
● Status
● Config
● Restore
Snapshot config
● Snap-max-hard-limit – Beyond witch snapshot create will fail
● Snap-max-soft-limit – Warning generated if this limit is crossed
● Auto-delete – If enabled oldest snapshot will be deleted when
snapshot count crosses soft limit
● Activate-on-create – activate the snapshot on creation
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Features
● Future Work
● Q&A
Future Work
● Plug-able snapshot architecture for different types of back-end.
● Reduce resource consumption
– Activate on access.
– More options for admin to choose different retention policies.
● Migrate to liblvm
AGENDA
● Introduction
● Supported Configuration
● Accessing Snapshot
● Additional Features
● Future Work
● Q&A

Gluster volume snapshot

  • 1.
    Gluster Volume Snapshot RajeshJoseph Raghavendra Bhatt
  • 2.
    05/22/15 AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Features ● Future Work ● Q&A
  • 3.
    05/22/15 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
  • 4.
    05/22/15 Gluster Volume Gluster Volume StorageNode Storage Node Storage Node Brick Brick Brick Brick
  • 5.
    05/22/15 Thinly Provisioned LVM2Volume & Snapshot Storage devices SnapshotThin LV Thin Pool Volume Group
  • 6.
    05/22/15 Gluster Volume Snapshot GlusterVolume Storage Node Storage Node Brick1 Brick2 Brick3 Brick4 Brick1_s1 Brick2_s1 Brick4_s1Brick3_s1 Snapshot volume Barrier
  • 7.
    05/22/15 AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Features ● Future Work ● Q&A
  • 8.
    05/22/15 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.
  • 9.
    Older Gluster VolumeConfiguration Storage devices LV Volume Group Brick1 Brick2 LV mount
  • 10.
    New Volume Configurationfor Snapshot Storage devices Thin LV Volume GroupBrick1 Brick2 mount Thin Pool mount Thin LV Thin Pool mount
  • 11.
    AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Commands ● Future Work ● Q&A
  • 12.
    Accessing Snapshots ● Snapshotsare 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>
  • 13.
    User Serviceable Snapshotsin 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
  • 14.
    User Serviceable Snapshots ●Snap Daemon ● GFAPI Based ● CIFS and NFS Access
  • 15.
    AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Features ● Future Work ● Q&A
  • 16.
    Snapshot Clone ● Writablesnapshot volume ● Space-efficient clone of snapshot. ● Back-end LVM is shared between the original Snapshot and the clone ● Similar to snapshot create
  • 17.
    Snapshot Scheduling ● Providesnapshot scheduling capability. ● Based on cron ● Internally uses a meta-volume to manage scheduling ● Accepts same syntax as cron ● snap_scheduler.py provides the scheduling functionality
  • 18.
    Other Snapshot Commands ●Create ● Delete ● Info ● Status ● Config ● Restore
  • 19.
    Snapshot config ● Snap-max-hard-limit– Beyond witch snapshot create will fail ● Snap-max-soft-limit – Warning generated if this limit is crossed ● Auto-delete – If enabled oldest snapshot will be deleted when snapshot count crosses soft limit ● Activate-on-create – activate the snapshot on creation
  • 20.
    AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Features ● Future Work ● Q&A
  • 21.
    Future Work ● Plug-ablesnapshot architecture for different types of back-end. ● Reduce resource consumption – Activate on access. – More options for admin to choose different retention policies. ● Migrate to liblvm
  • 22.
    AGENDA ● Introduction ● SupportedConfiguration ● Accessing Snapshot ● Additional Features ● Future Work ● Q&A