All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] restoring filesystem state using snapshot
@ 2004-01-08 12:21 kanika nema
  2004-01-08 17:22 ` Ken Fuchs
  0 siblings, 1 reply; 5+ messages in thread
From: kanika nema @ 2004-01-08 12:21 UTC (permalink / raw)
  To: linux-lvm

hi,
i want to restore the filesystem state using only the snapshot taken by LVM 
ie without taking a full backup.
is this possible to do? i read all the lvm commands, but there is no command 
to actually restore the entire filesystem back to the state it was in, when 
the snapshot was taken.
though the old files' state can be viewed using the snapshot volume, i want 
to take the filesystem back to the prev state.
Please tell me if this can be done. its urgent.
thx,
K

_________________________________________________________________
Free transactions in any ATM across India. 
http://server1.msn.co.in/msnleads/suvidha/dec03.asp?type=hottag Click here.

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

* Re: [linux-lvm] restoring filesystem state using snapshot
  2004-01-08 12:21 [linux-lvm] restoring filesystem state using snapshot kanika nema
@ 2004-01-08 17:22 ` Ken Fuchs
  2004-01-09  9:57   ` Cameron Hutchison
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Fuchs @ 2004-01-08 17:22 UTC (permalink / raw)
  To: linux-lvm

Kanika Nema wrote:

>i want to restore the filesystem state using only the snapshot taken by LVM 
>ie without taking a full backup.
>is this possible to do? i read all the lvm commands, but there is no command 
>to actually restore the entire filesystem back to the state it was in, when 
>the snapshot was taken.
>though the old files' state can be viewed using the snapshot volume, i want 
>to take the filesystem back to the prev state.
>Please tell me if this can be done. its urgent.

Will copying the contents of the snapshot over the original logical
volume do what you want?  If so, this can be done as follows:

# mount /dev/vg/snapshot /snap
# mount /dev/vg/original /orig
# (cd /snap; tar cf - .) | (cd /orig; tar xvf -)

Of course the v option on the second tar invocation can be omitted to
avoid seeing all the filenames of the files being copied.

Sincerely,

Ken Fuchs <kfuchs@winternet.com>

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

* RE: [linux-lvm] restoring filesystem state using snapshot
@ 2004-01-08 17:25 Little, Chris
  0 siblings, 0 replies; 5+ messages in thread
From: Little, Chris @ 2004-01-08 17:25 UTC (permalink / raw)
  To: 'linux-lvm@sistina.com'

Will that work since snapshot relies on the source?

> -----Original Message-----
> From: Ken Fuchs [mailto:kfuchs@winternet.com]
> Sent: Thursday, January 08, 2004 4:26 PM
> To: linux-lvm@sistina.com
> Subject: Re: [linux-lvm] restoring filesystem state using snapshot
> 
> 
> Kanika Nema wrote:
> 
> >i want to restore the filesystem state using only the 
> snapshot taken by LVM 
> >ie without taking a full backup.
> >is this possible to do? i read all the lvm commands, but 
> there is no command 
> >to actually restore the entire filesystem back to the state 
> it was in, when 
> >the snapshot was taken.
> >though the old files' state can be viewed using the snapshot 
> volume, i want 
> >to take the filesystem back to the prev state.
> >Please tell me if this can be done. its urgent.
> 
> Will copying the contents of the snapshot over the original logical
> volume do what you want?  If so, this can be done as follows:
> 
> # mount /dev/vg/snapshot /snap
> # mount /dev/vg/original /orig
> # (cd /snap; tar cf - .) | (cd /orig; tar xvf -)
> 
> Of course the v option on the second tar invocation can be omitted to
> avoid seeing all the filenames of the files being copied.
> 
> Sincerely,
> 
> Ken Fuchs <kfuchs@winternet.com>
> 
> _______________________________________________
> 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/
> 

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

* Re: [linux-lvm] restoring filesystem state using snapshot
  2004-01-08 17:22 ` Ken Fuchs
@ 2004-01-09  9:57   ` Cameron Hutchison
  0 siblings, 0 replies; 5+ messages in thread
From: Cameron Hutchison @ 2004-01-09  9:57 UTC (permalink / raw)
  To: linux-lvm

Once upon a time Ken Fuchs said...
> 
> >i want to restore the filesystem state using only the snapshot taken by LVM 
> >ie without taking a full backup.
> 
> Will copying the contents of the snapshot over the original logical
> volume do what you want?  If so, this can be done as follows:
> 
> # mount /dev/vg/snapshot /snap
> # mount /dev/vg/original /orig
> # (cd /snap; tar cf - .) | (cd /orig; tar xvf -)

rsync would probably be a better option - it will copy far less and will
remove any files added after the snapshot was taken (if invoked
appropriately). /orig should end up as a replica of /snap.

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

* Re: [linux-lvm] restoring filesystem state using snapshot
@ 2004-01-09 13:19 kanika nema
  0 siblings, 0 replies; 5+ messages in thread
From: kanika nema @ 2004-01-09 13:19 UTC (permalink / raw)
  To: linux-lvm

hi,

i was having some problems installing lvm.

1. when i try to change the partition type using fdisk, i get a msg sayin
"No partition created yet!"

i have a 3gb hdd, with 3 partitions
hdb1  --- ext2
hdb5 --- swap
hdb6 --- ext2 ( abt 800mb)

2. so, then i did vgscan, followed by pvcreate on hdb6 without changing the 
partition type.
After this i got a file system error, and linux crashed.

Then i created a new partition for lvm
1. i added this partion by using 'n' command of fdisk.
2. then set the type of this partition to 8E.

A partition hdb3 of linux lvm type was created (along with hdb1,hdb5,hdb6).

3. i ran a vgscan,
4. then did pvcreate as follows
$pvcreate /dev/hdb3

It gave me a msg saying "Cannot read partition to to find 
PhysicalVolumeSize"

I have read all the How-tos i cud,but still not helpful.
Pls tell me what shud i do.

i will try rsync....once i install lvm.

regards,
K

>From: Cameron Hutchison <camh@xdna.net>
>Reply-To: linux-lvm@sistina.com
>To: linux-lvm@sistina.com
>Subject: Re: [linux-lvm] restoring filesystem state using snapshot
>Date: Fri, 9 Jan 2004 10:31:18 +1100
>
>Once upon a time Ken Fuchs said...
> >
> > >i want to restore the filesystem state using only the snapshot taken by 
>LVM
> > >ie without taking a full backup.
> >
> > Will copying the contents of the snapshot over the original logical
> > volume do what you want?  If so, this can be done as follows:
> >
> > # mount /dev/vg/snapshot /snap
> > # mount /dev/vg/original /orig
> > # (cd /snap; tar cf - .) | (cd /orig; tar xvf -)
>
>rsync would probably be a better option - it will copy far less and will
>remove any files added after the snapshot was taken (if invoked
>appropriately). /orig should end up as a replica of /snap.
>
>
>
>
>_______________________________________________
>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/

_________________________________________________________________
Feeling like a vacation? Then you are in the right place. 
http://www.msn.co.in/Travel/ Get the best travel deals here!

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

end of thread, other threads:[~2004-01-09 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 12:21 [linux-lvm] restoring filesystem state using snapshot kanika nema
2004-01-08 17:22 ` Ken Fuchs
2004-01-09  9:57   ` Cameron Hutchison
  -- strict thread matches above, loose matches on Subject: below --
2004-01-08 17:25 Little, Chris
2004-01-09 13:19 kanika nema

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.