免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4243 | 回复: 0
打印 上一主题 下一主题

[SCO UNIX] LSM学习笔记之7扩大现有volume上的文件系统 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-05-26 12:35 |只看该作者 |倒序浏览
告别Tru64 UNIX,资料分享。
扩大文件系统,首先要找到这个文件系统所对应的逻辑卷,只有首先扩大逻辑卷,给文件系统以扩大的空间,才能扩大文件系统。

为扩大逻辑卷,先将该卷umount。例如,想要扩大“/data”到1000M ,就键入命令:
      # umount /data  

扩大相应卷:
      # voldg –g datadg free    (列出剩余空间)
      # volassist –g datadg growto data 1000m

加载文件系统并扩展文件系统空间:
      # mount –o extend data_dm#data /data

用df 查看unix 的文件系统的状态


root@TEST1 /# df -h
Filesystem                  Size        Used   Available Capacity  Mounted on
cluster_root#root          2048M        492M       1548M    25%    /
root1_domain#root           256M         42M        209M    17%    /cluster/members/member1/boot_partition
cluster_usr#usr            5120M        972M       4131M    20%    /usr
oracle_domain#oracle         54G         10G         44G    19%    /oracle
cluster_var#var            7168M         44M       7118M     1%    /var
/proc                          0           0           0   100%    /proc
root2_domain#root           256M         66M        185M    27%    /cluster/members/member2/boot_partition
fs_domain#fs               3072M         16K       3068M     1%    /fs
root@TEST1 /# umount /fs   
root@TEST1 /# voldg -g testdg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
dsk10a       dsk10a       dsk10        6291456   14675952  -
dsk10b       dsk10b       dsk10        0         20967424  -
dsk10d       dsk10d       dsk10        0         20967424  -
root@TEST1 /# volassist -g testdg growto volfs 5G
root@TEST1 /# mount -o extend fs_domain#fs /fs
mount: Extending AdvFS file system...
root@TEST1 /# df -h
Filesystem                  Size        Used   Available Capacity  Mounted on
cluster_root#root          2048M        492M       1548M    25%    /
root1_domain#root           256M         42M        209M    17%    /cluster/members/member1/boot_partition
cluster_usr#usr            5120M        972M       4131M    20%    /usr
oracle_domain#oracle         54G         10G         44G    19%    /oracle
cluster_var#var            7168M         44M       7118M     1%    /var
/proc                          0           0           0   100%    /proc
root2_domain#root           256M         66M        185M    27%    /cluster/members/member2/boot_partition
fs_domain#fs               5120M         16K       5116M     1%    /fs



经测试,也可以不解挂直接扩大

root@TEST1 /# df
Filesystem            512-blocks        Used   Available Capacity  Mounted on
cluster_root#root        4194304     1007418     3170176    25%    /
root1_domain#root         524288       85880      428464    17%    /cluster/members/member1/boot_partition
cluster_usr#usr         10485760     1990470     8460208    20%    /usr
oracle_domain#oracle   114014608    20852472    93093200    19%    /oracle
cluster_var#var         14680064       92158    14574128     1%    /var
/proc                          0           0           0   100%    /proc
root2_domain#root         524288      134576      379776    27%    /cluster/members/member2/boot_partition
fs_domain#fs            16777216          32    16768432     1%    /fs
root@TEST1 /# volassist -g testdg growto volfs 9G
root@TEST1 /# mount -u -o extend fs_domain#fs /fs
mount: Extending AdvFS file system...
root@TEST1 /# df
Filesystem            512-blocks        Used   Available Capacity  Mounted on
cluster_root#root        4194304     1007418     3170176    25%    /
root1_domain#root         524288       85880      428464    17%    /cluster/members/member1/boot_partition
cluster_usr#usr         10485760     1990470     8460208    20%    /usr
oracle_domain#oracle   114014608    20852472    93093200    19%    /oracle
cluster_var#var         14680064       92206    14574080     1%    /var
/proc                          0           0           0   100%    /proc
root2_domain#root         524288      134576      379776    27%    /cluster/members/member2/boot_partition
fs_domain#fs            18874368          32    18865552     1%    /fs


