- 登陆Xshell登录Linux系统后, cd 到某个指定目录时使用tab键的时候报以下错误:
-bash: cannot create temp file for here-document: No space left on device
原因: 不能创建临时文件文档,设备上没有剩余空间(告诉我们磁盘空间满了)
2.Navicat连接数据库操作数据库;
truncate ams_piece;
1030 - Got error 168 from storage engine
时间: 0.021s
3.用命令df -h 查看硬盘空间
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-rootlv 480G 480G 20K 100% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 4.0K 3.9G 1% /dev/shm
tmpfs 3.9G 379M 3.5G 10% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 197M 148M 50M 75% /boot
tmpfs 783M 12K 783M 1% /run/user/42
tmpfs 783M 0 783M 0% /run/user/0
4.查看哪个目录占用硬盘空间最大
du -sh /*
[root@localhost ~]# du -sh /*
0 /bin
137M /boot
406G /data
4.0K /dev
44M /etc
16K /home
0 /lib
0 /lib64
0 /media
0 /mnt
1.4G /opt
du: cannot access ?.proc/6257/task/6257/fd/3?. No such file or directory
du: cannot access ?.proc/6257/task/6257/fdinfo/3?. No such file or directory
du: cannot access ?.proc/6257/fd/3?. No such file or directory
du: cannot access ?.proc/6257/fdinfo/3?. No such file or directory
du: cannot access ?.proc/6258?. No such file or directory
0 /proc
60G /root
379M /run
0 /sbin
0 /srv
0 /sys
200K /tmp
13G /usr
1.4G /var
[root@localhost ~]# du -sh /data /*
406G /data
0 /bin
137M /boot
4.0K /dev
44M /etc
16K /home
0 /lib
0 /lib64
0 /media
0 /mnt
1.4G /opt
du: cannot access ?.proc/6307?. No such file or directory
du: cannot access ?.proc/6308/task/6308/fd/3?. No such file or directory
du: cannot access ?.proc/6308/task/6308/fdinfo/3?. No such file or directory
du: cannot access ?.proc/6308/fd/3?. No such file or directory
du: cannot access ?.proc/6308/fdinfo/3?. No such file or directory
0 /proc
60G /root
379M /run
0 /sbin
0 /srv
0 /sys
200K /tmp
13G /usr
1.4G /var
5.进入data
[root@localhost ~]# cd /data/mysql
[root@localhost mysql]# ll
total 422710396
drwxr-x--- 2 root root 4096 Jun 10 16:06 ams_jining
drwxr-x--- 2 root root 16384 Oct 13 2021 ams_luzhou
-rw-r----- 1 root root 56 Aug 25 2021 auto.cnf
-rw------- 1 root root 1676 Aug 25 2021 ca-key.pem
-rw-r--r-- 1 root root 1112 Aug 25 2021 ca.pem
-rw-r--r-- 1 root root 1112 Aug 25 2021 client-cert.pem
-rw------- 1 root root 1676 Aug 25 2021 client-key.pem
drwxr-x--- 2 root root 4096 Jan 11 09:52 conf_fukaikai
drwxr-x--- 2 root root 4096 Dec 14 2021 conf_gaohua
drwxr-x--- 2 root root 4096 Nov 10 2021 conf_gaoya
drwxr-x--- 2 root root 4096 Feb 8 18:15 conf_gengdl
drwxr-x--- 2 root root 4096 Oct 27 2021 conf_huyx
drwxr-x--- 2 root root 4096 Nov 2 2021 conf_lichao
drwxr-x--- 2 root root 4096 Apr 6 17:17 conf_liutao
drwxr-x--- 2 root root 4096 Mar 28 19:17 conf_shanggy
drwxr-x--- 2 root root 4096 Nov 9 2021 conf_test
drwxr-x--- 2 root root 4096 Dec 7 2021 conf_zhangdaoyang
-rw-r----- 1 root root 4701 Mar 22 11:17 ib_buffer_pool
-rw-r----- 1 root root 415236096 Jul 6 09:41 ibdata1
-rw-r----- 1 root root 50331648 Jul 6 09:41 ib_logfile0
-rw-r----- 1 root root 50331648 Jul 6 09:41 ib_logfile1
-rw-r----- 1 root root 12582912 Jul 6 09:29 ibtmp1
drwxr-x--- 2 root root 4096 Aug 25 2021 mysql
-rw-r----- 1 root root 280222953 Mar 22 11:12 mysql-bin.000001
-rw-r----- 1 root root 11923 Mar 22 11:17 mysql-bin.000002
-rw-r----- 1 root root 1073742048 Apr 30 23:06 mysql-bin.000003
-rw-r----- 1 root root 1077417073 May 7 15:37 mysql-bin.000004
-rw-r----- 1 root root 1161348124 May 7 15:39 mysql-bin.000005
-rw-r----- 1 root root 1074320149 May 7 15:48 mysql-bin.000006
-rw-r----- 1 root root 1074262433 May 7 19:12 mysql-bin.000007
6.查看磁盘占用情况
[root@localhost mysql]# du -sh *
16M ams_jining
21M ams_luzhou
4.0K auto.cnf
4.0K ca-key.pem
4.0K ca.pem
4.0K client-cert.pem
4.0K client-key.pem
1.5M conf_fukaikai
1.6M conf_gaohua
1.6M conf_gaoya
1.5M conf_gengdl
1.5M conf_huyx
1.6M conf_lichao
1.6M conf_liutao
2.2M conf_shanggy
1.5M conf_test
1.6M conf_zhangdaoyang
8.0K ib_buffer_pool
396M ibdata1
48M ib_logfile0
48M ib_logfile1
12M ibtmp1
22M mysql
268M mysql-bin.000001
12K mysql-bin.000002
1.1G mysql-bin.000003
1.1G mysql-bin.000004
1.1G mysql-bin.000005
1.1G mysql-bin.000006
1.1G mysql-bin.000007
进入mysql
[root@localhost bin]# pwd
/usr/local/mysql/bin
[root@localhost bin]# mysql -u root -p
Enter password:
执行
mysql>
mysql> reset master;
Query OK, 0 rows affected (0.03 sec)
mysql>
博客记录了登录Linux系统使用tab键报错,原因是磁盘空间满了。还提及用Navicat连接数据库操作时遇到错误,介绍了用df -h查看硬盘空间、du -sh /*查看占用最大目录等解决磁盘空间问题的方法。
1768

被折叠的 条评论
为什么被折叠?



