0
0

More than 1 year has passed since last update.

ディレクトリ内のファイル数の上限【Google Compute Engine】

Last updated at Posted at 2022-04-20

TL;DR

10GBの場合、約57万個(575444)ファイルを作成できる。30GBならその3倍作成できる。
Screenshot from 2022-04-20 07-13-04.png
us-west1e2-microで試しました

/dev/sda1IFreeで残りのファイル数(575308)の上限を確認できる。

$ df -i
Filesystem     Inodes IUsed  IFree IUse% Mounted on
udev           123900   297 123603    1% /dev
tmpfs          126223   378 125845    1% /run
/dev/sda1      647168 71860 575308   12% /
tmpfs          126223     1 126222    1% /dev/shm
tmpfs          126223     3 126220    1% /run/lock
tmpfs          126223    17 126206    1% /sys/fs/cgroup
/dev/sda15          0     0      0     - /boot/efi
tmpfs          126223    10 126213    1% /run/user/1000

575444個目までは問題なくファイルを作成できる

2時間ほど実行にかかります

for i in `seq 575444`; do touch $i; done

ファイル作成後

$ df -i
Filesystem     Inodes  IUsed  IFree IUse% Mounted on
udev           123900    297 123603    1% /dev
tmpfs          126223    378 125845    1% /run
/dev/sda1      647168 647168      0  100% /
tmpfs          126223      1 126222    1% /dev/shm
tmpfs          126223      3 126220    1% /run/lock
tmpfs          126223     17 126206    1% /sys/fs/cgroup
/dev/sda15          0      0      0     - /boot/efi
tmpfs          126223     10 126213    1% /run/user/1000

image.png

575445個目を作成しようとするとNo space left on deviceになる

$ touch 575445
touch: cannot touch '575445': No space left on device

SSHで接続に失敗しログインできなくなる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0