0

In linux, Can a filesystem get full even though the volume is not full, how do we differentiate filesystem and volume in terms of storage space ?

user3049437
  • 33
  • 1
  • 4
  • Fairly typical is people expanding a volume and forgetting to grow the file system to make use of that additional space. – HBruijn Oct 11 '19 at 07:31

3 Answers3

3

A file system controls how the data is stored in the volume. It separates data into pieces and give each piece a name. A group of data pieces becomes a file. The structure and logic rules used to manage the groups of information and their names is called a file system

A volume is one large body of data with no way to tell where one piece of information stops and the next begins.

File systems have technical limitations. And therefore it is certainly possible that a certain limit of the file system is reached before the underlying volume is full.

Some examples of file system limitations:

EXT2

  • Maximum disk size: 32 TB
  • Maximum file size: 2 TB
  • Maximum number of files on disk: ?
  • Maximum number of files in a single folder: ?

EXT3

  • Maximum disk size: 32 TB
  • Maximum file size: 2 TB
  • Maximum number of files on disk: ?
  • Maximum number of files in a single folder: ?

EXT4

  • Maximum disk size: 1 EB (exabyte)
  • Maximum file size: 16 TB
  • Maximum number of files on disk: 4,294,967,295
  • Maximum number of files in a single folder: ?

FAT16

  • Maximum disk size: 4 GB
  • Maximum file size: 4 GB
  • Maximum number of files on disk: 65,517
  • Maximum number of files in a single folder: 512

FAT32

  • Maximum disk size: 2 TB
  • Maximum file size: 4 GB
  • Maximum number of files on disk: 268,435,437
  • Maximum number of files in a single folder: 65,534

NTFS

  • Maximum disk size: 256 TB
  • Maximum file size: 256 TB
  • Maximum number of files on disk: 4,294,967,295
  • Maximum number of files in a single folder: 4,294,967,295 (same as total files)
eKKiM
  • 1,540
  • 9
  • 23
  • Let's say I have something like this: df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg00-root 8.8G 8.8G 10M 100% / /dev/mapper/vg00-tmp 5.8G 26M 5.5G 1% /tmp /dev/mapper/vg00-home 2.9G 202M 2.6G 8% /home does this mean the root file system is full or the volume is full ? because I have other Filesystems with same vg00 which are not showing full. – user3049437 Oct 11 '19 at 08:39
  • Your Logical Volume is full. This diagram shows you the various elements involved when using LVM: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Lvm.svg/1024px-Lvm.svg.png – eKKiM Oct 11 '19 at 08:52
  • Yes this diagram was helpful, Thanks!! – user3049437 Oct 11 '19 at 08:59
3

You might have run out of inodes even if your atcutal space is sufficient. If you run df -h you will see the used space and if you run df -i you will see the used inodes.

Maybe you have a logger going amok, filling your file system with a lot of small files. If you run this script you will find the directories containing the largest amount of files:

for i in /*; do echo -n $i:; find $i |wc -l; done

Then you drill down to the following subdir:

for i in /home/*; do echo -n $i:; find $i |wc -l; done
for i in /home/user1/*; do echo -n $i:; find $i |wc -l; done
for i in /home/user1/logs/*; do echo -n $i:; find $i |wc -l; done

...etc. Then you might find a directory or directories which shouldn't contain a lot of files, which you can delete after correcting the underlying process which fills up the directory.

Cheers,

OJ

OnkelJ
  • 96
  • 8
0

Remove large files that are open but have been deleted

lsof -nP | grep '(deleted)' + del

aa.arsenenko
  • 101
  • 2