Hi, i am trying to use snapshot feature using gluster 3.6.1, i am not sure how i can make the client see the snapshot. i created a replica volume on 2 servers, the bricks were mounted from thin lvm volumes: gluster vol create gvol1 replica 2 storage1:/gluster-server/mount1/brick1 storage2:/gluster-server/mount1/brick1 i also created a snapshot: gluster snapshot create gvol1-snap1 gvol1 it returns success, i can see the snapshot using: gluster snapshot list gluster snapshot info gvol1-snap1 ( shows Status started ) gluster snapshot status gvol1-snap1 ( Shows brick path /var/run/gluster/snaps/XX on both storage servers ) i can also see the snapshot with preserved data mounted in /var/run/gluster/snaps/XX 1) Now how do i access this snapshot from a client ? if i try to run mount -t glusterfs storage1:gvol1-snap1 /gluster-client/gvol1-snap1 this does not work, it does not give an error but the mount is empty 2) i also tried using uss ( user servicable snapshots ) gluster volume set gvol1 features.uss enable returned success but i do not see the .snap dirs in my main mount. Any help very much appreciated /Maged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20141128/fda1c627/attachment.html>
On 11/29/2014 01:24 AM, Maged Mokhtar wrote:> i am trying to use snapshot feature using gluster 3.6.1, i am not sure > how i can make the client see the snapshot. > > i created a replica volume on 2 servers, the bricks were mounted from > thin lvm volumes: > gluster vol create gvol1 replica 2 > storage1:/gluster-server/mount1/brick1 > storage2:/gluster-server/mount1/brick1 > > i also created a snapshot: > gluster snapshot create gvol1-snap1 gvol1 > > it returns success, i can see the snapshot using: > gluster snapshot list > gluster snapshot info gvol1-snap1 ( shows Status started ) > gluster snapshot status gvol1-snap1 ( Shows brick path > /var/run/gluster/snaps/XX on both storage servers ) > > i can also see the snapshot with preserved data mounted in > /var/run/gluster/snaps/XX > > 1) Now how do i access this snapshot from a client ? if i try to run > mount -t glusterfs storage1:gvol1-snap1 /gluster-client/gvol1-snap1 > this does not work, it does not give an error but the mount is empty > > 2) i also tried using uss ( user servicable snapshots ) > gluster volume set gvol1 features.uss enable > returned success but i do not see the .snap dirs in my main mount.The section on accessing snapshots in admin guide [1] might be useful to get this going. -Vijay [1] https://github.com/gluster/glusterfs/blob/master/doc/admin-guide/en-US/markdown/admin_managing_snapshots.md
----- Original Message -----> From: "Maged Mokhtar" <magedsmokhtar at gmail.com> > To: gluster-users at gluster.org > Sent: Saturday, November 29, 2014 1:24:07 AM > Subject: [Gluster-users] accessing snapshot from client > > Hi, > > i am trying to use snapshot feature using gluster 3.6.1, i am not sure how i > can make the client see the snapshot. > > i created a replica volume on 2 servers, the bricks were mounted from thin > lvm volumes: > gluster vol create gvol1 replica 2 storage1:/gluster-server/mount1/brick1 > storage2:/gluster-server/mount1/brick1 > > i also created a snapshot: > gluster snapshot create gvol1-snap1 gvol1 > > it returns success, i can see the snapshot using: > gluster snapshot list > gluster snapshot info gvol1-snap1 ( shows Status started ) > gluster snapshot status gvol1-snap1 ( Shows brick path > /var/run/gluster/snaps/XX on both storage servers ) > > i can also see the snapshot with preserved data mounted in > /var/run/gluster/snaps/XX > > 1) Now how do i access this snapshot from a client ? if i try to run > mount -t glusterfs storage1:gvol1-snap1 /gluster-client/gvol1-snap1 > this does not work, it does not give an error but the mount is emptyThe syntax is not correct. You should mount the snapshot with the following command: mount -t glusterfs <hostname>:/snaps/<snapname>/<parent-volname> /mount_point e.g. mount -t glusterfs storage1:/snaps/gvol1-snap1/gvol1 /gluster-client/gvol1-snap1> > 2) i also tried using uss ( user servicable snapshots ) > gluster volume set gvol1 features.uss enable > returned success but i do not see the .snap dirs in my main mount..snaps folder is a virtual folder and is not visible in the mount. User need to explicitly cd into the .snaps folder. e.g. if you run "ls -a" on /gluster-client/gvol1-snap1 folder you will not see .snaps folder but you can cd into /gluster-client/gvol1-snap1/.snaps folder. Hope that helps. Best Regards, Rajesh