SNAPSHOTS IN RED HAT STORAGE SERVER/GlusterFS
Anand SubramanianSenior Principal Engineer, Red Hat
Rajesh JosephPrincipal Engineer, Red Hat
AGENDA
•Introduction
•Snapshot CLI commands
•Snapshot features : user-serviceable snaps
•Snapshot recommendations
•Roadmap, Future Directions
•Q&A
RHS Overview
• Open software-defined storage solution
• Based on GlusterFS : scale-out, distributed file-system
•No external metadata servers•Scale-out with Elasticity•Extensible and modular
• RHS volume : unified namespace for the distributed file-system
• Access using GlusterFS native/FUSE, NFS, SMB and HTTP protocols
•
RHS Bricks
• A brick is the combination of a node and an export directory – for e.g. hostname:/dir
• Each brick inherits limits of the underlying filesystem
• No limit on the number bricks per node
Storage Node Storage Node Storage Node
Two Bricks One BrickThree Bricks
RHS Volume
• A volume is a logical collection of bricks.
• Volume is identified by an administrator provided name.
• Volume is a mountable entity and the volume name is provided at the time of mounting.
•mount -t glusterfs server1:/<volname> /my/mnt/point
• Bricks from the same node can be part of different volumes
Red Hat Storage Volume
RHS Volume
Storage Node Storage Node Storage Node
Brick Brick Brick Brick
Snapshots in RHS
•Volume level snapshots
•LVM2 based
•Operates only on thin-provisioned volumes
•Snapshots themselves are thin-provisioned snapshot volumes
•A GlusterFS volume snapshot consists of snapshots of the individual bricks making up the volume
•Snapshot of a GlusterFS volume is also a GlusterFS volume
•Crash consistent
Logical Volume Manager (LVM) 2
•Creates a layer of abstraction over physical storage (PVs)
•Volume Groups •One or more physical disks
•Logical Volumes•Thinly provisioned
Thinly Provisioned LVM2 Volume & Snapshot
Storage devices
Thin LV SnapshotThin LV Thin LV
Thin Pool Thin Pool
Volume Group
Red Hat Storage Snapshot
RHS Volume
Storage Node Storage Node
Brick1 Brick2 Brick3 Brick4
Brick1_s1 Brick2_s1Brick4_s1Brick3_s1
Snapshot volume
AGENDA
•Introduction
•Snapshot CLI commands
•Snapshot features : user-serviceable snaps
•Snapshot recommendations
•Roadmap, Future Directions
•Q&A
SNAPSHOT CLI COMMANDS
•Create
•Restore
•Delete
•List
•Info
•Status
•Config
Snapshot Create
gluster snapshot create <snapname> <volname(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 Restore
gluster snapshot restore <snapname>
•Volume should be stopped
•Brick paths will be changed after restore
•Once the snapshot is restored it will be deleted
Snapshot Delete
gluster snapshot delete <snapname>
•Snapshot including the backend lvm will be removed
•Snapshot volume will be stopped before deleting it.
Snapshot List
gluster snapshot list [volname]
•List will display only snap names
Snapshot Info
gluster snapshot info [(<snapname> | volume <volname>)]
•Info will provide details about the snap
Snapshot Status
gluster snapshot status [(<snapname> | volume <volname>)]
•Status will provide brick details and backend data (LVM)
Snapshot config
gluster snapshot config [volname]
gluster snapshot config [volname] [<snapmaxhardlimit> <count>] [<snapmax
softlimit> <percentage>] [force]
•Configure maximum allowed snapshot for a volume
•Configure maximum allowed snapshot for the entire cluster
•Display the current configuration
AGENDA
•Introduction
•Snapshot CLI commands
•Snapshot features : user-serviceable snaps
•Snapshot recommendations
•Roadmap, Future Directions
•Q&A
User Serviceable Snapshots in RHS
•Users can access snapshots of a volume without admin intervention ; ease of access
•“Wormhole” into the past – into any snapshot volume
•Read-only snapshot volumes
•cd to “.snaps” virtual directory anywhere in the filesystem to access your data
User Serviceable Snapshots in RHS
• cd $HOME (say, /home/john)
• ls
dir1/ dir2/ file1
• cd dir2
• ls
file10 file15
• cd .snaps
• ls
nightly.0/ nightly.1/ weekly.0/ weekly.1/
• cd weekly.0/
User Serviceable Snapshots in RHS
• pwd
/home/john/dir2/.snaps/weekly.0/
•ls
file10 file20 file30 file40
• cp p file30 $HOME/dir2/
AGENDA
•Introduction
•Snapshot CLI commands
•Snapshot features : user-serviceable snaps
•Snapshot recommendations
•Roadmap, Future Directions
•Q&A
Recommendations
•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
Thin LV
mount
Thin Pool
mount
Snapshot Future
•Snapshot of multiple volume
•Snapshot scheduling
•Geo-replication with snapshot
•Pluggable snapshot support : Btrfs
•Writable snapshots
•Support for snap aware applications
Check Out Other Red Hat Storage Activities at The Summit
•Enter the raffle to win tickets for a $500 gift card or trip to LegoLand!• Entry cards available in all storage sessions - the more you attend, the more chances you have to
win!
•Talk to Storage Experts:
• Red Hat Booth (# 211)
• Infrastructure • Infrastructure-as-a-Service
•Storage Partner Solutions Booth (# 605)
•Upstream Gluster projects
• Developer Lounge
Follow us on Twitter, Facebook: @RedHatStorage