0

0

虚拟机增加硬盘以及更改ORACLE DB_RECOVERY_FILE_DEST参数实验

php中文网

php中文网

发布时间:2016-06-07 16:59:33

|

1605人浏览过

|

来源于php中文网

原创

今天在虚拟机里,发现剩余磁盘空间lt;10%,总共30G的磁盘,剩下不到2G,如果给ORACLE做一个RMAN全备的话就所剩无几了,于是想在

今天在虚拟机里,发现剩余磁盘空间

增加硬盘的步骤很简单,先关闭虚拟机,点EDIT =>HARD DISK=>ADD=>CREATE NEW VIRTUAL DISK=>SCSI 等按部就班,,搞定后启动vm.

1,[root@coop ~]# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        3916    31350847+  8e  Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
[root@coop ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help):
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610):
Using default value 2610

Command (m for help):
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): t
Selected partition 1
Hex code (type L to list codes): l

 0  Empty           1e  Hidden W95 FAT1 80  Old Minix       c1  DRDOS/sec (FAT-
 1  FAT12           24  NEC DOS         81  Minix / old Lin c4  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          82  Linux swap      c6  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  83  Linux           c7  Syrinx
 4  FAT16  5  Extended        41  PPC PReP Boot   85  Linux extended  db  CP/M / CTOS / .
 6  FAT16           42  SFS             86  NTFS volume set de  Dell Utility
 7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set df  BootIt
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       e1  DOS access
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e3  DOS R/O
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e4  SpeedStor
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          eb  BeOS fs
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi ee  EFI GPT
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ef  EFI (FAT-12/16/
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         f0  Linux/PA-RISC b
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f1  SpeedStor
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f4  SpeedStor
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f2  DOS secondary
14  Hidden FAT16 16  Hidden FAT16    63  GNU HURD or Sys b7  BSDI fs         fc  VMware VMKCORE
17  Hidden HPFS/NTF 64  Novell Netware  b8  BSDI swap       fd  Linux raid auto
18  AST SmartSleep  65  Novell Netware  bb  Boot Wizard hid fe  LANstep
1b  Hidden W95 FAT3 70  DiskSecure Mult be  Solaris boot    ff  BBT
1c  Hidden W95 FAT3 75  PC/IX           bf  Solaris
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): p

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+   b  W95 FAT32

Command (m for help): p

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+   b  W95 FAT32

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): t
Selected partition 1
Hex code (type L to list codes): l

 0  Empty           1e  Hidden W95 FAT1 80  Old Minix       c1  DRDOS/sec (FAT-
 1  FAT12           24  NEC DOS         81  Minix / old Lin c4  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          82  Linux swap      c6  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  83  Linux           c7  Syrinx
 4  FAT16  5  Extended        41  PPC PReP Boot   85  Linux extended  db  CP/M / CTOS / .
 6  FAT16           42  SFS             86  NTFS volume set de  Dell Utility
 7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set df  BootIt
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       e1  DOS access
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e3  DOS R/O
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e4  SpeedStor
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          eb  BeOS fs
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi ee  EFI GPT
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ef  EFI (FAT-12/16/
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         f0  Linux/PA-RISC b
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f1  SpeedStor
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f4  SpeedStor
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f2  DOS secondary
14  Hidden FAT16 16  Hidden FAT16    63  GNU HURD or Sys b7  BSDI fs         fc  VMware VMKCORE
17  Hidden HPFS/NTF 64  Novell Netware  b8  BSDI swap       fd  Linux raid auto
18  AST SmartSleep  65  Novell Netware  bb  Boot Wizard hid fe  LANstep
1b  Hidden W95 FAT3 70  DiskSecure Mult be  Solaris boot    ff  BBT
1c  Hidden W95 FAT3 75  PC/IX           bf  Solaris
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

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): w
The partition table has been altered!

图可丽批量抠图
图可丽批量抠图

用AI技术提高数据生产力,让美好事物更容易被发现

下载

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
[root@coop ~]# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        3916    31350847+  8e  Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+  8e  Linux LVM


[root@coop ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       28G   22G  4.5G  83% /
/dev/sda1              99M   14M   81M  15% /boot
none                  506M     0  506M   0% /dev/shm
[root@coop ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2621440 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=8388608
160 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@coop ~]# mount /dev/sdb1 /u01/arch
[root@coop ~]# df -lh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       28G   22G  4.5G  83% /
/dev/sda1              99M   14M   81M  15% /boot
none                  506M     0  506M   0% /dev/shm
/dev/sdb1              20G   77M   19G   1% /u01/arch

还要更改文件夹权限

[root@coop ~]# chmod 777 /u01/arch
[root@coop ~]# chown -R oracle /u01/arch


2,更改ORACLE 参数

SQL> show parameter db_recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /home/oracle/oracle/product/10
                                                 .2.0/db_1/flash_recovery_area
db_recovery_file_dest_size           big integer 2G
SQL> alter system set db_recovery_file_dest='/u01/arch/flash_recovery_area' scope=both;

System altered.

SQL> alter system set db_recovery_file_dest_size=10G;

System altered.

3.大功告成

SQL> show parameter db_recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/arch/flash_recovery_area
db_recovery_file_dest_size           big integer 10G

linux

相关专题

更多
Word 字间距调整方法汇总
Word 字间距调整方法汇总

本专题整合了Word字间距调整方法,阅读下面的文章了解更详细操作。

2

2025.12.24

任务管理器教程
任务管理器教程

本专题整合了任务管理器相关教程,阅读下面的文章了解更多详细操作。

2

2025.12.24

AppleID格式
AppleID格式

本专题整合了AppleID相关内容,阅读专题下面的文章了解更多详细教程。

0

2025.12.24

csgo视频观看入口合集
csgo视频观看入口合集

本专题整合了csgo观看入口合集,阅读下面的文章了知道更多入口地址。

29

2025.12.24

yandex外贸入口合集
yandex外贸入口合集

本专题汇总了yandex外贸入口地址,阅读下面的文章了解更多内容。

58

2025.12.24

添加脚注通用方法
添加脚注通用方法

本专题整合了添加脚注方法合集,阅读专题下面的文章了解更多内容。

1

2025.12.24

重启电脑教程汇总
重启电脑教程汇总

本专题整合了重启电脑操作教程,阅读下面的文章了解更多详细教程。

3

2025.12.24

纸张尺寸汇总
纸张尺寸汇总

本专题整合了纸张尺寸相关内容,阅读专题下面的文章了解更多内容。

5

2025.12.24

Java Spring Boot 微服务实战
Java Spring Boot 微服务实战

本专题深入讲解 Java Spring Boot 在微服务架构中的应用,内容涵盖服务注册与发现、REST API开发、配置中心、负载均衡、熔断与限流、日志与监控。通过实际项目案例(如电商订单系统),帮助开发者掌握 从单体应用迁移到高可用微服务系统的完整流程与实战能力。

1

2025.12.24

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
最新Python教程 从入门到精通
最新Python教程 从入门到精通

共4课时 | 0.6万人学习

Node.js 教程
Node.js 教程

共57课时 | 7.2万人学习

CSS3 教程
CSS3 教程

共18课时 | 3.9万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号