Link to home
Start Free TrialLog in
Avatar of sajanagr1
sajanagr1

asked on

LVM question

hi

I wanted to know if it is somehow possible to create an LV's snapshot in another VG.

For eg. I have 2 VGs - VG1 and VG2 and create LV1 on VG1 and then create a snapshot of LV1 such that it is stored in VG1.

Any advice is greatly appreciated.
Avatar of WizRd-Linux
WizRd-Linux
Flag of Australia image

Avatar of sajanagr1
sajanagr1

ASKER

Oh... I did a small mistake to my query .. i want the snapshot of LV1 in VG2..


Thanks
Where do you want to snapshot it too?  As such, logical volumes to support true snapshots like a SAN.
I want to snapshot  LV1 of VG1 to VG2. Having snapshots in the same VG is not difficult, but what I am looking for is if there is a probability of doing in different one ?
Avatar of ai_ja_nai
Of course, not.
A snapshot belongs to a specified volume.

Did you want to sync changes between a storage and its backup?
Yes, how to do that ?
use a proper backup program, like rsync; for example

rsync -avPh /mountpoint1/ /mountpoint2/
hi

Let me explain my scenario in more detail..

I have VG1 and LV1 in VG1 and then mirror this remotely in different system, now what I want to see here is that whatever snapshots I had created in VG1 are filtered, so I am looking for a mechanism (if there) to filter out these snapshots when mirroring,..the data size is in TBs .

thank you
>whatever snapshots I had created in VG1 are filtered

what do you mean by filtered?
i dont want the snapshots to be mirrored too, is it possible?
as far as I know, a snapshot is treated as a logical volume alone. So, as far as you deal with the standard LV you shouldn't mess with the snapshot. Just mount the volumes (not the snapshots) and call rsync on the mountpoints
thanks ai_ja_nai

Seems like VG cannot be mirrored without the snapshots ..


Sorry, I did not realize a couple of posts earlier that you were referring to LVM, when talking about excluding snapshots from being mirrored... I thought you were talking about rsync.

LVM is not made for mirroring purposes. It's made to manage dinamically volumes and take snapshots of volume states.
A reliable mirror system is provided by a RAID1 configuration.

Hmm.. i realise the RAID 1 concept, I was just wandering if my query could be remedied because Snapshot has metadata about LV, LV about VG, but it would be challenging to have a snapshot metadata modifed in such a way that even having the metadata of the LV it (the snapshot) resides in some other VG, that will achieve my quest.

If experts think it is possible please let me know, if not why?

thank you
I beg your pardon, how are you currently mirroring your vg?
using DRBD
So, are you using drbd as a physical device for LVM?
yes
ASKER CERTIFIED SOLUTION
Avatar of ai_ja_nai
ai_ja_nai
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmmm.. exactly what I thought so.... well after last one week of research didn't find me anything to solve my query.. so I think it concludes that creating a snapshot in another VG is not possible...


@ai_ja_nai : Thanks for your constant support , really appreciate it.