Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux prompt what to do if there is insufficient space

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to do Linux tips for lack of space. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Environment: 14.04.1-Ubuntu

Tools involved: unzip

Problem: insufficient disk space.

Error: file_write: write: No space left on device.

Background

When colleagues use the server, they find that there is no problem with compiling, that is, when packaging, it is not successful anyway. From the error message, the disk space is full, but when you look at the disk with df, there is still 10TB + space, so there is no more to follow.

Root cause

Judging from the detailed error message, it indicates that there is not enough space.

Extracted DST_PARTITIONS [boot]: 31457280 bytesConverting Android sparse image system.img to RAW.error: file_write: write: No space left on device

Moving on, the hint is that the / tmp directory is out of space.

/ tmp/targetfiles-SHfgHl/SYSTEM/app/speech-dialog/speech-dialog.apk: write error (disk full?) Continue? (y/n/ ^ C) warning: / tmp/targetfiles-SHfgHl/SYSTEM/app/speech-dialog/speech-dialog.apk is probably truncated

Use the command df to see how much room is left for / tmp. There is still 4.7GB left. Instead of looking at the remaining space of the entire machine.

~ ~: ~ / xxx$ sudo df-h / tmpFilesystem Size Used Avail Use% Mounted on/dev/sda2 109g 99g 4.7g 98% / solution

So find the root cause of the problem, just clear it under / tmp, and note that it's not /.

Sudo rm-rfv / tmp/* # # not rm-rfv / *

Then execute the relevant unzip command. The packaging command of the Android mirror package can be seen in this file flashfiles_from_target_files [1]. The specific commands are as follows.

Bin/bash-c "device/intel/build/releasetools/flashfiles_from_target_files'- unified-variants'-mv_config_default=out/*

If there are any more questions above. Please read on. Also notice that the tmp directory above is the partition / dev/sda2 mounted to the more directory /, so the tmp belongs to the contents of the more directory, so the Size is shared. If there are not many files under tmp, it is recommended to see if there are any large files under other home directories, and delete those that are not needed. There are conditions, the more common solution on the Internet is to expand!

Summary

If there is a problem, start with the error message, find the root cause and solve the problem.

References

[1] flashfiles_from_target_files: https://github.com/projectceladon/device-intel-build/blob/master/releasetools/flashfiles_from_target_files

The above content is the Linux prompt space is insufficient how to do, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report