日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle擴(kuò)充磁盤空間的方法是什么

本篇內(nèi)容介紹了“Oracle擴(kuò)充磁盤空間的方法是什么”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

創(chuàng)新互聯(lián)專注于企業(yè)網(wǎng)絡(luò)營銷推廣、網(wǎng)站重做改版、赤峰林西網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5技術(shù)、商城網(wǎng)站定制開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為赤峰林西等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

Oracle 擴(kuò)充磁盤空間

環(huán)境:

OS:Oracle Linux Server release 6.3

DB:Oracle 11.2.0.4.0

問題:

根目錄磁盤空間不足,還剩6.5G

解決辦法:

擴(kuò)容磁盤空間;

由于安裝操作系統(tǒng)時(shí)沒有使用LVM,不能直接擴(kuò)容根目錄,并且磁盤上的數(shù)據(jù)庫相關(guān)文件不能刪除;

可以添加新盤,并將數(shù)據(jù)庫文件遷移到新盤上;

1 查看數(shù)據(jù)庫相關(guān)文件均在/u01目錄下

[root@cjc ~]# cat /home/oracle/.bash_profile 

......

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

......

SQL> select file_name from dba_data_files;

FILE_NAME

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/dapuchai/users01.dbf

/u01/app/oracle/oradata/dapuchai/undotbs01.dbf

/u01/app/oracle/oradata/dapuchai/sysaux01.dbf

/u01/app/oracle/oradata/dapuchai/system01.dbf

/u01/app/oracle/oradata/dapuchai/cjc_tbs01a.dbf

/u01/app/oracle/oradata/dapuchai/ogg_tbs01.dbf

6 rows selected.

2 Linux 添加新分區(qū)

---關(guān)機(jī)添加100G磁盤,/dev/sdb 

[root@dapuchai ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              28G   20G  6.5G  76% /

tmpfs                1004M  239M  765M  24% /dev/shm

/dev/sda1             194M   51M  134M  28% /boot

[root@cjc ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 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: 0x000ccbd2

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          26      204800   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              26         287     2097152   82  Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3             287        3917    29154304   83  Linux

Disk /dev/sdb: 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: 0x00000000

3 分區(qū)/dev/sdb1 

[root@cjc ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0xf58baf0e.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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/sdb: 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: 0xf58baf0e

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n---新增

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 

Value out of range.

Partition number (1-4): 1

First cylinder (1-13054, default 1): 

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): 

Using default value 13054

Command (m for help): p

Disk /dev/sdb: 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: 0xf58baf0e

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1       13054   104856223+  83  Linux

Command (m for help): w ---寫入 保存

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@cjc ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes

255 heads, 63 sectors/track, 3916 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: 0x000ccbd2

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          26      204800   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              26         287     2097152   82  Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/sda3             287        3917    29154304   83  Linux

Disk /dev/sdb: 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: 0xf58baf0e

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1       13054   104856223+  83  Linux

4 格式化

[root@cjc ~]# mkfs -t ext4 /dev/sdb1

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

6553600 inodes, 26214055 blocks

1310702 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

800 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, 11239424, 20480000, 23887872

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

5 掛載

[root@cjc ~]# mkdir /u02

[root@cjc ~]# mount /dev/sdb1 /u02

[root@cjc ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              28G   20G  6.5G  76% /

tmpfs                1004M   88K 1004M   1% /dev/shm

/dev/sda1             194M   51M  134M  28% /boot

/dev/sdb1              99G  188M   94G   1% /u02

6 遷移/u01到新加的盤

[root@cjc ~]# mv /u01 /u03

[root@cjc ~]# mv /u02 /u01

mv: cannot move `/u02' to `/u01': Device or resource busy

[root@cjc ~]# umount /u02

[root@cjc ~]# mv /u02 /u01

[root@cjc ~]# mount /dev/sdb1 /u01

[root@cjc ~]# mv /u03/* /u01

[root@cjc ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              28G   14G   13G  54% /

tmpfs                1004M   88K 1004M   1% /dev/shm

/dev/sda1             194M   51M  134M  28% /boot

/dev/sdb1              99G  6.0G   88G   7% /u01

[root@cjc /]# lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sr0     11:0    1  1024M  0 rom  

sr1     11:1    1  1024M  0 rom  

sda      8:0    0    30G  0 disk 

├─sda1   8:1    0   200M  0 part /boot

├─sda2   8:2    0     2G  0 part [SWAP]

└─sda3   8:3    0  27.8G  0 part /

sdb      8:16   0   100G  0 disk 

└─sdb1   8:17   0   100G  0 part /u01

7 添加自動(dòng)掛載

[root@cjc ~]# vi /etc/fstab 

......

/dev/sdb1               /u01                    ext4    defaults        0 0

8 啟動(dòng)數(shù)據(jù)庫

[root@cjc ~]# su - oracle

[oracle@cjc ~]$ lsnrctl start

[oracle@cjc ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Jan 11 15:00:47 2020

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  839282688 bytes

Fixed Size     2257880 bytes

Variable Size   541068328 bytes

Database Buffers   289406976 bytes

Redo Buffers     6549504 bytes

Database mounted.

Database opened.

SQL> conn cjc 

Enter password: 

Connected.

SQL> select count(*) from t1;

  COUNT(*)

“Oracle擴(kuò)充磁盤空間的方法是什么”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!


網(wǎng)頁題目:Oracle擴(kuò)充磁盤空間的方法是什么
文章轉(zhuǎn)載:http://www.dlmjj.cn/article/joiehj.html