Portal Home > Knowledgebase > Articles Database > No space left on device - But there is space....


No space left on device - But there is space....




Posted by vbgamer45, 05-15-2014, 12:56 PM
Running into a tricky issue for me: No space left on device - when there is pretty of space left on the drive. Unable to create a table with a specific file name in a mysql database. I can create a table with other file names but I can not rename the table, or rename the physical file itself. Example error: mv: cannot move `optimusrust2_gallery_usersettings.frm' to `optimusrust_gallery_usersettings.frm': No space left on device Databse is in MyISAM format uses .frm, .MYD and .MYI files was able to move the last two just not .frm without getting that error. I am able to create other tables/files...Not sure if it is due to the number of files in the folder which is in the millions. /tmp/ is empty /var/tmp/ is empty df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 518G 133G 359G 27% / tmpfs 32G 0 32G 0% /dev/shm /dev/sda1 194M 32M 153M 18% /boot df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda3 34488320 12944003 21544317 38% / tmpfs 8242395 1 8242394 1% /dev/shm /dev/sda1 51200 39 51161 1% /boot

Posted by prashant1979, 05-15-2014, 01:15 PM
Try repairing the tables that are giving problems. What it the memory consumption?

Posted by vbgamer45, 05-15-2014, 01:17 PM
I am unable to repair the table since I can't create the table. Tasks: 481 total, 1 running, 480 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.1%sy, 0.0%ni, 99.0%id, 0.6%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 65939164k total, 14041236k used, 51897928k free, 3607636k buffers Swap: 33554424k total, 0k used, 33554424k free, 3970204k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2884 mysql 20 0 14.4g 3.5g 4260 S 9.3 5.5 56783:05 mysqld

Posted by sysc, 05-15-2014, 01:21 PM
There are definitely file limits per folder - but the exact number depends on the file system being used. Check out http://thelinuxexperiment.com/of-fil...nd-partitions/

Posted by vbgamer45, 05-15-2014, 01:34 PM
Hmm checking into http://stackoverflow.com/questions/4...ry-is-too-many Get mixed singles from what I read some people say you can have millions in a directory others say there is a directory index limit.

Posted by nixtree, 05-15-2014, 01:37 PM
Files in millions under a directory? Then you should definitely look into the number of files under a directory limit for your FS.

Posted by sysc, 05-15-2014, 01:38 PM
Like I said above, there are limits. The exact number depends on the file system you are using on the partition.

Posted by vbgamer45, 05-15-2014, 01:40 PM
I am using ext4

Posted by nixtree, 05-15-2014, 02:11 PM
4 billion is the limit for ext4 it seems..thats for the FS defined while creating it.

Posted by vbgamer45, 05-15-2014, 05:11 PM
Any ideas on what to fix? I can try deleting some old tables but I do not think that will fix the problem since I can't create that specific table.

Posted by LVPSHosting, 05-16-2014, 04:19 AM
Maybe there is an inode limit? Check with: df -i

Posted by vbgamer45, 05-16-2014, 08:06 AM
Says there is still a lot left... df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda3 34488320 12944003 21544317 38% / tmpfs 8242395 1 8242394 1% /dev/shm /dev/sda1 51200 39 51161 1% /boot

Posted by foobic, 05-16-2014, 08:12 AM
Have you checked there isn't already a file there called optimusrust_gallery_usersettings.frm (or .myi / .myd)? Perhaps it's just seeing a write error.

Posted by vbgamer45, 05-16-2014, 08:16 AM
There is no file rm: cannot remove `optimusrust_gallery_usersettings.frm': No such file or directory

Posted by YUPAPA, 05-16-2014, 08:30 AM
The problem happens with just one database or all? If all, do you have quota set in place? Do you have any issue with file system operation outside of the problematic directory?

Posted by vbgamer45, 05-16-2014, 08:36 AM
I have just noticed in that directory. Also tried to create the file in the /tmp/ folder which works then tried to copy and rename it to that directory cp: cannot create regular file `/var/lib/mysql/databasenamehere/optimusrust_gallery_usersettings.frm': No space left on device No quota

Posted by YUPAPA, 05-16-2014, 09:04 AM
I would try delete hundred of files in that directory or somewhere within that mount point at least and then rename that .FRM file again to verify if it is the inode that is the cause.

Posted by Srv24x7, 05-16-2014, 10:14 AM
Hi, Hit the "mount" command and check if the read-write permission to the drive is okay or that it has not gone into read-only.

Posted by vbgamer45, 05-16-2014, 10:24 AM
Looks ok mount /dev/sda3 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

Posted by Floxxx, 05-16-2014, 11:55 AM
try df -ih /var/lib/mysql/databasenamehere/

Posted by vbgamer45, 05-16-2014, 12:04 PM
df -ih /var/lib/mysql/databasenamehere/ Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda3 33M 13M 21M 38% /



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
vps node locks up? (Views: 491)