New answers tagged

1

If you use monit you might be able to do this to monitor the filesystem and restart mysql-services when disk space is too low. Check https://mmonit.com/monit/documentation/monit.html#filesystem_flags_testing


1

As you say, you are asking for an unorthodox solution, but since you acknowledge that, you can check free space with df df /partition/you/need/to/monitor Parse the output of that, and based on what you find, restart your mysql service. You'll probably need root privs for that, so you might need to give yourself permission to restart the service with a ...


1

If you use systemd to start mysql then you can add LimitFSIZE to the unit file. Without systemd you can use ulimit: bash -c 'ulimit -f 100; dd if=/dev/zero of=bigfile bs=10M count=1; echo foo' Both approaches do not refer to the free space, though. You have to calculate in advance how much they may consume. Maybe file system quota are more flexible (I ...


3

You can use df with the total flag --total produce a grand total df --total or df --total -h for human readable output (i.e K,M,G) This wil produce output such as Filesystem Size Used Avail Use% Mounted on /dev/sda2 23G 13G 8.7G 60% / udev 4.0G 124K 4.0G 1% /dev tmpfs 4.0G 72K 4.0G 1% /dev/shm ...


0

If you don't mind changing your file system type and a full backup/restore of your data, a "zero overhead" solution is possible by creating a ZFS pool on your 2TB disk and then one file system per user. The "zfs list" command will then tell you in real time the disk usage for each user without requiring you to enable disk quota. ZFS will also allow enabling ...


0

You can use pydf. It's an improved version of df. http://linux.die.net/man/1/pydf It produces an output like this: Filesystem Size Used Avail Use% Mounted on /dev/sdb5 92G 16G 70G 17.9 [##...........] / /dev/sdb6 347G 31G 298G 9.0 [#............] /home


1

df (or df -h for "human readable" sizes) shows you the filesystem devices, how big are they, how much is used, how much is available, and their mount points in the system. Take a look here if you want to see some more console commands in your Linux Mint.


4

You can use the df command: $ df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 799M 8.7M 790M 2% /run /dev/xvda1 50G 6.3G 41G 14% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup ...


1

In this particular scenario, you have 3 primary and 1 extended partition. If you look at the output of fdisk -l and pay attention to /dev/sda2 End and /dev/sda3 Start, you have a bit of space there. My guess is that your only option is to move data from /dev/sda3 (/boot) partition over network or with some external media (USB etc), unmount /boot, delete ...


0

The following command not only find you the top 50 largest files (>100M) on your filesystem, but also sort (GNU sort) by the biggest: find / -xdev -type f -size +100M -exec du -sh {} ';' | sort -rh | head -n50 -xdev Don't descend directories on other filesystems. On BSD find use -x which is equivalent to the deprecated -xdev primary. For all ...


0

Did the move complete? Are there any open file handles to the files? I ask because you can delete an open file and it will be removed from the directory listing but the disk space won't be freed until the last open file handle is closed.


0

The difference is due to Linux reserving 5% of the space (by default) on the file system for the root user. You can tell that in your case, the missing amount is 5% of the total amount. This reserved space is not considered available, nor is it in use. Thus, all the figures are correct. Linux does this for various reasons. For one, if something were to fill ...


3

Mounting a disk over /home/user/mydata does NOT remove anything from the existing /home/user/mydata. It just 'covers up' the directory with the other disk. If you want to reclaim the disk space from /home/user/mydata, you need to manually delete/move those files to the new disk before mounting.


0

boot your vm with a linux livecd like Ubuntu Mate or something. once booted use gparted to shrink your / partition and grow /boot to 1G . This will work given the fact that your / has some space left. Or there is another way. From VMware documentation here : ...


0

Below file consume more space on your system (/boot). if you can remove the older file you can free up some space. Make sure you have a backup before attempting remove. initramfs-2.6.32-358.el6.x86_64.img System.map-2.6.32-358.el6.x86_64 vmlinuz-2.6.32-358.el6.x86_64


0

You can use sed also. I could say you can do the following $ du -sh /storage/sqlBackup/* | sed 's|/storage/sqlBackup/||g' | sort -h


4

This will give you better results: (cd /storage/sqlBackup; du -sh * | sort -h) (note the -h parameter to sort).


0

Use the qdirstat-cache-writer or kdirstat-cache-writer Perl script on your server, copy the file to your desktop machine and view it there with QDirStat / KDirStat. See also: https://github.com/shundhammer/qdirstat https://github.com/shundhammer/qdirstat/tree/master/scripts -- HuHa (KDirStat / QDirStat author)


1

use df -P: -P, --portability use the POSIX output format $ df -P Filesystem 1024-blocks Used Available Capacity Mounted on /dev/mapper/vg00-lv_root 14987656 4220264 9999392 30% / tmpfs 4026908 60932 3965976 2% /dev/shm /dev/sda1 487652 ...


2

Use sort's -h option instead of -n: du -sh /* | sort -hr | head -n20


2

450MB is not much for a root+boot partition on a modern amd64 system. If you want to install multiple kernels, you're going to have to reorganize your partitions. Even if you don't, it's pretty tight. Given the partitions you have now, I suggest moving the root partition to what is now /var. Since you're going to move the root partition, boot from rescue ...


2

You could (perhaps) use: du --max-depth=1 -h some_target_directory | sort -hr given the version of the tools has the options available. To skip the total; something like: du --max-depth=1 -h some_target_directory | sort -hr | tail -n +2



Top 50 recent answers are included