不知道怎么减小fs。。。

root@TEST1 /# umount /fs
root@TEST1 /# volassist -g testdg shrinkto volfs 4G
lsm:volassist: ERROR: 2018:Shrink must use -f to force the operation
root@TEST1 /# volassist -g testdg -f shrinkto volfs 4G
root@TEST1 /# mount /fs                              
mount: unknown special file or file system /fs.
root@TEST1 /# mount fs_domain#fs /fs                  
fs_domain#fs on /fs: I/O error
root@TEST1 /# volassist -g testdg shrinkto volfs 6G
lsm:volassist: ERROR: 2018:Shrink must use -f to force the operation
root@TEST1 /# volassist -f -g testdg shrinkto volfs 6G
root@TEST1 /# df -h
Filesystem                  Size        Used   Available Capacity  Mounted on
cluster_root#root          2048M        724M       1316M    36%    /
root1_domain#root           256M         42M        209M    17%    /cluster/members/member1/boot_partition
root2_domain#root           256M         66M        185M    27%    /cluster/members/member2/boot_partition
cluster_usr#usr            5120M        972M       4131M    20%    /usr
cluster_var#var            7168M         91M       7071M     2%    /var
/proc                          0           0           0   100%    /proc
oracle_domain#oracle         54G       7877M         47G    15%    /oracle
fs_domain#fs               9216M         16K       9212M     1%    /fs
root@TEST1 /# ls /fs
.tags        quota.group  quota.user
root@TEST1 /# mount -u -o extend fs_domain#fs /fs
mount: Extending AdvFS file system...
root@TEST1 /# df -h
Filesystem                  Size        Used   Available Capacity  Mounted on
cluster_root#root          2048M        724M       1316M    36%    /
root1_domain#root           256M         42M        209M    17%    /cluster/members/member1/boot_partition
root2_domain#root           256M         66M        185M    27%    /cluster/members/member2/boot_partition
cluster_usr#usr            5120M        972M       4131M    20%    /usr
cluster_var#var            7168M         91M       7071M     2%    /var
/proc                          0           0           0   100%    /proc
oracle_domain#oracle         54G       7877M         47G    15%    /oracle
fs_domain#fs               9216M         16K       9212M     1%    /fs
root@TEST1 /#      
root@TEST1 /#
root@TEST1 /# umount /fs
root@TEST1 /# mount -u -o extend fs_domain#fs /fs
mount: Extending AdvFS file system...
fs_domain#fs on /fs: Specified device does not match mounted device
root@TEST1 /# mount  -o extend fs_domain#fs /fs  
mount: Extending AdvFS file system...
fs_domain#fs on /fs: I/O error
root@TEST1 /# volassist -f -g testdg growto volfs 7G  
root@TEST1 /# mount  -o extend fs_domain#fs /fs     
mount: Extending AdvFS file system...
fs_domain#fs on /fs: I/O error
root@TEST1 /# volassist -f -g testdg growto volfs 9G
root@TEST1 /# mount  -o extend fs_domain#fs /fs     
mount: Extending AdvFS file system...
root@TEST1 /# df -h
Filesystem                  Size        Used   Available Capacity  Mounted on
cluster_root#root          2048M        724M       1316M    36%    /
root1_domain#root           256M         42M        209M    17%    /cluster/members/member1/boot_partition
root2_domain#root           256M         66M        185M    27%    /cluster/members/member2/boot_partition
cluster_usr#usr            5120M        972M       4131M    20%    /usr
cluster_var#var            7168M         91M       7070M     2%    /var
/proc                          0           0           0   100%    /proc
oracle_domain#oracle         54G       7877M         47G    15%    /oracle
fs_domain#fs               9216M         16K       9212M     1%    /fs
root@TEST1 /#

7扩大现有volume上的文件系统.zip

2.37 KB, 下载次数: 90

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP