【Linux】将Oracle安装目录从根目录下迁移到逻辑卷
【Linux】将Oracle安装目录从根目录下迁移到逻辑卷
1.1 BLOG文档结构图
1.2 前言部分
1.2.1 导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① Linux逻辑卷的创建和管理(重点)
Tips:
① 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和微信公众号(xiaomaimiaolhr)上有同步更新。
② 文章中用到的所有代码、相关软件、相关资料及本文的pdf版本都请前往小麦苗的云盘下载,小麦苗的云盘地址见:http://blog.itpub.net/26736162/viewspace-1624453/。
③ 若网页文章代码格式有错乱,请下载pdf格式的文档来阅读。
④ 在本篇BLOG中,代码输出部分一般放在一行一列的表格中。
本文若有错误或不完善的地方请大家多多指正,您的批评指正是我写作的最大动力。
1.2.2 相关文章链接
linux逻辑卷管理:http://blog.itpub.net/26736162/viewspace-2124620/,这篇文章非常不错。
1.2.3 本文简介
由于Oracle版本太多,鉴于学习使用,所以,小麦苗在RHEL6.5上安装了Oracle 11.2.0.3、Oracle 10.2.0.1和Oracle 10.2.0.4。但是由于没有采用逻辑卷的管理方式,现在根目录磁盘空间不足,而且也添加了好几块硬盘了,管理非常不方便。以后等Oracle 12cR2出来后还得安装在一起,想了想还是一次性将这些Oracle的安装目录都迁移到逻辑卷中,以后也好管理。本文记录了迁移过程,以备有同样需求的朋友使用。
1.3 迁移过程
1.3.1 磁盘现状
、4和5去掉,只剩下1块或2块磁盘。
1.3.2 分区并创建物理卷
[root@rhel6_lhr ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 48G 43G 3.0G 94% / tmpfs 2.0G 432M 1.6G 22% /dev/shm /dev/sda1 283M 58M 210M 22% /boot /dev/mapper/testvg-testlv 380M 321M 40M 90% /var/lib/mysql /dev/sdc1 9.9G 4.0G 5.5G 43% /u03 /dev/sde1 20G 7.3G 12G 39% /u04 /dev/sdf1 50G 30G 18G 63% /u05 [root@rhel6_lhr ~]# fdisk -l |grep dev Disk /dev/sda: 107.4 GB, 107374182400 bytes /dev/sda1 * 1 39 307200 83 Linux /dev/sda2 39 6401 51104768 83 Linux /dev/sda3 6401 6528 1015808 82 Linux swap / Solaris /dev/sda4 6528 13054 52427455 5 Extended Disk /dev/sdc: 10.7 GB, 10737418240 bytes /dev/sdc1 1 1305 10482381 83 Linux Disk /dev/sdd: 5368 MB, 5368709120 bytes Disk /dev/sdf: 53.7 GB, 53687091200 bytes /dev/sdf1 1 6527 52428096 83 Linux Disk /dev/sdg: 21.5 GB, 21474836480 bytes Disk /dev/sde: 21.5 GB, 21474836480 bytes /dev/sde1 1 2610 20964793+ 83 Linux Disk /dev/mapper/testvg-testlv: 419 MB, 419430400 bytes [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000bd0a0 Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 6401 51104768 83 Linux /dev/sda3 6401 6528 1015808 82 Linux swap / Solaris Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): l 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT- 2 XENIX root 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT- 3 XENIX usr 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT- 4 FAT16 <32M 41 PPC PReP Boot 85 Linux extended c7 Syrinx 5 Extended 42 SFS 86 NTFS volume set da Non-FS data 6 FAT16 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / . 7 HPFS/NTFS 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility 8 AIX 4f QNX4.x 3rd part 8e Linux LVM df BootIt 9 AIX bootable 50 OnTrack DM 93 Amoeba e1 DOS access a OS/2 Boot Manag 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O b W95 FAT32 52 CP/M 9f BSD/OS e4 SpeedStor c W95 FAT32 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs e W95 FAT16 (LBA) 54 OnTrackDM6 a5 FreeBSD ee GPT f W95 Ext'd (LBA) 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/ 10 OPUS 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b 11 Hidden FAT12 5c Priam Edisk a8 Darwin UFS f1 SpeedStor 12 Compaq diagnost 61 SpeedStor a9 NetBSD f4 SpeedStor 14 Hidden FAT16 <3 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary 16 Hidden FAT16 64 Novell Netware af HFS / HFS+ fb VMware VMFS 17 Hidden HPFS/NTF 65 Novell Netware b7 BSDI fs fc VMware VMKCORE 18 AST SmartSleep 70 DiskSecure Mult b8 BSDI swap fd Linux raid auto 1b Hidden W95 FAT3 75 PC/IX bb Boot Wizard hid fe LANstep 1c Hidden W95 FAT3 80 Old Minix be Solaris boot ff BBT 1e Hidden W95 FAT1 Command (m for help): n Command action e extended p primary partition (1-4) p Selected partition First cylinder (6528-13054, default 6528): Using default value 6528 Last cylinder, +cylinders or +size{K,M,G} (6528-13054, default 13054): Using default value 13054 Command (m for help): t Partition number (1-4): Hex code (type L to list codes): 8e Changed system type of partition 4 to 8e (Linux LVM) Command (m for help): p Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000bd0a0 Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 6401 51104768 83 Linux /dev/sda3 6401 6528 1015808 82 Linux swap / Solaris /dev/sda4 6528 13054 52427455 8e Linux LVM Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks. [root@rhel6_lhr ~]# partprobe Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdc (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. Warning: WARNING: the kernel failed to re-read the partition table on /dev/sde (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdf (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# pvcreate /dev/sda4 dev_is_mpath: failed to get device for 8:4 dev_is_mpath: failed to get device for 8:4 Device /dev/sda4 not found (or ignored by filtering). [root@rhel6_lhr ~]# fdisk -l /dev/sda Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000bd0a0 Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 6401 51104768 83 Linux /dev/sda3 6401 6528 1015808 82 Linux swap / Solaris /dev/sda4 6528 13054 52427455 8e Linux LVM [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# pvcreate /dev/sda4 Device /dev/sda4 not found (or ignored by filtering). [root@rhel6_lhr ~]# l /dev/sda4 brw-rw---- 1 root disk 8, 4 Dec 26 09:51 /dev/sda4 [root@rhel6_lhr ~]# reboot Broadcast message from root@rhel6_lhr (/dev/pts/1) at 10:12 ... The system is going down for reboot NOW! [root@rhel6_lhr ~]# Last login: Mon Dec 26 10:06:09 2016 from 192.168.59.1 [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 48G 43G 3.0G 94% / tmpfs 2.0G 0 2.0G 0% /dev/shm /dev/sda1 283M 58M 210M 22% /boot /dev/mapper/testvg-testlv 380M 321M 40M 90% /var/lib/mysql /dev/sdc1 9.9G 4.0G 5.5G 43% /u03 /dev/sde1 20G 7.3G 12G 39% /u04 /dev/sdf1 50G 30G 18G 63% /u05 [root@rhel6_lhr ~]# fdisk -l /dev/sda Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000bd0a0 Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 6401 51104768 83 Linux /dev/sda3 6401 6528 1015808 82 Linux swap / Solaris /dev/sda4 6528 13054 52427455 8e Linux LVM [root@rhel6_lhr ~]# pvcreate /dev/sda4 Physical volume "/dev/sda4" successfully created [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda4 lvm2 a-- 50.00g 50.00g [root@rhel6_lhr ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda4 lvm2 a-- 50.00g 50.00g [root@rhel6_lhr ~]# pvdisplay "/dev/sda4" is a new physical volume of "50.00 GiB" --- NEW Physical volume --- PV Name /dev/sda4 VG Name PV Size 50.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID NgZ5Vl-Jbkn-9U71-9Ypp-i2nH-HhlT-cSPQ3o |
1.3.3 创建卷组
[root@rhel6_lhr ~]# vgcreate vg_orasoft /dev/sda4 Volume group "vg_orasoft" successfully created [root@rhel6_lhr ~]# vgdisplay --- Volume group --- VG Name vg_orasoft System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 50.00 GiB PE Size 4.00 MiB Total PE 12799 Alloc PE / Size 0 / 0 Free PE / Size 12799 / 50.00 GiB VG UUID PyRYUt-ERDU-NU4o-NWHA-anpD-iTIA-aMGLnV [root@rhel6_lhr ~]# vgs VG #PV #LV #SN Attr VSize VFree vg_orasoft 1 0 0 wz--n- 50.00g 50.00g [root@rhel6_lhr ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda4 vg_orasoft lvm2 a-- 50.00g 50.00g [root@rhel6_lhr ~]# pvdisplay --- Physical volume --- PV Name /dev/sda4 VG Name vg_orasoft PV Size 50.00 GiB / not usable 2.69 MiB Allocatable yes PE Size 4.00 MiB Total PE 12799 Free PE 12799 Allocated PE 0 PV UUID NgZ5Vl-Jbkn-9U71-9Ypp-i2nH-HhlT-cSPQ3o |
1.3.4 创建逻辑卷
[root@rhel6_lhr ~]# [root@rhel6_lhr ~]# lvcreate -n lv_ora_soft_u01 -L 35G vg_orasoft Logical volume "lv_ora_soft_u01" created [root@rhel6_lhr ~]# lvdisplay --- Logical volume --- LV Path /dev/vg_orasoft/lv_ora_soft_u01 LV Name lv_ora_soft_u01 VG Name vg_orasoft LV UUID FYWeeZ-DMxB-MKBo-Lpeb-kVEz-yCFY-M2Ddmr LV Write Access read/write LV Creation host, time rhel6_lhr, 2016-12-26 11:06:03 +0800 LV Status available # open 0 LV Size 35.00 GiB Current LE 8960 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 [root@rhel6_lhr ~]# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv_ora_soft_u01 vg_orasoft -wi-a----- 35.00g [root@rhel6_lhr ~]# [root@rhel6_lhr ~]# vgs VG #PV #LV #SN Attr VSize VFree vg_orasoft 1 1 0 wz--n- 50.00g 15.00g [root@rhel6_lhr ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda4 vg_orasoft lvm2 a-- 50.00g 15.00g [root@rhel6_lhr ~]# mkfs.ext4 /dev/vg_orasoft/lv_ora_soft_u01 mke2fs 1.43-WIP (20-Jun-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 2293760 inodes, 9175040 blocks 458752 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 280 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done [root@rhel6_lhr ~]# |
1.3.5 停止Oracle的所有进程
[root@rhel6_lhr ~]# ps -ef|grep ora grid 3087 1 0 10:18 ? 00:00:27 /u01/app/grid/11.2.0/bin/oraagent.bin grid 3265 1 0 10:18 ? 00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) grid 3270 1 0 10:18 ? 00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) oracle 3640 1 0 10:18 ? 00:00:00 ora_pmon_orclasm oracle 3642 1 0 10:18 ? 00:00:00 ora_psp0_orclasm oracle 3648 1 1 10:18 ? 00:00:51 ora_vktm_orclasm oracle 3652 1 0 10:18 ? 00:00:00 ora_gen0_orclasm oracle 3654 1 0 10:18 ? 00:00:00 ora_diag_orclasm oracle 3656 1 0 10:18 ? 00:00:00 ora_dbrm_orclasm oracle 3658 1 0 10:18 ? 00:00:03 ora_dia0_orclasm oracle 3660 1 0 10:18 ? 00:00:00 ora_mman_orclasm oracle 3662 1 0 10:18 ? 00:00:00 ora_dbw0_orclasm oracle 3664 1 0 10:18 ? 00:00:00 ora_lgwr_orclasm oracle 3666 1 0 10:18 ? 00:00:01 ora_ckpt_orclasm oracle 3668 1 0 10:18 ? 00:00:00 ora_smon_orclasm oracle 3670 1 0 10:18 ? 00:00:00 ora_reco_orclasm oracle 3672 1 0 10:18 ? 00:00:00 ora_rbal_orclasm oracle 3674 1 0 10:18 ? 00:00:00 ora_asmb_orclasm oracle 3676 1 0 10:18 ? 00:00:00 ora_mmon_orclasm oracle 3678 1 0 10:18 ? 00:00:01 ora_mmnl_orclasm oracle 3680 1 0 10:18 ? 00:00:00 ora_d000_orclasm oracle 3682 1 0 10:18 ? 00:00:00 ora_s000_orclasm oracle 3684 1 0 10:18 ? 00:00:00 oracleorclasm (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) grid 3686 1 0 10:18 ? 00:00:00 oracle+ASM_asmb_orclasm (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) oracle 3689 1 0 10:18 ? 00:00:00 ora_mark_orclasm oracle 3703 1 0 10:18 ? 00:00:00 ora_rvwr_orclasm oracle 3717 1 0 10:19 ? 00:00:00 ora_arc0_orclasm oracle 3738 1 0 10:19 ? 00:00:00 ora_arc1_orclasm oracle 3740 1 0 10:19 ? 00:00:00 ora_arc2_orclasm oracle 3742 1 0 10:19 ? 00:00:00 ora_arc3_orclasm oracle 3752 1 0 10:19 ? 00:00:00 ora_ctwr_orclasm oracle 3758 1 0 10:19 ? 00:00:00 ora_fbda_orclasm oracle 3760 1 0 10:19 ? 00:00:00 ora_qmnc_orclasm oracle 3775 1 0 10:19 ? 00:00:00 oracleorclasm (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) oracle 3779 1 0 10:19 ? 00:00:00 ora_q000_orclasm oracle 3781 1 0 10:19 ? 00:00:00 ora_q001_orclasm oracle 3790 1 0 10:19 ? 00:00:00 oracleorclasm (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) oracle 3813 1 0 10:19 ? 00:00:00 ora_cjq0_orclasm oracle 3820 1 0 10:19 ? 00:00:01 ora_j000_orclasm oracle 3822 1 0 10:19 ? 00:00:08 ora_j001_orclasm oracle 4115 1 0 10:24 ? 00:00:00 ora_smco_orclasm oracle 6197 1 0 11:04 ? 00:00:00 ora_w000_orclasm oracle 6283 1 0 11:05 ? 00:00:00 ora_w001_orclasm root 6361 2323 0 11:07 pts/1 00:00:00 grep ora [root@rhel6_lhr ~]# crsctl stop has -f CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rhel6_lhr' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rhel6_lhr' CRS-2673: Attempting to stop 'ora.orclasm.db' on 'rhel6_lhr' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rhel6_lhr' succeeded CRS-2677: Stop of 'ora.orclasm.db' on 'rhel6_lhr' succeeded CRS-2673: Attempting to stop 'ora.FRA.dg' on 'rhel6_lhr' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rhel6_lhr' CRS-2677: Stop of 'ora.FRA.dg' on 'rhel6_lhr' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'rhel6_lhr' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'rhel6_lhr' CRS-2677: Stop of 'ora.asm' on 'rhel6_lhr' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'rhel6_lhr' CRS-2677: Stop of 'ora.cssd' on 'rhel6_lhr' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'rhel6_lhr' CRS-2673: Attempting to stop 'ora.evmd' on 'rhel6_lhr' CRS-2677: Stop of 'ora.ons' on 'rhel6_lhr' succeeded CRS-2677: Stop of 'ora.evmd' on 'rhel6_lhr' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rhel6_lhr' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@rhel6_lhr ~]# ps -ef|grep ora root 6420 2323 0 11:07 pts/1 00:00:00 grep ora [root@rhel6_lhr ~]# ps -ef|grep d.bin root 6425 2323 0 11:07 pts/1 00:00:00 grep d.bin |
1.3.6 开始迁移
注意这里的迁移技巧:
[root@rhel6_lhr ~]# mkdir /u11 [root@rhel6_lhr ~]# mount /dev/vg_orasoft/lv_ora_soft_u01 /u11 [root@rhel6_lhr ~]# mv /u01/* /u11/ [root@rhel6_lhr ~]# umount /u01 [root@rhel6_lhr ~]# umount /u11 [root@rhel6_lhr ~]# mount /dev/vg_orasoft/lv_ora_soft_u01 /u01 [root@rhel6_lhr ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 48G 43G 3.1G 94% / tmpfs 2.0G 76K 2.0G 1% /dev/shm /dev/sda1 283M 58M 210M 22% /boot /dev/sdc1 9.9G 4.0G 5.5G 43% /u03 /dev/sde1 20G 7.3G 12G 39% /u04 /dev/sdf1 50G 30G 18G 63% /u05 /dev/mapper/vg_orasoft-lv_ora_soft_u01 35G 28G 4.8G 86% /u01 |
依次类推,将其它的所有盘的文件都迁移至逻辑卷中,最终结果如下:
[root@rhel6_lhr ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 48G 12G 35G 25% / tmpfs 2.0G 76K 2.0G 1% /dev/shm /dev/sda1 283M 58M 210M 22% /boot /dev/mapper/vg_orasoft-lv_orasoft_u01 35G 28G 4.8G 86% /u01 /dev/mapper/vg_orasoft-lv_orasoft_u02 5.8G 3.6G 2.0G 65% /u02 /dev/mapper/vg_orasoft-lv_orasoft_u03 5.8G 3.8G 1.8G 69% /u03 /dev/mapper/vg_orasoft-lv_orasoft_mysql 976M 320M 605M 35% /var/lib/mysql /dev/mapper/vg_oradata-lv_oradata_u04 9.8G 7.3G 2.1G 79% /u04 /dev/mapper/vg_oradata-lv_oradata_u05 30G 23G 5.5G 81% /u05 |
1.3.7 修改/etc/fstab
修改/etc/fstab文件,加入如下内容:
/dev/vg_orasoft/lv_orasoft_u01 /u01 ext4 defaults 0 0 /dev/vg_orasoft/lv_orasoft_u02 /u02 ext4 defaults 0 0 /dev/vg_orasoft/lv_orasoft_u03 /u03 ext4 defaults 0 0 /dev/vg_oradata/lv_oradata_u04 /u04 ext4 defaults 0 0 /dev/vg_oradata/lv_oradata_u05 /u05 ext4 defaults 0 0 /dev/vg_orasoft/lv_orasoft_mysql /var/lib/mysql ext4 defaults 0 0 |
1.3.8 启动数据库验证
[root@rhel6_lhr ~]# crsctl start has CRS-4123: Oracle High Availability Services has been started. [root@rhel6_lhr ~]# TARTING [root@rhel6_lhr ~]# crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE rhel6_lhr ora.FRA.dg ONLINE ONLINE rhel6_lhr ora.LISTENER.lsnr ONLINE ONLINE rhel6_lhr ora.asm ONLINE ONLINE rhel6_lhr Started ora.ons ONLINE ONLINE rhel6_lhr -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE rhel6_lhr ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE rhel6_lhr ora.ogg2.db 1 ONLINE ONLINE rhel6_lhr Open ora.orclasm.db 1 ONLINE ONLINE rhel6_lhr Open |
About Me
...............................................................................................................................
● 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
● 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2131488/
● 本文博客园地址:http://www.cnblogs.com/lhrbest/p/6227487.html
● 本文pdf版及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/
微信群:私聊
● 联系我请加QQ好友(642808185),注明添加缘由
● 于 2016-12-26 08:00 ~ 2016-12-27 24:00 在农行完成
● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解
● 版权所有,欢迎分享本文,转载请保留出处
...............................................................................................................................
手机长按下图识别二维码或微信客户端扫描下边的二维码来关注小麦苗的微信公众号:xiaomaimiaolhr,免费学习最实用的数据库技术。
【Linux】将Oracle安装目录从根目录下迁移到逻辑卷的更多相关文章
- 清理Oracle安装目录里的一些日志信息
最近测试环境服务器上磁盘空间紧张,表空间里面的数据也不知道开发哪些需要哪些不需要,而且因为此测试库运行时间比较久远,起码有三年了.于是就从清理Oracle安装目录下的日志下手. 发现在一般这几个日志, ...
- Linux 的软件安装目录
Linux 的软件安装目录是也是有讲究的,理解这一点,在对系统管理是有益的 /usr:系统级的目录,可以理解为C:/Windows/,/usr/lib理解为C:/Windows/System32. / ...
- linux查看服务安装目录
linux查看服务安装目录server dir 假如我们想查看 Redis 的安装目录 如果用命令 which redis 或者 whereis redis 都找不到安装目录, 可使用以下办法: ps ...
- Oracle安装部署之Win7下oracle11g数据库的安装及配置
1.下载安装包 到oracle官网downloads下下载(第一次下载需要注册账号). Win7 64位下载64位oracle11g安装包 Win7 32位下载32位oracle11g(Oracle_ ...
- Linux and Oracle常用目录详解
目录详解 目录 内容 / 根目录,一切从这里开始 /bin 包含系统启动和运行所必需的二进制文件(程序) /boot 包含Linux内核.最初的RAM磁盘映像(系统启动时,驱动程序会用到),以及启动加 ...
- redis linux版本自定义安装目录、注册服务、自启动设置、一台计算机安装多个redis
自定义安装目录并安装 1.mkdir /usr/local/redis 2.下载redis到 /usr/local/src/,解压,进入解压后的目录 3.安装到指定目录 make PREFIX=/us ...
- linux查看redis安装目录
1.在redis下查看安装目录 如果命令 which 和whereis 都找不到安装目录,可使用以下办法 ps -ef|grep redis 得到了进程号 xxxx 然后 ls -l /proc/xx ...
- Linux中oracle安装时候报ora-00119解决办法
ORA-00119: invalid specification for system parameter LOCAL_LISTENER ORA-00130: invalid listener add ...
- linux查看服务安装目录redis
如果用命令 which redis 或者 whereis redis 都找不到安装目录, 可使用以下办法: ps -aux | grep redis 或者ps -ef|grep redis 假如得到 ...
随机推荐
- serialize()序列化
- viewpager和fragment预加载的解决
在使用Viewpager和fragment处理中会出现预加载的问题,最近看别人的代码,终于找到了一个很好的处理方法 能有效的解决预加载的问题,在fragment都继承一个重写setUserVisibl ...
- [javaSE] 反射-方法的反射
1.如何获取某个方法 方法的名称和方法的参数列表才能唯一决定一个方法 2.方法反射的操作 method.invoke(); package com.tsh.reflect; import java.l ...
- 编译安装rabbitmq服务端
有一种方式是:下载rabbitmq-server-generic-unix压缩包,是不用编译的.是已经编译好的源码了 下面介绍编译源码安装 总括: 需要以下步骤: 1.安装erlange.因为 ...
- ANDROID学习书单
Skip to content PersonalOpen sourceBusinessExplore Sign upSign in PricingBlogSupport This reposito ...
- javascript(定时函数)
一setTimeout函数和setInterval函数的语法以及应用 1.setTimeout函数 定义和用法:setTimeout()方法用于在指定的毫秒数后调用函数或计算表达式. 语法:setTi ...
- ajax传参到实体类对应字段
之前看公司的代码,从页面ajax传参数到接口类,接口类用一个实体接收.我一直以为c#会自动识别,赋值到同名的字段. 我曾和朋友讨论过,双方辩论.朋友认为c#没有这种功能,没有这样高级匹配的机制.而我因 ...
- ENVI软件操作【数据显示操作——Overlay菜单操作】
一.注记层(Annotation) 注记层是ENVI的一个数据类型,它的后缀名是.ann.往往作为栅格数据层,矢量数据层.三维场景会绘图图表的附加数据叠加在上面,还可以作为镶嵌图像时候的裁剪线.注记数 ...
- 2016年末闲谈iOS开发的未来
移动开发市场潮流涌动,好多人都会问iOS开发的前景这样的问题,今天我就瞎扯一下我眼中的未来,纯主观非理性,爱看看. Swift怎么样 Swift很好,就像你的前女友一样好. 得益于swift的开源,以 ...
- ubuntu环境变量
在Ubuntu中有如下几个文件可以设置环境变量1./etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.2. ...