[20180806]tune2fs調整保留塊百分比.txt
[20180806]tune2fs調整保留塊百分比.txt
--//生產系統一臺dg磁碟空間滿了.我前一陣子已經將*convert引數修改,增加磁碟,但是這個分割槽裡面的資料檔案還可以增長,這樣依舊存
--//在磁碟空間不足的情況,正常應該移動資料檔案到別的分割槽,然後rename.突然想起建立分割槽時有一定的保留區給root使用者,我們這個分
--//區磁碟很大接近2T,這樣按照5%的比例計算,有將近100G的空間可能浪費了.
--//參考以前測試的連結:http://blog.itpub.net/267265/viewspace-2145428/=>[20170926]tune2fs調整保留塊百分比.txt
--//注意如果在mount狀態下修改無效!!
1.環境:
# cat /proc/version
Linux version 2.6.39-300.26.1.el5uek (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Thu Jan 3 18:31:38 PST 2013
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p1 1.7T 1.6T 20G 99% /u02
--//剩餘20G.
# tune2fs -l /dev/cciss/c0d1p1
tune2fs 1.39 (29-May-2006)
Filesystem volume name: /u02
Last mounted on: <not available>
Filesystem UUID: d9c0c411-25ea-4e21-b383-3ef446d2c064
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 219774976
Block count: 439520246
Reserved block count: 21976012
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free blocks: 432573167
Free inodes: 219774965
First block: 0
Block size: 4096
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fragment size: 4096
Reserved GDT blocks: 919
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Thu Feb 23 09:42:17 2017
Last mount time: Thu Feb 23 09:55:13 2017
Last write time: Thu Feb 23 09:55:13 2017
Mount count: 3
Maximum mount count: -1
Last checked: Thu Feb 23 09:42:17 2017
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 6e38ec2b-9916-496f-a143-b9b22a7e1f09
Journal backup: inode blocks
--//21976012*4096/1024/1024/1024 = 83.83183288574218750000,保留84G.
--//實際上-m 1也是浪費,我採用-r引數保留一定數量的塊.
--//保留1G ,1024*1024*1024/4096 = 262144
2.調整保留塊百分比:
--//關閉資料庫.
SYS@xxxxdg> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
# umount /dev/cciss/c0d1p1
umount: /u02: device is busy
umount: /u02: device is busy
# lsof /u02
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tnslsnr 9361 oracle cwd DIR 104,17 4096 2 /u02
--//奇怪.監聽程式怎麼會關聯到/u02
# cat /proc/9361/environ | tr '\0' '\n'| grep u02
PWD=/u02
--//原來當時監聽啟動時的目錄是/u02,停止監聽程式.
$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-AUG-2018 08:29:12
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.76)(PORT=1521)))
The command completed successfully
# sync;sync
# umount /dev/cciss/c0d1p1
# tune2fs -r 262144 /dev/cciss/c0d1p1
tune2fs 1.39 (29-May-2006)
Setting reserved blocks count to 262144
# tune2fs -l /dev/cciss/c0d1p1 | egrep "Reserved block count"
Reserved block count: 262144
# mount /u02
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p1 1.7T 1.6T 103G 94% /u02
--//現在多了83G,應該不會再遇到磁碟空間不足的問題在/u02分割槽.
3.啟動資料庫.略.
$ lsnrctl start
SYS@xxxxdg> startup open read only;
ORACLE instance started.
Total System Global Area 8.0973E+10 bytes
Fixed Size 2261968 bytes
Variable Size 9663679536 bytes
Database Buffers 7.1135E+10 bytes
Redo Buffers 171487232 bytes
Database mounted.
Database opened.
DGMGRL> show database xxxxdg
Database - xxxxdg
Enterprise Manager Name: xxxx_dg
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 0 seconds ago)
Apply Lag: 0 seconds (computed 0 seconds ago)
Apply Rate: 34.40 MByte/s
Real Time Query: ON
Instance(s):
xxxxdg
Database Status:
SUCCESS
--//生產系統一臺dg磁碟空間滿了.我前一陣子已經將*convert引數修改,增加磁碟,但是這個分割槽裡面的資料檔案還可以增長,這樣依舊存
--//在磁碟空間不足的情況,正常應該移動資料檔案到別的分割槽,然後rename.突然想起建立分割槽時有一定的保留區給root使用者,我們這個分
--//區磁碟很大接近2T,這樣按照5%的比例計算,有將近100G的空間可能浪費了.
--//參考以前測試的連結:http://blog.itpub.net/267265/viewspace-2145428/=>[20170926]tune2fs調整保留塊百分比.txt
--//注意如果在mount狀態下修改無效!!
1.環境:
# cat /proc/version
Linux version 2.6.39-300.26.1.el5uek (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Thu Jan 3 18:31:38 PST 2013
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p1 1.7T 1.6T 20G 99% /u02
--//剩餘20G.
# tune2fs -l /dev/cciss/c0d1p1
tune2fs 1.39 (29-May-2006)
Filesystem volume name: /u02
Last mounted on: <not available>
Filesystem UUID: d9c0c411-25ea-4e21-b383-3ef446d2c064
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 219774976
Block count: 439520246
Reserved block count: 21976012
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free blocks: 432573167
Free inodes: 219774965
First block: 0
Block size: 4096
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fragment size: 4096
Reserved GDT blocks: 919
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Thu Feb 23 09:42:17 2017
Last mount time: Thu Feb 23 09:55:13 2017
Last write time: Thu Feb 23 09:55:13 2017
Mount count: 3
Maximum mount count: -1
Last checked: Thu Feb 23 09:42:17 2017
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 6e38ec2b-9916-496f-a143-b9b22a7e1f09
Journal backup: inode blocks
--//21976012*4096/1024/1024/1024 = 83.83183288574218750000,保留84G.
--//實際上-m 1也是浪費,我採用-r引數保留一定數量的塊.
--//保留1G ,1024*1024*1024/4096 = 262144
2.調整保留塊百分比:
--//關閉資料庫.
SYS@xxxxdg> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
# umount /dev/cciss/c0d1p1
umount: /u02: device is busy
umount: /u02: device is busy
# lsof /u02
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tnslsnr 9361 oracle cwd DIR 104,17 4096 2 /u02
--//奇怪.監聽程式怎麼會關聯到/u02
# cat /proc/9361/environ | tr '\0' '\n'| grep u02
PWD=/u02
--//原來當時監聽啟動時的目錄是/u02,停止監聽程式.
$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-AUG-2018 08:29:12
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.76)(PORT=1521)))
The command completed successfully
# sync;sync
# umount /dev/cciss/c0d1p1
# tune2fs -r 262144 /dev/cciss/c0d1p1
tune2fs 1.39 (29-May-2006)
Setting reserved blocks count to 262144
# tune2fs -l /dev/cciss/c0d1p1 | egrep "Reserved block count"
Reserved block count: 262144
# mount /u02
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p1 1.7T 1.6T 103G 94% /u02
--//現在多了83G,應該不會再遇到磁碟空間不足的問題在/u02分割槽.
3.啟動資料庫.略.
$ lsnrctl start
SYS@xxxxdg> startup open read only;
ORACLE instance started.
Total System Global Area 8.0973E+10 bytes
Fixed Size 2261968 bytes
Variable Size 9663679536 bytes
Database Buffers 7.1135E+10 bytes
Redo Buffers 171487232 bytes
Database mounted.
Database opened.
DGMGRL> show database xxxxdg
Database - xxxxdg
Enterprise Manager Name: xxxx_dg
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 0 seconds ago)
Apply Lag: 0 seconds (computed 0 seconds ago)
Apply Rate: 34.40 MByte/s
Real Time Query: ON
Instance(s):
xxxxdg
Database Status:
SUCCESS
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2199284/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Java計算百分比保留整數Java
- [20180806]ORA-16606 unable to find property.txt
- [20220331]如何調整sql語句.txtSQL
- [20230221]19c 調整cluster factor.txt
- Python中保留整數常用的方法!Python
- Gamma調整GAM
- 調整狀態
- Brightback:2019客戶保留調查報告
- [20190101]塊內重整.txt
- docker筆記46-調整客戶端rbd塊裝置的大小Docker筆記客戶端
- Linux基礎命令—tune2fsLinux
- Linux基礎命令---tune2fsLinux
- LOL射手改版細節調整 英雄與裝備將進行整體調整ID
- 字串的調整II字串
- CAD填充比例調整
- orcle效能調整(轉)
- 調整time_waitAI
- android4.4調整音量調節速度Android
- [20210128]拼接資料塊.txt
- 視訊直播app原始碼,對首頁樣式的整體調整,調整成圓角化APP原始碼
- Arduino調整小車速度UI
- 如何調整Pycharm字型大小PyCharm
- Leetcode 貪心:差值調整LeetCode
- Echarts 圖表位置調整Echarts
- organizational alignment 組織調整
- WinForm禁止窗體調整ORM
- oracle 線上調整redoOracle
- weblogic 記憶體調整Web記憶體
- UITableViewCell分割線位置調整UIView
- [20190129]塊內重整3.txt
- [20190102]塊內重整2.txt
- 批量調整視訊尺寸大小的方法,一鍵自動批量調整視訊
- launchpad圖示大小怎麼調整?mac圖示調整大小方法介紹Mac
- 大量影片畫面怎麼批次調整色調?
- 大量影片色調批次進行調整的方法
- DcatAdmin選單樣式調整
- Linux系統調整swap大小Linux
- hadoop queue的配額調整Hadoop