排错练习:No space left on device
来源:互联网 发布:网络赚钱的门路2017 编辑:程序博客网 时间:2024/06/05 10:21
(101主机[root@server1 ~]#172.25.254.101,201主机[root@client1 ~]#172.25.254.201)
1、今天在client1端从101主机远程复制文件时报错No space left on device:
[root@client1 Desktop]# scp root@172.25.254.101:/root/Desktop/* .The authenticity of host '172.25.254.101 (172.25.254.101)' can't be established.ECDSA key fingerprint is 8c:6d:89:99:61:05:85:fc:d3:cd:84:01:19:6c:55:30.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '172.25.254.101' (ECDSA) to the list of known hosts.root@172.25.254.101's password:file1 100% 0 0.0KB/s 00:00 file10 100% 0 0.0KB/s 00:00 file2 100% 0 0.0KB/s 00:00 file3 100% 0 0.0KB/s 00:00 file4 100% 0 0.0KB/s 00:00 file5 100% 0 0.0KB/s 00:00 file6 100% 0 0.0KB/s 00:00 file7 100% 0 0.0KB/s 00:00 ./file8: No space left on device./file9: No space left on device[root@client1 Desktop]# lsfile1 file10 file2 file3 file4 file5 file6 file7
2、由于那两条报错,只复制过来了8个文件,本来要复制10个文件。
df查看空间发现/dev/vda2已经满了??client1这台主机才刚刚搭建的。
[root@client1 ~]# df -h文件系统 容量 已用 可用 已用% 挂载点/dev/vda2 6.1G 6.1G 124K 100% /devtmpfs 489M 0 489M 0% /devtmpfs 498M 80K 497M 1% /dev/shmtmpfs 498M 7.0M 491M 2% /runtmpfs 498M 0 498M 0% /sys/fs/cgroup
3、没办法,使用命令查看根下哪个目录占用空间比较大
tip:关于--max-depth=1的用法参考Linux下查看文件和文件夹大小
[root@client1 ~]# du -h --max-depth=1 /80K/devdu: 无法访问"/proc/3333/task/3333/fd/4": 没有那个文件或目录du: 无法访问"/proc/3333/task/3333/fdinfo/4": 没有那个文件或目录du: 无法访问"/proc/3333/fd/4": 没有那个文件或目录du: 无法访问"/proc/3333/fdinfo/4": 没有那个文件或目录0/proc7.0M/run0/sys33M/etc3.9M/root44K/tmp74M/var2.8G/usr91M/boot3.5M/home0/media3.1G/mnt0/opt0/srv6.0G/
4、发现/usr/和/mnt/目录下有问题,根目录一共7G,他俩就基本占用完了
进入这个目录发现一个3.1G大的目录,才记起来在做远程复制file这10个文件之前我还在101主机向201主机用scp -r /etc/ root@172.25.254.201:/mnt命令远程上传过的/etc目录
[root@client1 /]# cd /mnt/[root@client1 mnt]# lsetc[root@client1 mnt]# du -sh etc/3.1Getc/5、但是在101主机查看/etc目录只有33M,上传到201主机/mnt目录下却变成了3.1G
[root@server1 Desktop]# du -sh /etc/33M/etc/6、在201主机继续查看/mnt/etc下到底那个文件最大
[root@client1 etc]# du -h --max-depth=1 /mnt/etc/300K/mnt/etc/fonts28M/mnt/etc/X112.2M/mnt/etc/pki52K/mnt/etc/rpm272K/mnt/etc/ssh12K/mnt/etc/prelink.conf.d56K/mnt/etc/lvm0/mnt/etc/cron.weekly0/mnt/etc/gss20K/mnt/etc/java12K/mnt/etc/avahi0/mnt/etc/jvm16K/mnt/etc/samba0/mnt/etc/jvm-commmon0/mnt/etc/maven16K/mnt/etc/audit20K/mnt/etc/cron.daily64K/mnt/etc/logrotate.d192K/mnt/etc/dbus-14.0K/mnt/etc/my.cnf.d32K/mnt/etc/iproute212K/mnt/etc/rsyslog.d36K/mnt/etc/yum8.0K/mnt/etc/ntp0/mnt/etc/binfmt.d76K/mnt/etc/profile.d0/mnt/etc/modules-load.d12K/mnt/etc/tmpfiles.d304K/mnt/etc/systemd5.8M/mnt/etc/udev8.0K/mnt/etc/alsa148K/mnt/etc/bash_completion.d0/mnt/etc/opt0/mnt/etc/pm12K/mnt/etc/skel444K/mnt/etc/sysconfig212K/mnt/etc/xdg0/mnt/etc/xinetd.d148K/mnt/etc/libreport0/mnt/etc/terminfo12K/mnt/etc/default24K/mnt/etc/ld.so.conf.d13M/mnt/etc/selinux4.0K/mnt/etc/hp16K/mnt/etc/cron.d4.0K/mnt/etc/openldap0/mnt/etc/gnupg0/mnt/etc/popt.d3.1G/mnt/etc/alternatives3.1G/mnt/etc/
7、进入最大的目录查看是哪些文件作祟:[root@client1 ~]# cd /mnt/etc/alternatives/[root@client1 alternatives]# lsjava keytool.1.gz orbd.1.gz servertool.1.gzjava.1.gz ld pack200 tnameservjre libnssckbi.so.x86_64 pack200.1.gz tnameserv.1.gzjre_1.7.0 mkisofs rmid unpack200jre_exports mkisofs-mkhybrid rmid.1.gz unpack200.1.gzjre_openjdk mkisofs-mkhybridman rmiregistryjre_openjdk_exports mkisofs-mkisofsman rmiregistry.1.gzkeytool orbd servertool8、去101主机查看这个目录:
[root@server1 Desktop]# cd /etc/alternatives/[root@server1 alternatives]# du -sh4.0K.[root@server1 alternatives]# ll总用量 0lrwxrwxrwx. 1 root root 14 10月 17 16:07 cdrecord -> /usr/bin/wodimlrwxrwxrwx. 1 root root 30 10月 17 16:07 cdrecord-cdrecordman -> /usr/share/man/man1/wodim.1.gzlrwxrwxrwx. 1 root root 14 10月 17 16:07 cdrecord-dvdrecord -> /usr/bin/wodimlrwxrwxrwx. 1 root root 30 10月 17 16:07 cdrecord-dvdrecordman -> /usr/share/man/man1/wodim.1.gzlrwxrwxrwx. 1 root root 15 10月 17 16:07 cdrecord-readcd -> /usr/bin/readomlrwxrwxrwx. 1 root root 31 10月 17 16:07 cdrecord-readcdman -> /usr/share/man/man1/readom.1.gz . . . 9、发现全是些链接,可见在执行scp -r /etc/ root@172.25.254.201:/mnt命令时scp把/etc/alternatives/目录下的链接所对应的文件都给远程传输过来了既然没有用就删除
[root@client1 mnt]# rm -rf etc/[root@client1 mnt]# pwd/mnt10、然后查看系统空间
[root@client1 mnt]# df -h文件系统 容量 已用 可用 已用% 挂载点/dev/vda2 6.1G 3.0G 3.1G 50% /devtmpfs 489M 0 489M 0% /devtmpfs 498M 80K 497M 1% /dev/shmtmpfs 498M 6.9M 491M 2% /runtmpfs 498M 0 498M 0% /sys/fs/cgroup
11、记得第3步查出还有一个大文件在/usr目录下,用命令查看:[root@client1 usr]# du -h --max-depth=1 /usr/118M/usr/bin66M/usr/sbin445M/usr/lib696M/usr/lib641.4G/usr/share0/usr/etc0/usr/games36K/usr/include35M/usr/libexec12K/usr/local0/usr/src2.8G/usr/
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
445M /usr/lib
696M /usr/lib64
1.4G /usr/share
12、这三个目录占用空间很大,但不知道是什么文件暂时未处理
阅读全文
0 0
- 排错练习:No space left on device
- No space left on device
- No space left on device
- No space left on device
- no space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- No space left on device
- no space left on device
- jboss启动报错No space left on device
- 启动namenode节点报错:No space left on device
- No space left on device的原因
- python中的矩阵运算
- Filter(第二节)
- 数据库的基础概念知识
- LAMP部署(php-fpm模式)
- 综合练习双色球开奖
- 排错练习:No space left on device
- Jquery的引用
- node.js中的url.parse方法使用说明
- 算法基础---枚举案例
- 机器学习算法-k-means聚类算法
- 正则表达式
- [Python基础]运算符与表达式
- python实现归并排序
- MySql 5.7.20 generic binary installation linux/ubuntu 16.04