今天做项目的时候svn突然提更新不了,但是能提交,我以为是IDE自带的svn出问题,但是使用了其他的svn客户端还是不能更新代码,很是诡异!
错误出现: svn: Can't find a temporary directory
解决办法:网上搜了搜说一般这种情况出现在服务器端,磁盘满了的情况;
我的svn服务器为Centos 6.5,于是我查看了一下硬盘使用情况,
[root@localhost /]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root ext4 50G 50G 0 100% /
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
/dev/sda1 ext4 485M 40M 420M 9% /boot
/dev/mapper/VolGroup-lv_home ext4 860G 481M 816G 1% /home
根目录使用了100%,于是查找了些不用的文件删除后,svn就能正常使用了!
利用这个方法删除了部分占空间的数据后过一段时间还是这样的问题,我刚开始猜想是不是inode节点被用空了:
[root@localhost /]# df -i /dev/mapper/VolGroup-lv_root
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root 3276800 129950 3146850 4% /
很显然还有很多!
难道根下还有大文件?
[root@localhost /]# du -sh /
6.1G/
很显然也不是!
那是怎么回事呢?
应该是删除了这些文件,但是空间没有释放,当然重启可以解决目的,但是会造成服务器上所有业务中断,可使用下面命令查看删除文件占用情况:
[root@localhost /]# lsof |grep delete
NetworkMa 1651 root 13u REG 253,0 0 1974715 /var/lib/NetworkManager/timestamps.VWQYMX (deleted)
NetworkMa 1651 root 14u REG 253,0 0 1974716 /var/lib/NetworkManager/timestamps.6OOYMX (deleted)
NetworkMa 1651 root 15u REG 253,0 0 1974717 /var/lib/NetworkManager/timestamps.JROYMX (deleted)
NetworkMa 1651 root 16u REG 253,0 0 1974718 /var/lib/NetworkManager/timestamps.37QYMX (deleted)
NetworkMa 1651 root 17u REG 253,0 0 1974719 /var/lib/NetworkManager/timestamps.8OQYMX (deleted)
NetworkMa 1651 root 18u REG 253,0 0 1974720 /var/lib/NetworkManager/timestamps.0ZPYMX (deleted)
NetworkMa 1651 root 19u REG 253,0 0 1974721 /var/lib/NetworkManager/timestamps.XBPYMX (deleted)
NetworkMa 1651 root 20u REG 253,0 0 1974723 /var/lib/NetworkManager/timestamps.4UPYMX (deleted)
NetworkMa 1651 root 21u REG 253,0 0 1974725 /var/lib/NetworkManager/timestamps.MAVWMX (deleted)
NetworkMa 1651 root 22u REG 253,0 0 1974726 /var/lib/NetworkManager/timestamps.NZSYMX (deleted)
NetworkMa 1651 root 23u REG 253,0 0 1974727 /var/lib/NetworkManager/timestamps.DM6XMX (deleted)
NetworkMa 1651 root 24u REG 253,0 0 1974728 /var/lib/NetworkManager/timestamps.RC6XMX (deleted)
NetworkMa 1651 root 25u REG 253,0 0 1974729 /var/lib/NetworkManager/timestamps.4GWYMX (deleted)
NetworkMa 1651 root 26u REG 253,0 0 1974730 /var/lib/NetworkManager/timestamps.X1VYMX (deleted)
NetworkMa 1651 root 27u REG 253,0 0 1974731 /var/lib/NetworkManager/timestamps.ORWYMX (deleted)
NetworkMa 1651 root 28u REG 253,0 0 1974732 /var/lib/NetworkManager/timestamps.1XHXMX (deleted)
mysqld 2791 mysql 5u REG 253,0 0 655364 /tmp/ibbvu3EW (deleted)
mysqld 2791 mysql 6u REG 253,0 388 655365 /tmp/iblqPntL (deleted)
mysqld 2791 mysql 7u REG 253,0 0 655366 /tmp/ibHriIhA (deleted)
mysqld 2791 mysql 8u REG 253,0 0 655367 /tmp/ibPHPZdp (deleted)
mysqld 2791 mysql 13u REG 253,0 699 655368 /tmp/ibygudEe (deleted)
sh 15516 root cwd DIR 253,0 0 1573606 /usr/src/inotify-tools-3.14 (deleted)
sh 15516 root 1w REG 253,0 46488477696 1579039 /usr/src/inotify-tools-3.14/nohup.out (deleted)
sh 15516 root 2w REG 253,0 46488477696 1579039 /usr/src/inotify-tools-3.14/nohup.out (deleted)
注意看最后两行,删除的数据还在(还存在磁盘中)!
于是:
[root@localhost /]# kill -9 15516 注释:kill掉这些占用进程
再看一遍磁盘使用情况
[root@localhost /]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root ext4 50G 6.0G 41G 13% /
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
/dev/sda1 ext4 485M 40M 420M 9% /boot
/dev/mapper/VolGroup-lv_home ext4 860G 481M 816G 1% /home
这下世界清净了!
©著作权归作者所有:来自51CTO博客作者applehack的原创作品,如需转载,请与作者联系,否则将追究法律责任
svnsvn更新不了php学习分享