All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Newbie to snapshot
@ 2003-05-18  5:41 armani
  2003-05-18  8:21 ` Toby
  0 siblings, 1 reply; 4+ messages in thread
From: armani @ 2003-05-18  5:41 UTC (permalink / raw)
  To: linux-lvm

Hello List

I am a newbie to use LVM.

When I read the HowTo on
http://www.linux.org/docs/ldp/howto/LVM-HOWTO/snapshots_backup.html
I tried to practice it with my Linux Box.

Everything is fine but snapshot !

==============================================================
[root@met tmp]# lvscan
lvscan -- ACTIVE   Original "/dev/Vol1/LV1" [10 GB]
lvscan -- ACTIVE            "/dev/Vol1/LV2" [2 GB]
lvscan -- ACTIVE            "/dev/Vol1/LV3" [2 GB]
lvscan -- ACTIVE            "/dev/Vol1/LV4" [2 GB]
lvscan -- ACTIVE   Snapshot "/dev/Vol1/snapshot" [1.97 GB] of /dev/Vol1/LV1
lvscan -- 5 logical volumes with 17.97 GB total in 1 volume group
lvscan -- 5 active logical volumes
==============================================================

As the description, I make a Original LV device named /dev/Vol1/LV1,
and then I make a snapshot device named "/dev/Vol1/snapshot" for
/dev/Vol1/LV1 .
So I try to put something for /dev/Vol1/LV1

# mount /dev/Vol1/LV1 /mnt/LV1
# mount /dev/Vol1/snapshot /mnt/snapshot [ I'm using ext3 ]
# dd if=/dev/zero of=/mnt/LV1/test bs=1M count=10

and then
# tar cf /dev/hda8 /mnt/snapshot or # tar cf /tmp/test.tar /mnt/snapshot
but I can't see any file except the "/mnt/snapshot/lost+found" directory
with the following command !!
# tar xf /dev/hda8 or # tar xf /tmp/test.tar

I don't have any idea to use this snapshot, any suggested references ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Newbie to snapshot
  2003-05-18  5:41 [linux-lvm] Newbie to snapshot armani
@ 2003-05-18  8:21 ` Toby
  2003-05-18  9:58   ` armani
  0 siblings, 1 reply; 4+ messages in thread
From: Toby @ 2003-05-18  8:21 UTC (permalink / raw)
  To: linux-lvm

armani wrote:
> Hello List
> 


> 
> As the description, I make a Original LV device named /dev/Vol1/LV1,
> and then I make a snapshot device named "/dev/Vol1/snapshot" for
> /dev/Vol1/LV1 .
> So I try to put something for /dev/Vol1/LV1
> 
> # mount /dev/Vol1/LV1 /mnt/LV1
> # mount /dev/Vol1/snapshot /mnt/snapshot [ I'm using ext3 ]
> # dd if=/dev/zero of=/mnt/LV1/test bs=1M count=10
> 

A snapshot will only capture what you have in the fs at the moment you
create the snapshot - like a photograph. After creation, the two are
totally independent of each other ( for most practical purposes.)

So to test it, just make another snapshot. The 2nd snapshot will now
contain your 10M test file. If you delete it out of the original fs, the
2nd snapshot will still have your test file.


-toby

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Newbie to snapshot
  2003-05-18  8:21 ` Toby
@ 2003-05-18  9:58   ` armani
  2003-05-20  2:36     ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 4+ messages in thread
From: armani @ 2003-05-18  9:58 UTC (permalink / raw)
  To: linux-lvm

Thanks for toby's explainations!
==
Eventually I create a new snapshot of my LV partition.
But I have another problem with the snapshot of LV.
That is how much snapshot I could create for my LV partition ?
As I know some commercial software could create 254 snapshots for one LV
such as IBM.

So I try to create another snapshot for LV by issuing the following command:

This is my first snapshot for /dev/Vol1/LV1

[root@met root]# lvcreate --size 100M -s -nsnapshot /dev/Vol1/LV1
lvcreate -- WARNING: the snapshot will be automatically disabled once it
gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for
"/dev/Vol1/snapshot"
lvcreate -- doing automatic backup of "Vol1"
lvcreate -- logical volume "/dev/Vol1/snapshot" successfully created

I tried to create another snapshot for /dev/Vol1/LV1

[root@met root]# lvcreate --size 100M -s -nsnapshot1 /dev/Vol1/LV1
lvcreate -- WARNING: the snapshot will be automatically disabled once it
gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for
"/dev/Vol1/snapshot1"
lvcreate -- doing automatic backup of "Vol1"
lvcreate -- logical volume "/dev/Vol1/snapshot1" successfully created

And how can I estimate the sizes and counts for them ?
Is there any rules or principles to formalize the procedures ?


> A snapshot will only capture what you have in the fs at the moment you
-- snip --
> -toby

-- Armani Liao

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Newbie to snapshot
  2003-05-18  9:58   ` armani
@ 2003-05-20  2:36     ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 4+ messages in thread
From: Heinz J . Mauelshagen @ 2003-05-20  2:36 UTC (permalink / raw)
  To: linux-lvm

On Sun, May 18, 2003 at 10:58:23PM +0800, armani wrote:
> Thanks for toby's explainations!
> ==
> Eventually I create a new snapshot of my LV partition.
> But I have another problem with the snapshot of LV.
> That is how much snapshot I could create for my LV partition ?
> As I know some commercial software could create 254 snapshots for one LV
> such as IBM.
> 
> So I try to create another snapshot for LV by issuing the following command:
> 
> This is my first snapshot for /dev/Vol1/LV1
> 
> [root@met root]# lvcreate --size 100M -s -nsnapshot /dev/Vol1/LV1
> lvcreate -- WARNING: the snapshot will be automatically disabled once it
> gets full
> lvcreate -- INFO: using default snapshot chunk size of 64 KB for
> "/dev/Vol1/snapshot"
> lvcreate -- doing automatic backup of "Vol1"
> lvcreate -- logical volume "/dev/Vol1/snapshot" successfully created
> 
> I tried to create another snapshot for /dev/Vol1/LV1
> 
> [root@met root]# lvcreate --size 100M -s -nsnapshot1 /dev/Vol1/LV1
> lvcreate -- WARNING: the snapshot will be automatically disabled once it
> gets full
> lvcreate -- INFO: using default snapshot chunk size of 64 KB for
> "/dev/Vol1/snapshot1"
> lvcreate -- doing automatic backup of "Vol1"
> lvcreate -- logical volume "/dev/Vol1/snapshot1" successfully created
> 
> And how can I estimate the sizes and counts for them ?

lvdisplay /dev/Vol1/snapsh*

> Is there any rules or principles to formalize the procedures ?

There's no tool in the LVM distro for that so far.
You can write a script (Shell, Perl, ...) around lvdisplay to
create alerts when a snapshot runs out of space or extend it automatically.

> 
> 
> > A snapshot will only capture what you have in the fs at the moment you
> -- snip --
> > -toby
> 
> -- Armani Liao
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-20  2:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18  5:41 [linux-lvm] Newbie to snapshot armani
2003-05-18  8:21 ` Toby
2003-05-18  9:58   ` armani
2003-05-20  2:36     ` Heinz J . Mauelshagen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.