4、调整LV和文件系统大小
当我们的空间使用耗尽之后,如果Logical Volume Group允许,我们就可以进行空间拓展调整LV的大小。
使用smitty lvsc命令,进入调整界面。
[root@TESTMIS:/]#smitty lvsc
Set Characteristic of a Logical Volume
Move cursor to desired item and press Enter.
Change a Logical Volume
Rename a Logical Volume
Increase the Size of a Logical Volume
Add a Copy to a Logical Volume
Remove a Copy from a Logical Volume
选择increase the size of a logical volume。
Increase the Size of a Logical Volume
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* LOGICAL VOLUME name testmislv01
* Number of ADDITIONAL logical partitions [5] #
PHYSICAL VOLUME names [] +
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [64] #
to use for allocation
Allocate each logical partition copy yes +
on a SEPARATE physical volume?
File containing ALLOCATION MAP []
注意:输入的是一个增加LP个数的取值,含义是在原来基础上增加多少个LP。执行之后,我们就可以看到testmislv01的LP个数增加。
[root@TESTMIS:/]#lslv testmislv01
LOGICAL VOLUME: testmislv01 VOLUME GROUP: testmisvg
LV IDENTIFIER: 00f7fcc800004c000000013c7051ca49.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 128 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 15 PPs: 15
STALE PPs: 0 BB POLICY: relocatable
但是,对应的目录testlv01空间没有变化。
[root@TESTMIS:/]#df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
(篇幅原因,有省略……)
/dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump
/dev/testmislv01 1.25 1.25 1% 4 1% /testlv01
这里需要进行手工的空间调整,调整File System的大小属性。
[root@TESTMIS:/]#smitty manfs
Add / Change / Show / Delete File Systems
Move cursor to desired item and press Enter.
Enhanced Journaled File Systems --选择增强日志文件系统
Journaled File Systems
CDROM File Systems
Network File System (NFS)
Enhanced Journaled File Systems
Move cursor to desired item and press Enter.
Add an Enhanced Journaled File System
Add an Enhanced Journaled File System on a Previously Defined Logical Volume
Change / Show Characteristics of an Enhanced Journaled File System
Remove an Enhanced Journaled File System
Manage Quotas for an Enhanced Journaled File System
Defragment an Enhanced Journaled File System
List Snapshots for an Enhanced Journaled File System
注意:这里面我们是输入512byte的单元个数值,从原来的2621440修改为3932160。
[TOP] [Entry Fields]
File system name /testlv01
NEW mount point [/testlv01]
SIZE of file system
Unit Size 512bytes +
Number of units [2621440] #
修改
Change / Show Characteristics of an Enhanced Journaled File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
File system name /testlv01
NEW mount point [/testlv01]
SIZE of file system
Unit Size 512bytes +
Number of units [3932160] #
这其中的依据是10LP上升到15个LP,换算之后总大小为3932160个unit。合计:3932160*512=1.875GB。
执行命令如下:
Before command completion, additional instructions may appear below.
Filesystem size changed to 3932160
此时检查df –g,就可以发现容量变化。
[root@TESTMIS:/]#df -g | grep testmis
/dev/testmislv01 1.88 1.87 1% 4 1% /testlv01
5、结论
实验记录下来,留待有需要的朋友待查。
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
