-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
df -h reports wrong size #3953
Comments
Right now I've excluded all of the zfs snapshots. For each exclusion, the disk size was changed: root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Sun_20151025_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 55G 47G 7.8G 86% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Sat_20151024_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 73G 47G 26G 65% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Fri_20151023_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 83G 47G 36G 57% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@hourly_Fri_20151023_0720
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 101G 47G 54G 47% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Thu_20151022_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 108G 47G 61G 44% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Wed_20151021_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 125G 47G 78G 38% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore/mysql@daily_Tue_20151020_2000
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 157G 47G 111G 30% /var/lib/mysql
root@zabbix-mysql:~# zfs destroy datastore@hourly_Tue_20151020_0659
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 182G 47G 135G 26% /var/lib/mysql Now there is no snapshots, but the partition size (/var/lib/mysql) is wrong root@zabbix-mysql:~# zfs list -t snap
no datasets available
root@zabbix-mysql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 18G 2.9G 14G 18% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 7.9G 404K 7.9G 1% /dev
tmpfs 1.6G 628K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 157M 68M 70% /boot
datastore/tmp 5.0G 128K 5.0G 1% /tmp
datastore/mysql 182G 47G 135G 26% /var/lib/mysql
datastore/var_log 10G 21M 10G 1% /var/log
root@zabbix-mysql:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
datastore 47.0G 449G 30K legacy
datastore/mysql 46.8G 449G 46.8G /var/lib/mysql
datastore/tmp 22K 5.00G 22K /tmp
datastore/var_log 20.3M 9.98G 20.3M legacy |
Now I've fixed the problem. After the deletion of all snapshots, I've did this: 1 - umounted all datasets The good news is that there was no data loss and MySQL could recover itself. Now the question is: somebody has noticed this kind of issue before? My environment is: root@zabbix-mysql:~# dpkg -l |grep zfs
ii dkms 2.2.0.3-1.1ubuntu5.14.04.1+zfs10~trusty all Dynamic Kernel Module Support Framework
ii libzfs2 0.6.5.2-1~trusty amd64 Native OpenZFS filesystem library for Linux
ii mountall 2.53-zfs1 amd64 filesystem mounting tool
ii ubuntu-zfs 8~trusty amd64 Native ZFS filesystem metapackage for Ubuntu.
ii zfs-dkms 0.6.5.2-1~trusty amd64 Native OpenZFS filesystem kernel modules for Linux
ii zfs-doc 0.6.5.2-1~trusty amd64 Native OpenZFS filesystem documentation and examples.
ii zfsutils 0.6.5.2-1~trusty amd64 Native OpenZFS management utilities for Linux
root@zabbix-mysql:~# uname -a
Linux zabbix-mysql 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@zabbix-mysql:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty |
Closing as out of date. This was very likely caused by an open file handle preventing space from being freed. Unmounting and restarting everything would have resolved this. |
On this morning, I wake up from my bed, turn on my computer, and see this error message after tried to access my monitoring system:
Error connecting to database: Can't connect to MySQL server on (....)
After connect to the database server, I've see that MySQL partition is out of space. But the strage part of this is: df -h is reporting a size for my ZFS partitions and zfs list is reporting another size for them, which is correct.
Unfortunatelly I don't have any logs from my system because the /var/log partition is full too. It seems that this problem ocurred right after the creation of this snapshot: datastore/mysql@daily_Fri_20151023_2000
After this, I've did a zpool upgrade, them a zpool export and zpool import and nothing solved the problem.
What is wrong??
The text was updated successfully, but these errors were encountered: