2012-10-26 09:34 PM
I'm using snapdrive for Linux and have a question about its usage.
Is it possible to connect all filesystems within a snapshot to the host using an absolute path? I would like to mount all volumes within a diskgroup to an absolute location such as /backup.
So for instance if I have a volume group with three logical volumes normally mounted as:
I would like to be able to run a snap connect command that will mount them automatically to /backup/a, /backup/b, /backup/c.
The -autorename function just appends a _1 to the existing path.. which is not terribly useful!
Any help would be appreciated.
Solved! SEE THE SOLUTION
2012-10-29 01:55 AM
You can try something as shown below:
# df -k
11895 1138 10143 11% /mnt/sdu1
11895 1138 10143 11% /mnt/sdu2
# snapdrive snap create -vg vg1 -snapname snapvg1
[root@node2 ~]# snapdrive snap connect -fs /mnt/sdu1 /mnt/a -destvg vg2 -fs /mnt/sdu2 /mnt/b -destvg vg2 -snapname filer:/vol/volsdu:snapvg1
creating unrestricted volume clone filer:/vol/Snapdrive_volsdu_volume_clone_from_snap
mapping new lun(s) ... done
discovering new lun(s) ... done
Successfully connected to snapshot filer:/vol/volsdu:snapvg1
disk group vg2 containing host volumes
lvol1 (filesystem: /mnt/a)
lvol2 (filesystem: /mnt/b)
2012-10-29 07:15 AM
Thanks Himanshu. I was aware that I could specify source and destination mount locations.. unfortunately in my environment I am dealing with dozens of them so it's a pain to do manually and complex to script. Ideally what I need is something like:
snapdrive snap connect vg1 vg2 -path /newmountpoint
Which would be a simple way of just saying.. take the stuff that's in the snapshot and mount it relative to /newmountpoint. Now that I think about it, I actually have this question titled incorrectly - what I need is a way to mount it using a relative path! Oops!