Run R error R cannot r_tempdir, then find/DEV/MAPPER/VG00-LV01 disk space is full

Source: Internet
Author: User

Today, when I ran the R script, I reported a mistake: Fatal error:cannot create ' R_tempdir '. In addition to the problem of writing their own code, thinking that should be one of the reasons not seen, Google, found that the net is the/tmp folder full of disk space.

Run the DF command:

Filesystem            Size  used Avail use% mounted on/dev/mapper/vg00-lv01                             50G   47G   16M 100%/

I found a partition that was fully occupied ...

The first time you encounter this situation, continue to Google, using the following command

Du-sh/* | Sort-nr

You can get a sorted result of the size of all files and directories under/directory.

Find the biggest, in my machine/var file occupies 47 g size, it should be, use the above command to continue tracking:

du-sh/var/* | sort-nrdu-sh/var/log/* | sort-nrdu-sh/var/log/httpd/* | Sort-nr

One layer down the track, and finally found that the httpd/directory of Ssl_error_log occupy the ultra-large disk space, read the contents of the file, it is estimated that a link caused a large number of error messages are written over and over again.

Don't think much, just delete this file.

Run Df-i:

Filesystem              inodes  iused     IFree iuse% mounted on/dev/mapper/vg00-lv01 3276800 226882   3049918    7%/tmpfs                  4069835      7   4069828    1%    /dev/shm/dev/md0 51200 the 51161 1%/boot/ Dev/mapper/vg00-lv02                      56705024  11756  56693268    1%/opt

There is not much usage, because I view inode nodes, and file sizes are different concepts.

Run the df-h command again:

Filesystem            Size  used Avail use% mounted on/dev/mapper/vg00-lv01                             50G   47G   16M 100%/

Still 100%, obviously has been deleted ah ... Puzzled, continue Google's.

The conclusion is "in Linux, when we use RM to delete large files on Linux, but if a process opens this large file, but does not close the handle of the file, then the Linux kernel will not release the disk space of this file, resulting in disk space consumption of 100%, The entire system is not functioning properly. In this case, the disk space found by the DF and Du commands cannot be matched, the DF displays disk 100%, and the Du lookup directory has a small disk capacity. ”

Locate the file user and kill it:

Lsof-n | grep deleted

Find the process that uses the Ssl_error_log file, kill it, and then df-h again, and find that there are no more than 100% cases.

Processing Complete ~ ~

Run R error R cannot r_tempdir, then find/DEV/MAPPER/VG00-LV01 disk space is full

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.