1、先创建mount point
# mkdir /dir2
2、使用crfs命令创建文件系统并mount到/dir1点
# crfs
Usage: crfs -v Vfs {-g Volumegroup | -d Device} -m Mountpoint
[-u Mountgroup] [-A {yes|no}] [-t {yes|no}] [-p {ro|rw}]
[-l Logpartitions] [-n nodename] [-a Attribute=Value]
-bash-3.00# crfs -v jfs2 -g rootvg -m /dir2 -A no -a size=1G
File system created successfully.
1048340 kilobytes total disk space.
New File System size is 2097152
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 16 16 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 80 80 1 open/syncd /
hd2 jfs2 64 64 1 open/syncd /usr
hd9var jfs2 64 64 1 open/syncd /var
hd3 jfs2 16 16 1 open/syncd /tmp
hd1 jfs2 48 48 1 open/syncd /home
hd10opt jfs2 64 64 1 open/syncd /opt
fslv00 jfs2 128 128 1 closed/syncd /u01
loglv00 jfslog 1 1 1 closed/syncd N/A
fslv01 jfs2 1 1 1 open/syncd /dir
fslv02 jfs2 16 16 1 closed/syncd /dir2
rootdbs jfs2 2 2 1 closed/syncd N/A
# mount /dev/fslv02 /dir2
# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.00 1.73 66% 2944 1% /
/dev/hd2 4.00 2.41 40% 19299 4% /usr
/dev/hd9var 4.00 3.95 2% 1244 1% /var
/dev/hd3 1.00 0.31 69% 56 1% /tmp
/dev/hd1 3.00 2.02 33% 252 1% /home
/proc - - - - - /proc
/dev/hd10opt 4.00 3.02 25% 726 1% /opt
/dev/fslv01 0.06 0.06 1% 4 1% /dir1
/dev/fslv02 1.00 1.00 1% 4 1% /dir2
-bash-3.00#
3、在线扩充文件系统
# chfs
Usage: chfs [-n Nodename] [-m NewMountpoint] [-u Group] [-A {yes|no}]
[-t {yes|no}] [-p {ro|rw}] [-a Attribute=Value] [-d Attribute]
Filesystem
将/dir2扩大500M
# chfs -a size=+500M /dir2
Filesystem size changed to 3145728
查看/dir2是否已经扩大
# df -g /dir2
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv02 1.50 1.50 1% 4 1% /dir2
将/dir2扩大到2G
# chfs -a size=2G /dir2
Filesystem size changed to 4194304
/dir2由原来的1.5G扩至2G
# df -g /dir2
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv02 2.00 2.00 1% 4 1% /dir2
4、缩小文件系统
将/dir2缩小1G
# chfs -a size=-1G /dir2
Filesystem size changed to 2097152
已经将/dir2缩小了1G
# df -g /dir2
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv02 1.00 1.00 1% 4 1% /dir2
-bash-3.00#
在线扩容和缩小文件系统方面,AIX做的比HP UX好多了。记得上次在HPUX扩容一个目录,结果要等人家停应用,把mount point先umount才能extendfs;而AIX则无需umount文件系统,即使是根目录。
赞一个~
阅读(10756) | 评论(0) | 转发(2) |