• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

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.
0
sajanagr1
Asked:
sajanagr1
  • 10
  • 8
  • 2
1 Solution
 
WizRd-LinuxCommented:
0
 
sajanagr1Author Commented:
Oh... I did a small mistake to my query .. i want the snapshot of LV1 in VG2..


Thanks
0
 
WizRd-LinuxCommented:
Where do you want to snapshot it too?  As such, logical volumes to support true snapshots like a SAN.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
sajanagr1Author Commented:
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 ?
0
 
ai_ja_naiCommented:
Of course, not.
A snapshot belongs to a specified volume.

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

rsync -avPh /mountpoint1/ /mountpoint2/
0
 
sajanagr1Author Commented:
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
0
 
ai_ja_naiCommented:
>whatever snapshots I had created in VG1 are filtered

what do you mean by filtered?
0
 
sajanagr1Author Commented:
i dont want the snapshots to be mirrored too, is it possible?
0
 
ai_ja_naiCommented:
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
0
 
sajanagr1Author Commented:
thanks ai_ja_nai

Seems like VG cannot be mirrored without the snapshots ..


0
 
ai_ja_naiCommented:
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.
0
 
sajanagr1Author Commented:

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
0
 
ai_ja_naiCommented:
I beg your pardon, how are you currently mirroring your vg?
0
 
sajanagr1Author Commented:
using DRBD
0
 
ai_ja_naiCommented:
So, are you using drbd as a physical device for LVM?
0
 
sajanagr1Author Commented:
yes
0
 
ai_ja_naiCommented:
Ok, then you are screwed, since a snapshot resides in its VG. And all the VG is mirrored by DRBD. The only thing you can do is to make a snapshot, dd it to another place and then remove it, so that drbd frees the space. But it won't prevent the transfer for the sync after the creation, while you dd it.

Unless you can deactivate the synch mechanism before you create the snapshot and reactivate it after you deleted it
0
 
sajanagr1Author Commented:
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.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 10
  • 8
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now