* [linux-lvm] CLVM Snapshot HOWTO?
@ 2009-03-24 2:58 Paul Dugas
2009-03-24 3:34 ` Vu Pham
0 siblings, 1 reply; 4+ messages in thread
From: Paul Dugas @ 2009-03-24 2:58 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
I apologize if this has been covered already or is written up elsewhere
but I can't seem to find it. I've got a couple of AoE volumes that I'm
using for LVM VGs. They have GFS filesystems on LVs that are sized to
fill 90% of the the VGs; 10% space left over for snapshots. I have 4
CENTOS 5.2 machines clustered and mounting the GFS filesystems. That's
working well.
Having used LVM snapshots in non-cluster environments before, I figured
I'd just use the same logic for backing up the volumes; lvcreate -s,
mount, backup, umount, lvremove. This quickly fell apart and I started
to think about it more. I ended up wondering how snapshots of the
volume could ever really work without coordinating with the other
nodes.
My question is this. Should I be able to use snapshots on clustered
volumes like this? If not, are there plans to support it later? If so,
can someone point me to a working example?
Thanks in advance,
Paul
--
Paul Dugas - paul@dugas.cc - 404.932.1355
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] CLVM Snapshot HOWTO?
2009-03-24 2:58 [linux-lvm] CLVM Snapshot HOWTO? Paul Dugas
@ 2009-03-24 3:34 ` Vu Pham
2009-03-25 4:15 ` Paul Dugas
0 siblings, 1 reply; 4+ messages in thread
From: Vu Pham @ 2009-03-24 3:34 UTC (permalink / raw)
To: LVM general discussion and development
Paul Dugas wrote:
> I apologize if this has been covered already or is written up elsewhere
> but I can't seem to find it. I've got a couple of AoE volumes that I'm
> using for LVM VGs. They have GFS filesystems on LVs that are sized to
> fill 90% of the the VGs; 10% space left over for snapshots. I have 4
> CENTOS 5.2 machines clustered and mounting the GFS filesystems. That's
> working well.
>
> Having used LVM snapshots in non-cluster environments before, I figured
> I'd just use the same logic for backing up the volumes; lvcreate -s,
> mount, backup, umount, lvremove. This quickly fell apart and I started
> to think about it more. I ended up wondering how snapshots of the
> volume could ever really work without coordinating with the other
> nodes.
>
> My question is this. Should I be able to use snapshots on clustered
> volumes like this? If not, are there plans to support it later? If so,
> can someone point me to a working example?
>
I think you have to freeze the GFS volume before you create a snapshot,
then you unfreeze it. man gfs_tool
Vu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] CLVM Snapshot HOWTO?
2009-03-24 3:34 ` Vu Pham
@ 2009-03-25 4:15 ` Paul Dugas
2009-03-25 13:05 ` vu pham
0 siblings, 1 reply; 4+ messages in thread
From: Paul Dugas @ 2009-03-25 4:15 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 2314 bytes --]
On Mon, 2009-03-23 at 22:34 -0500, Vu Pham wrote:
> Paul Dugas wrote:
> > I apologize if this has been covered already or is written up elsewhere
> > but I can't seem to find it. I've got a couple of AoE volumes that I'm
> > using for LVM VGs. They have GFS filesystems on LVs that are sized to
> > fill 90% of the the VGs; 10% space left over for snapshots. I have 4
> > CENTOS 5.2 machines clustered and mounting the GFS filesystems. That's
> > working well.
> >
> > Having used LVM snapshots in non-cluster environments before, I figured
> > I'd just use the same logic for backing up the volumes; lvcreate -s,
> > mount, backup, umount, lvremove. This quickly fell apart and I started
> > to think about it more. I ended up wondering how snapshots of the
> > volume could ever really work without coordinating with the other
> > nodes.
> >
> > My question is this. Should I be able to use snapshots on clustered
> > volumes like this? If not, are there plans to support it later? If so,
> > can someone point me to a working example?
> >
>
> I think you have to freeze the GFS volume before you create a snapshot,
> then you unfreeze it. man gfs_tool
That's what I was looking for. Much thanks for getting me further but I
think I'm still missing a step. Currently, this is what my "pre-backup"
script is doing:
COOKIE=`gfs_tool list | egrep " $LK_TBL_NM.[0-9][0-9]*\$" | awk '{print \$1}'`
gfs_tool freeze $COOKIE
lvcreate --size ${SIZE} --snapshot --name SNAP /dev/${VG}/${LV}
gfs_tool unfreeze $COOKIE
gfs_fsck -y /dev/${VG}/SNAP
mount -t gfs -o ro,lockproto=lock_nolock /dev/${VG}/SNAP ${MNTPT}
I'm getting a "File Exists" error from the mount which I believe is
because I'm trying to mount both the device and the snapshot at the same
time and they share the same lock-table-name. Now that I think of it,
I don't really need to mount the original version of the file system so
I may be able to move past this hitch but I'm wondering if there's a
good way to address this? Could I rename the lock table via "gfs_tool
sb /dev/${VG}/$SNAP table $LK_TBL_NM.SNAP" to get around it? Would that
change be cleared when the snapshot is removed?
P
--
Paul Dugas - paul@dugas.cc - 404.932.1355
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] CLVM Snapshot HOWTO?
2009-03-25 4:15 ` Paul Dugas
@ 2009-03-25 13:05 ` vu pham
0 siblings, 0 replies; 4+ messages in thread
From: vu pham @ 2009-03-25 13:05 UTC (permalink / raw)
To: LVM general discussion and development
Paul Dugas wrote:
> On Mon, 2009-03-23 at 22:34 -0500, Vu Pham wrote:
>> Paul Dugas wrote:
>>> I apologize if this has been covered already or is written up elsewhere
>>> but I can't seem to find it. I've got a couple of AoE volumes that I'm
>>> using for LVM VGs. They have GFS filesystems on LVs that are sized to
>>> fill 90% of the the VGs; 10% space left over for snapshots. I have 4
>>> CENTOS 5.2 machines clustered and mounting the GFS filesystems. That's
>>> working well.
>>>
>>> Having used LVM snapshots in non-cluster environments before, I figured
>>> I'd just use the same logic for backing up the volumes; lvcreate -s,
>>> mount, backup, umount, lvremove. This quickly fell apart and I started
>>> to think about it more. I ended up wondering how snapshots of the
>>> volume could ever really work without coordinating with the other
>>> nodes.
>>>
>>> My question is this. Should I be able to use snapshots on clustered
>>> volumes like this? If not, are there plans to support it later? If so,
>>> can someone point me to a working example?
>>>
>> I think you have to freeze the GFS volume before you create a snapshot,
>> then you unfreeze it. man gfs_tool
>
> That's what I was looking for. Much thanks for getting me further but I
> think I'm still missing a step. Currently, this is what my "pre-backup"
> script is doing:
>
> COOKIE=`gfs_tool list | egrep " $LK_TBL_NM.[0-9][0-9]*\$" | awk '{print \$1}'`
> gfs_tool freeze $COOKIE
> lvcreate --size ${SIZE} --snapshot --name SNAP /dev/${VG}/${LV}
> gfs_tool unfreeze $COOKIE
> gfs_fsck -y /dev/${VG}/SNAP
> mount -t gfs -o ro,lockproto=lock_nolock /dev/${VG}/SNAP ${MNTPT}
>
> I'm getting a "File Exists" error from the mount which I believe is
> because I'm trying to mount both the device and the snapshot at the same
> time and they share the same lock-table-name. Now that I think of it,
> I don't really need to mount the original version of the file system so
> I may be able to move past this hitch but I'm wondering if there's a
> good way to address this? Could I rename the lock table via "gfs_tool
> sb /dev/${VG}/$SNAP table $LK_TBL_NM.SNAP" to get around it? Would that
> change be cleared when the snapshot is removed?
>
I believe that anything changed on the snap device won't affect the
original device. The changes will go to the COW dev, which is created
when you create the snap dev.
Vu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-25 12:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 2:58 [linux-lvm] CLVM Snapshot HOWTO? Paul Dugas
2009-03-24 3:34 ` Vu Pham
2009-03-25 4:15 ` Paul Dugas
2009-03-25 13:05 ` vu pham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).