- Community Home
- >
- HPE Community, China
- >
- 服务器
- >
- 9000服务器
- >
- 关于HPUX删除文件不能释放空间的问题
类别
Company
Local Language
论坛
讨论平台
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
论坛
博客
- 将帖子标记为未读
- 加注书签
- 订阅
- 禁止
- 订阅此主题的 RSS 提要
- 高亮显示此帖
- 打印此帖
- 报告不当内容
修改时间 07-03-2015 07:45 PM
修改时间 07-03-2015 07:45 PM
关于HPUX删除文件不能释放空间的问题
关于HPUX删除文件不能释放空间的问题
1 问题描述
经常遇到客户反映文件系统使用率很高了,可是删除了文件,却不能释放出空间的问题。这种情况通常是由于被删除文件仍然被其它进程打开,其访问路径已经被删除,处于unlinked状态,ls不能将其列出,可是bdf仍然不能显示文件系统的空间已经被释放。
2 HPUX的解决方法
遇到这种问题,通常是找出打开这些已经删除文件的进程,将其停止,就可以释放出相关的资源。在HPUX下有三种工具可以查找这些unlinked文件和它相关的进程,分别是crashinfo(4.45以上版本)、lsof、uli。下面以crashinfo为例介绍:
bdf显示/opt文件系统使用率100%
root(fjems2)[/tmp/hp]>bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 557056 278432 276584 50% /
/dev/vg00/lvol1 327680 177984 148560 55% /stand
/dev/vg00/lvol8 5111808 3682048 1423848 72% /var
/dev/vg00/lvol7 6488064 2626984 3830936 41% /usr
/dev/vg00/lvol4 2097152 1586096 507088 76% /tmp
/dev/vg00/lvol10 20971520 15159291 5448986 74% /oracle
/dev/vg00/lvol6 4980736 4980736 0 100% /opt
/dev/vg00/lvol5 32768 8464 24120 26% /home
/dev/vg00/lvol9 78643200 56193512 21046617 73% /data
du显示/opt文件系统的空间使用只有1.5G远远小于实际文件系统的空间,用户反映删除文件后,空间没有释放。
root(fjems2)[/tmp/hp]>du -sk /opt
1580834
用crashinfo -unlinked 查找unlink的文件,显示5822进程打开的unlinked文件有3G大小。
root(fjems2)[/tmp/hp]>./crashinfo -unlinked
crashinfo (5.28)
crashinfo (5.28)
Note: HP CONFIDENTIAL
libp4 (9.373): Opening /stand/current/vmunix /dev/kmem
Loading symbols from /stand/current/vmunix
Kernel TEXT pages not requested in crashconf
Will use an artificial mapping from a.out TEXT pages
Loading symbols from /stand/current/mod/gvid_him_cons
Loading symbols from /stand/current/mod/dmpaa
Loading symbols from /stand/current/mod/dmpaaa
Loading symbols from /stand/current/mod/dmpap
Loading symbols from /stand/current/mod/dmpapg
Loading symbols from /stand/current/mod/dmpapf
Loading symbols from /stand/current/mod/dmpjbod
Loading symbols from /stand/current/mod/dmphpalua
Loading symbols from /stand/current/mod/dmphdsalua
Loading symbols from /stand/current/mod/pfil
Loading symbols from /stand/current/mod/ipf
Loading symbols from /stand/current/mod/rng
Loading symbols from /stand/current/mod/gvid_info
Command line: ./crashinfo
Top 10 largest unlinked files (full report with -verbose):
PID FD COMMAND INODE DEVICE BYTES
--- ---- ------- ----- ------ -----
5822 1 remsh 6512 /dev/vg00/lvol6 3039870976
11228 1 rtereset 372542 /dev/vg00/lvol9 6618
14497 5 rteinit 432986 /dev/vg00/lvol9 100
16733 5 rtesfmrtp 432986 /dev/vg00/lvol9 100
19183 5 rteevnreg 432986 /dev/vg00/lvol9 100
19778 5 rtemgrd 432986 /dev/vg00/lvol9 100
20380 5 rtelmd 432986 /dev/vg00/lvol9 100
28955 5 midbrowser 432986 /dev/vg00/lvol9 100
2784 8 swagentd 2689 /dev/vg00/lvol8 52
查找相关进程 。
root(fjems2)[/tmp/hp]>ps -ef|grep 5822
osa 5822 5821 0 Nov 26 ? 0:51 remsh ems2 -l osa /data/users/osa/bin/vsmc_start
root 27146 22989 0 15:56:16 pts/5 0:00 grep 5822
通知客户停止相关进程,系统恢复正常。
3 其它平台类似问题的解决方法
AIX平台可以用fuser -d 来查找unlinked文件和相关进程。
Linux平台可以用lsof来查找unlinked文件和相关进程。
Solaris平台也可以用lsof来查找unlinked文件和相关进程。