10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 9 RECOVERING EXADATASystem Backup Using LVM SnapshotsCreating file system backups using LVM snapshots is a pretty simple process. First you need to create adestination for the final copy of the backups. This can be SAN or NAS storage or simply an NFS filesystem shared from another server. If you have enough free space in the volume group to store yourbackup files, you can create a temporary LVM partition to stage your backups before sending them off totape. This can be done using the lvcreate command. Before creating a new LVM partition, make sureyou have enough free space in your volume group using the vgdisplay command:[root@enkdb01 ~]# vgdisplay--- Volume group ---VG NameVGExaDb...VG Size556.80 GBPE Size4.00 MBTotal PE 142541Alloc PE / Size 45824 / 179.00 GBFree PE / Size 96717 / 377.80 GB...The vgdisplay command shows the size of our volume group, physical extents (PE) currently in use,and the amount of free space available in the volume group. The Free PE/Size attribute indicates thatwe have 377.8GB of free space remaining in the volume group. This is plenty of room for us to create anew 25GB LVM partition to store our backup images.First we’ll use the lvcreate command to create a new 25GB LVM partition:[root@enkdb01 ~]# lvcreate -L 25G -n /dev/VGExaDb/sysbackLogical volume "sysback" createdNow we can create a new file system on the sysback partition:[root@enkdb01 ~]# mkfs.ext3 -m 0 -b 4096 /dev/VGExaDb/sysbackmke2fs 1.39 (29-May-2006)...Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done...Next we’ll create a target directory and mount the new file system:[root@enkdb01 ~]# mkdir /mnt/sysback[root@enkdb01 ~]# mount /dev/VGExaDb/sysback /mnt/sysback[root@enkdb01 ~]# df -k /mnt/sysbackThe fdisk command displays our new file system and the logical volumes we want to include in oursystem backup, VGExaDb-LVDbSys1 (root file system), and VGExaDb-LVDbOra1 (/u01 file system). Notice thatthe /boot file system does not use the LVM for storage. This file system must be backed up using the tarcommand. This isn’t a problem, because the /boot file system is fairly small and static so we aren’tconcerned with these files being modified, locked, or open during the backup cycle.[root@enkdb01 ~]# df -hFilesystemSize Used Avail Use% Mounted on/dev/mapper/VGExaDb-LVDbSys1 30G 9.3G 19G 33% //dev/sda1 124M 16M 102M 14% /boot285

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!