* [linux-lvm] Using LVM to snapshot Oracle
@ 2006-02-20 19:28 Mitchell Christensen
2006-02-20 22:05 ` Luca Berra
0 siblings, 1 reply; 10+ messages in thread
From: Mitchell Christensen @ 2006-02-20 19:28 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
Hey,
I was wondering about the feasibility of using the LVM snapshot facility
to backup/restore Oracle. Does this make sense?
A few issues that I am concerned about are,
* Would it be any better/faster/cheaper than RMAN (the standard
Oracle backup facility)?
* Would hot-backups be possible, or would the database need to be
in a quiescent state?
* Is anyone else out there doing this (or anything similar)?
* Is it reasonable to expect that I could simply take a snapshot
of all Oracle related files and be able to restore a viable Oracle
instance from that snapshot?
Any feedback and/or advice would be greatly appreciated.
-Mitch
[-- Attachment #2: Type: text/html, Size: 3890 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] Using LVM to snapshot Oracle
2006-02-20 19:28 [linux-lvm] Using LVM to snapshot Oracle Mitchell Christensen
@ 2006-02-20 22:05 ` Luca Berra
2006-02-20 22:11 ` Luca Berra
0 siblings, 1 reply; 10+ messages in thread
From: Luca Berra @ 2006-02-20 22:05 UTC (permalink / raw)
To: linux-lvm
On Mon, Feb 20, 2006 at 11:28:56AM -0800, Mitchell Christensen wrote:
>I was wondering about the feasibility of using the LVM snapshot facility
>to backup/restore Oracle. Does this make sense?
>
Yes
>
>A few issues that I am concerned about are,
>
>* Would it be any better/faster/cheaper than RMAN (the standard
>Oracle backup facility)?
it will work in a different manner,
rman is more complex to handle. but it will give you some more features,
like integrated archive log management and point in time restores.
>* Would hot-backups be possible, or would the database need to be
>in a quiescent state?
you can do hot backup, but you will need to tell oracle you are doing
so:
you will need to have oracle in archive log mode
you will need to manually set all tablespaces in backup mode:
alter tablespace XXX begin backup; (for all tablespaces)
alter system switch logfile;
do your backup including the archive logs
alter tablespace XXX end backup; (for all tablespaces)
it is a simple sql script to code
>* Is anyone else out there doing this (or anything similar)?
sure
>* Is it reasonable to expect that I could simply take a snapshot
>of all Oracle related files and be able to restore a viable Oracle
>instance from that snapshot?
after restore you will have to "recover database" to apply the archive
logs and make the database consistent.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] Using LVM to snapshot Oracle
2006-02-20 22:05 ` Luca Berra
@ 2006-02-20 22:11 ` Luca Berra
2006-02-21 10:21 ` Klaus Strebel
2006-02-21 18:00 ` [linux-lvm] Situation with PVRESIZE command Roger Lucas
0 siblings, 2 replies; 10+ messages in thread
From: Luca Berra @ 2006-02-20 22:11 UTC (permalink / raw)
To: linux-lvm
On Mon, Feb 20, 2006 at 11:05:32PM +0100, Luca Berra wrote:
to clarify:
>you can do hot backup, but you will need to tell oracle you are doing
>so:
>
>you will need to have oracle in archive log mode
>
>you will need to manually set all tablespaces in backup mode:
>alter tablespace XXX begin backup; (for all tablespaces)
>alter system switch logfile;
the snapshot creation part goes here
NO >do your backup including the archive logs
>alter tablespace XXX end backup; (for all tablespaces)
do your backup here including the archive logs
destroy the snapshot here.
>it is a simple sql script to code
>
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] Using LVM to snapshot Oracle
2006-02-20 22:11 ` Luca Berra
@ 2006-02-21 10:21 ` Klaus Strebel
2006-02-21 18:00 ` [linux-lvm] Situation with PVRESIZE command Roger Lucas
1 sibling, 0 replies; 10+ messages in thread
From: Klaus Strebel @ 2006-02-21 10:21 UTC (permalink / raw)
To: LVM general discussion and development
Luca Berra schrieb:
> On Mon, Feb 20, 2006 at 11:05:32PM +0100, Luca Berra wrote:
> to clarify:
>> you can do hot backup, but you will need to tell oracle you are doing
>> so:
>>
>> you will need to have oracle in archive log mode
>>
>> you will need to manually set all tablespaces in backup mode:
>> alter tablespace XXX begin backup; (for all tablespaces)
>> alter system switch logfile;
> the snapshot creation part goes here
>
> NO >do your backup including the archive logs
>
>> alter tablespace XXX end backup; (for all tablespaces)
>
> do your backup here including the archive logs
> destroy the snapshot here.
>
>> it is a simple sql script to code
>>
>
Hi Mitchell, hi Luca,
well, despite i prefer using RMAN ( since 9iR2 it's once configured and
then you can always do your backup with a simple 'backup database' ) but
you need your database running in archived mode, which brings additional
space and backup needs.
The way Luca describes for a online-backup is the usual way that's
working since Oracle 7 ( or even 6, but just work with Oracle since 7.0
;-) ), but i think, if all ( really all !) files are on the same
snapshout and the snapshot is big enough( ;-) ), you should make a
logswitch, create a readonly snapshot, copy all the files ( including
control-files, and redo-logs ) and remove the snapshot. You can then
carefully try to use these files to restore the database. If you have
enough diskspace, you can shutdown your instance, rename all the files (
again incl. control-files and redo-logs ), restore the copies from the
snapshot and start the database carefully ( startup nomount; alter
database mount; select file#, name, status from v$datafile; -> all file
should be in status system or online ; alter database open; -> up again ).
I have nither the time nor the resources to test this on my own. But you
can share your results with us :-)
Ciao
Klaus
--
Mit freundlichen Gr�ssen / best regards
Klaus Strebel, Dipl.-Inform. (FH), mailto:klaus.strebel@gmx.net
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 10+ messages in thread
* [linux-lvm] Situation with PVRESIZE command
2006-02-20 22:11 ` Luca Berra
2006-02-21 10:21 ` Klaus Strebel
@ 2006-02-21 18:00 ` Roger Lucas
2006-02-28 13:32 ` Roger Lucas
2006-02-28 13:53 ` Patrick Caulfield
1 sibling, 2 replies; 10+ messages in thread
From: Roger Lucas @ 2006-02-21 18:00 UTC (permalink / raw)
To: 'LVM general discussion and development'
Hi,
I am running LVM on top of a large RAID controller with a 16-drive
capability (of which just 4 disks are currently active). The RAID array
appears as a single SCSI disk, "/dev/sda". A quick summary of the LVM
information is below.
tiger:~# lvm version
LVM version: 2.01.04 (2005-02-09)
Library version: 1.01.00-ioctl (2005-01-17)
Driver version: 4.4.0
tiger:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda storage lvm2 a- 745.05G 39.05G
tiger:~# vgs
VG #PV #LV #SN Attr VSize VFree
storage 1 3 0 wz--n 745.05G 39.05G
tiger:~# lvs
LV VG Attr LSize Origin Snap% Move Copy%
home storage -wi-ao 2.00G
root storage -wi-ao 2.00G
var storage -wi-ao 2.00G
main storage -wi-ao 700.0G
tiger:~# mount
/dev/mapper/storage-root on / type reiserfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw,noatime)
/dev/mapper/storage-home on /home type reiserfs (rw)
/dev/mapper/storage-var on /var type reiserfs (rw)
/dev/mapper/storage-main on /main type reiserfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
tiger:~#
I now need to increase my RAID capacity. I can increase the physical RAID
capacity by adding another disk to the controller and getting it to re-build
the array in the background, thus increasing the size of "/dev/sda", but I
am not clear as to how I can increase the PV size in LVM.
I have seen some references to a "pvresize" command, but it isn't in the
latest 2.01.15 stable release (although it does appear in the 2.02.02
development release).
Hence, my questions are:
- Is it possible to re-size a PV whilst the system is online using the
2.01.15 tools?
- Is it possible to re-size a PV whilst the system is online using the
2.02.02 tools?
- How "stable" are the 2.02.02 tools, and are there any specific bugs in
them that may cause problems during typical usage.
Thanks,
Roger
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [linux-lvm] Situation with PVRESIZE command
2006-02-21 18:00 ` [linux-lvm] Situation with PVRESIZE command Roger Lucas
@ 2006-02-28 13:32 ` Roger Lucas
2006-02-28 13:53 ` Patrick Caulfield
1 sibling, 0 replies; 10+ messages in thread
From: Roger Lucas @ 2006-02-28 13:32 UTC (permalink / raw)
To: 'LVM general discussion and development'
Hi,
I've found Alasdair's mail from ~1 year ago on something in this area, but
it isn't quite the answer that I was looking for.
http://www.redhat.com/archives/linux-lvm/2004-December/msg00049.html
Is there anyone on this mailing list that can help with my PVRESIZE
questions below?
Thanks,
Roger
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
> On Behalf Of Roger Lucas
> Sent: 21 February 2006 18:01
> To: 'LVM general discussion and development'
> Subject: [linux-lvm] Situation with PVRESIZE command
>
> Hi,
>
> I am running LVM on top of a large RAID controller with a 16-drive
> capability (of which just 4 disks are currently active). The RAID array
> appears as a single SCSI disk, "/dev/sda". A quick summary of the LVM
> information is below.
>
> tiger:~# lvm version
> LVM version: 2.01.04 (2005-02-09)
> Library version: 1.01.00-ioctl (2005-01-17)
> Driver version: 4.4.0
> tiger:~# pvs
> PV VG Fmt Attr PSize PFree
> /dev/sda storage lvm2 a- 745.05G 39.05G
> tiger:~# vgs
> VG #PV #LV #SN Attr VSize VFree
> storage 1 3 0 wz--n 745.05G 39.05G
> tiger:~# lvs
> LV VG Attr LSize Origin Snap% Move Copy%
> home storage -wi-ao 2.00G
> root storage -wi-ao 2.00G
> var storage -wi-ao 2.00G
> main storage -wi-ao 700.0G
> tiger:~# mount
> /dev/mapper/storage-root on / type reiserfs (rw)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> tmpfs on /dev/shm type tmpfs (rw)
> /dev/hda1 on /boot type ext3 (rw,noatime)
> /dev/mapper/storage-home on /home type reiserfs (rw)
> /dev/mapper/storage-var on /var type reiserfs (rw)
> /dev/mapper/storage-main on /main type reiserfs (rw)
> usbfs on /proc/bus/usb type usbfs (rw)
> tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
> tiger:~#
>
> I now need to increase my RAID capacity. I can increase the physical RAID
> capacity by adding another disk to the controller and getting it to re-
> build
> the array in the background, thus increasing the size of "/dev/sda", but I
> am not clear as to how I can increase the PV size in LVM.
>
> I have seen some references to a "pvresize" command, but it isn't in the
> latest 2.01.15 stable release (although it does appear in the 2.02.02
> development release).
>
> Hence, my questions are:
>
> - Is it possible to re-size a PV whilst the system is online using the
> 2.01.15 tools?
>
> - Is it possible to re-size a PV whilst the system is online using the
> 2.02.02 tools?
>
> - How "stable" are the 2.02.02 tools, and are there any specific bugs in
> them that may cause problems during typical usage.
>
> Thanks,
>
> Roger
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] Situation with PVRESIZE command
2006-02-21 18:00 ` [linux-lvm] Situation with PVRESIZE command Roger Lucas
2006-02-28 13:32 ` Roger Lucas
@ 2006-02-28 13:53 ` Patrick Caulfield
2006-02-28 15:51 ` Roger Lucas
1 sibling, 1 reply; 10+ messages in thread
From: Patrick Caulfield @ 2006-02-28 13:53 UTC (permalink / raw)
To: LVM general discussion and development
Roger Lucas wrote:
> Hi,
> - Is it possible to re-size a PV whilst the system is online using the
> 2.01.15 tools?
>
> - Is it possible to re-size a PV whilst the system is online using the
> 2.02.02 tools?
>
> - How "stable" are the 2.02.02 tools, and are there any specific bugs in
> them that may cause problems during typical usage.
>
If you're wary of the 2.0.2 tools, then why not resize the pv using 2.02 but
leave your existing tools in place ?
--
patrick
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [linux-lvm] Situation with PVRESIZE command
2006-02-28 13:53 ` Patrick Caulfield
@ 2006-02-28 15:51 ` Roger Lucas
2006-02-28 16:04 ` Patrick Caulfield
0 siblings, 1 reply; 10+ messages in thread
From: Roger Lucas @ 2006-02-28 15:51 UTC (permalink / raw)
To: 'LVM general discussion and development'
Hi Patrick,
Thanks for the reply.
Are the different tool releases interchangable and compatible then? If they
are, it would be a massive advantage.
- Roger
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
> On Behalf Of Patrick Caulfield
> Sent: 28 February 2006 13:54
> To: LVM general discussion and development
> Subject: Re: [linux-lvm] Situation with PVRESIZE command
>
> Roger Lucas wrote:
> > Hi,
>
>
> > - Is it possible to re-size a PV whilst the system is online using the
> > 2.01.15 tools?
> >
> > - Is it possible to re-size a PV whilst the system is online using the
> > 2.02.02 tools?
> >
> > - How "stable" are the 2.02.02 tools, and are there any specific bugs in
> > them that may cause problems during typical usage.
> >
>
> If you're wary of the 2.0.2 tools, then why not resize the pv using 2.02
> but
> leave your existing tools in place ?
>
>
> --
>
> patrick
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] Situation with PVRESIZE command
2006-02-28 15:51 ` Roger Lucas
@ 2006-02-28 16:04 ` Patrick Caulfield
2006-02-28 16:07 ` Roger Lucas
0 siblings, 1 reply; 10+ messages in thread
From: Patrick Caulfield @ 2006-02-28 16:04 UTC (permalink / raw)
To: LVM general discussion and development
Roger Lucas wrote:
> Hi Patrick,
>
> Thanks for the reply.
>
> Are the different tool releases interchangable and compatible then? If they
> are, it would be a massive advantage.
>
>
Yes, they are.
--
patrick
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [linux-lvm] Situation with PVRESIZE command
2006-02-28 16:04 ` Patrick Caulfield
@ 2006-02-28 16:07 ` Roger Lucas
0 siblings, 0 replies; 10+ messages in thread
From: Roger Lucas @ 2006-02-28 16:07 UTC (permalink / raw)
To: 'LVM general discussion and development'
Wow.
I didn't think it would be that easy! :-)
All I need to do then is to compile the latest 2.X development branch then
just use the commands that I need when I require the absolutely latest
functionality. The "general purpose" operations can all come from the 1.X
stable branch...
Thanks for making it clear.
Regards,
Roger
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
> On Behalf Of Patrick Caulfield
> Sent: 28 February 2006 16:04
> To: LVM general discussion and development
> Subject: Re: [linux-lvm] Situation with PVRESIZE command
>
> Roger Lucas wrote:
> > Hi Patrick,
> >
> > Thanks for the reply.
> >
> > Are the different tool releases interchangable and compatible then? If
> they
> > are, it would be a massive advantage.
> >
> >
>
> Yes, they are.
>
> --
>
> patrick
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-02-28 16:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 19:28 [linux-lvm] Using LVM to snapshot Oracle Mitchell Christensen
2006-02-20 22:05 ` Luca Berra
2006-02-20 22:11 ` Luca Berra
2006-02-21 10:21 ` Klaus Strebel
2006-02-21 18:00 ` [linux-lvm] Situation with PVRESIZE command Roger Lucas
2006-02-28 13:32 ` Roger Lucas
2006-02-28 13:53 ` Patrick Caulfield
2006-02-28 15:51 ` Roger Lucas
2006-02-28 16:04 ` Patrick Caulfield
2006-02-28 16:07 ` Roger Lucas
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).