Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the error report that there is no space on the device in the file that cannot be created in linux?

Shulou Source: shulou.com Published: 2022-06-01 03:02:45 09月17日 Update

This article introduces how to solve the error report that there is no space on the device in the linux can not be created, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

In the linux file system, when formatting, the default 16K occupies a node

Therefore, when you need to store multiple files, you must define node, which is generally set to 1K to occupy a node.

The error is as follows: the file system is generated under / data

[weblogic@web_gx filetest] $df-h

File system capacity used available mount point% used

/ dev/mapper/vg_10-lv_root

26G 17G 7.0G 72% /

Tmpfs 16G 0 16G 0% / dev/shm

/ dev/sda1 485m 37M 423m 8% / boot

/ dev/mapper/vg_10-lv_data01

9.9g 7.9g 1.5G 85% / data01

/ dev/sdc1 50G 16G 32G 33% / data

An error was reported when the file was generated:

/ bin/touch: unable to create "filetest11-627500": no space on the device

/ bin/touch: unable to create "filetest11-627501": no space on the device

/ bin/touch: unable to create "filetest11-627502": no space on the device

/ bin/touch: unable to create "filetest11-627503": no space on the device

/ bin/touch: unable to create "filetest11-627504": no space on the device

/ bin/touch: unable to create "filetest11-627505": no space on the device

/ bin/touch: unable to create "filetest11-627520": no space on the device

Then do df-I to check.

[weblogic@web_gx filetest] $df-I / data

File system Inode used (I) available (I) used (I) mount point

/ dev/sdc1 3276800 3276800 0 / data

Node has been used up.

Treatment plan:

1: delete some of Wu Yong's files

2: reformat the file system

Mkfs.ext3 / dev/sdc1-I 1024

[weblogic@web_gx data] $df-I / data

File system Inode used (I) available (I) used (I) mount point

/ dev/sdc1 3276800 1471245 1805555 45% / data

[weblogic@web_gx data] $

The script for batch generation of files is as follows:

#! / bin/bash

Shopt-s expand_aliases

Alias ll= "ls-l"

Cd / data/filetest

# first determine whether the directory exists, and create a directory if it does not exist

If [!-e filetest]

Then

/ bin/mkdir filetest

Else

Echo ""

Fi

Path=/data/filetest/filetest

Cd $path

For ((item1witi > filetest-$i)

Done

This is how to solve the error report that there is no space on the device in the file that cannot be created in linux. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Files space devices systems time settings content more formats directories help generation good interest capacity guys partners articles solutions knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL MariaDB vpn macOS