我们在负载均衡器后面运行2个AWS EC2实例。实例1正在按预期工作,而实例2不执行git更新。
a = [['0', '1', '.5'], ['3', '1', '.7'], ['18','16','.4']]
d = {}
for (x,y,z) in a:
d[tuple(sorted(int(i) for i in (x, y)))] = float(z)
print(d)
一个快速谷歌搜索告诉我,这意味着光盘已满,这是不对的。实例2上还剩1.2 GB:
root@ip-xx-xxx-xxx-xx:/foo/bar# git pull
remote: Counting objects: 23, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 23 (delta 15), reused 20 (delta 12), pack-reused 0
error: unable to create temporary sha1 filename : No space left on device
fatal: failed to write object
fatal: unpack-objects failed
要进行比较,这是来自工作实例1的root@ip-xx-xxx-xxx-xx:/foo/bar# df -ah
df: `/sys/kernel/debug': Function not implemented
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 6.4G 1.2G 85% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/security
udev 1.9G 12K 1.9G 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 376M 204K 375M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 0 1.9G 0% /run/shm
/dev/xvdb 4.0G 73M 3.7G 2% /mnt
:
df -ah
正如我所看到的,两个实例都应该有足够的空间。任何想法,为什么git不在第二个实例上工作?
修改
根据评论中的要求,root@ip-xx-xxx-xxx-xx:/foo/bar# df -ah
df: `/sys/kernel/debug': Function not implemented
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 6.1G 1.5G 82% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/security
udev 1.9G 12K 1.9G 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 376M 200K 375M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 0 1.9G 0% /run/shm
/dev/xvdb 4.0G 73M 3.7G 2% /mnt
df -i
因此,实例不在root@ip-xx-xxx-xxx-xx:/foo/bar# df -i
df: `/sys/kernel/debug': Function not implemented
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/xvda1 524288 524288 0 100% /
udev 477989 383 477606 1% /dev
tmpfs 480053 272 479781 1% /run
none 480053 4 480049 1% /run/lock
none 480053 1 480052 1% /run/shm
/dev/xvdb 262144 11 262133 1% /mnt
之内。据我所知,inodes
是指向磁盘上实际文件的链接。所以每个文件都创建一个。有没有办法提高这个数字?或者我还能做些什么来修复它?或者我只需要删除一些文件(实例正在运行Ubuntu 12.04,直到现在我都害怕更新,不要搞砸任何东西.Ubuntu 14.04会更好吗?我甚至可以在我出去的时候更新inodes?)在那种情况下你会做什么?