tencent cloud

Cloud Virtual Machine

Perkembangan dan Pengumuman
Perkembangan Produk
Perkembangan Pembaruan Image Publik
Pengumuman Produk
Pengantar Produk
Ikhtisar Cloud Virtual Machine (CVM)
Keunggulan Produk
Konsep Dasar
Wilayah dan Zona
Tutorial
Service Regions and Service Providers
Penagihan Produk
Ikhtisar Penagihan
Metode Penagihan
Item penagihan
Ikhtisar Konversi Metode Penagihan
Instans Pembelian
Panduan Penagihan Penyesuaian Konfigurasi
Penjelasan Tunggakan
Mulai Cepat
Pembelian CVM Linux yang Kustom
Pembelian CVM Windows yang Kustom
Panduan Pengguna
Ikhtisar Panduan Operasi
Ikhtisar Batas Penggunaan
Instance
Spot Instance
Instance Cadangan
Image
Penyimpanan
Pencadangan dan Pemulihan
Jaringan
Keamanan
Kata Sandi/Kunci Sandi
Pemantauan dan Alarm
Manajemen Operasi
Migrasi Server
Migrasi Online
Migrasi Offline
Konsultasi Migrasi
Penanganan Masalah
Masalah Terkait Login Instance Windows
Masalah Login Instance Linux
Masalah Lain Terkait Login Instance
Masalah Operasional Instance
Masalah Memori Instance Linux
Gangguan Jaringan
Tutorial Praktis
Saranan Pemilihan CVM
Membangun Lingkungan
Membangun Aplikasi
Membangun Halaman Visual
Mengunggah File Lokal ke CVM
Uji Kinerja Jaringan
Tutorial Praktis Lainnya
Keamanan dan Kesesuaian
Manajemen Akses
Jaringan
Pertanyaan Umum
Wilayah dan Zona
Tentang Tagihan
Instance
Penyimpanan
Terkait Image
Terkait Migrasi Server
Terkait Jaringan
Terkait Keamanan
Terkait Operasi dan Pemantauan
Terkait Manajemen Akses
Terkait Layanan NTP
Terkait Skenario Aplikasi
Agreements
CVM Service Level Agreements
Red Hat Enterprise Linux Image Service Agreement
Public IP Service Level Agreement
Glosarium
DokumentasiCloud Virtual Machine

Insufficient Space Remaining for File Creation

Mode fokus
Ukuran font
Terakhir diperbarui: 2024-01-06 17:32:18

Issue Description

When you create a file in the Linux CVM, the error "no space left on device" is reported.

Common Causes

The disk space is full
The file system's inode is full
df and du are different
Files have been deleted, but there are still processes holding corresponding file handles, resulting in the disk space not being released.
Mounts are nested. For example, if the /data directory of the system disk uses a lot of space, and /data is used as a mount point of other data disks, then the df and du of the system disk will be different.

Solution

Troubleshoot the problems as instructed in Steps.

Steps

Solving the problem of full disk space

1. Log in to the Linux instance in the standard login method.
2. Run the following command to check the disk utilization.
df -h
3. Locate the mount point with a high disk utilization and run the following command to enter the mount point.
cd mount point
For example, to enter the system disk mount point, run cd /.
4. Run the following command to find directories that occupy a large space.
du -x --max-depth=1 | sort -n
Perform the following steps for the located directory with the largest occupied space:
If the directory capacity is much lower than the total disk space, proceed to the Solving the problem of df and du inconsistency step.
If the directory capacity is large, perform step 2 to locate files that occupy a large space and evaluate whether they can be deleted based on the business conditions. If not, expand the disk capacity as instructed in Expanding Cloud Disks.

Solving the problem of full file system inode

1. Log in to the Linux instance in the standard login method.
2. Run the following command to check the disk utilization.
df -h
3. Locate the mount point with a high disk utilization and run the following command to enter the mount point.
cd mount point
For example, to enter the system disk mount point, run cd /.
4. Run the following command to find the directory with the largest number of files. This command is time-consuming, so wait patiently.
find / -type f | awk -F / -v OFS=/ '{$NF="";dir[$0]++}END{for(i in dir)print dir[i]" "i}' | sort -k1 -nr | head

Solving the problem of df and du inconsistency

Solving the problem of processes occupying file handles

Run the following command to view the processes occupying files.
lsofgrep delete
Perform the following steps according to the returned result:
Kill the corresponding processes.
Restart the service.
If many processes occupy file handles, restart the server.

Solving the problem of nested mounts

1. Run the mount command to mount a highly utilized disk to /mnt; for example:
mount /dev/vda1 /mnt
2. Run the following command to enter /mnt.
cd /mnt
3. Run the following command to find directories that occupy a large space.
du -x --max-depth=1 | sort -n
According to the returned result, evaluate whether the directories or files can be deleted based on the business conditions.
4. Run the umount command to unmount the disk; for example:
umount /mnt

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan