Qiita Conference 2025

けんちょん (@drken)

読者層の解像度を高めて、読まれる記事を書こう!

3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【AIX】データ転送が停止する一因:ulimit

Last updated at Posted at 2025-04-08

はじめに

AIXをインストールした直後のLPARに対してデータを転送した際に、一定量のデータを転送して停止した際のメモです。
/etc/security/limitsを書き換えることで解決できました。

実施環境

  • 転送元:192.168.t.t (転送ファイルを持つ)
  • 転送先:192.168.r.r (AIXをインストールした直後)
  • 転送ファイル:test (8304MB)
  • 転送方法:scp

手順

scpコマンドを利用して、8304MBのtestファイルを転送した際に、1026MBの転送を行ったところで停止してしまいました。

@192.168.t.t
# scp -r test root@192.168.r.r:/
root@192.168.r.r's password:
test     12% 1026MB  26.2MB/s   04:38 ETA
scp: write remote "/test": Failure
scp: remote fsetstat: Failure
scp: failed to upload file test to /

ulimit -aにより転送先のユーザー処理リソース制限の設定を確認したところ、file(blocks)が転送ファイルのサイズと比較して小さな値に制限されていました。

@192.168.r.r
# ulimit -a
time(seconds)        unlimited
file(blocks)         2097151
data(kbytes)         131072
stack(kbytes)        32768
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  128

転送先の/etc/security/limitsを編集し、file(blocks)の制限をunlimitedにしました。

@192.168.r.r
vi /etc/security/limits

fsize = 2097151をfsize = -1に変更しました。
-1は制限がないことを示しています。

変更前

@192.168.r.r
default:
        fsize = 2097151
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

変更後

@192.168.r.r
default:
        fsize = -1
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

/etc/security/limitsを変更した転送先サーバー側でログインし直すと、
ユーザ処理リソース制限のfile(blocks)がunlimitedに変更されました。

@192.168.r.r
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         131072
stack(kbytes)        32768
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000
threads(per process) unlimited
processes(per user)  128

8304MBのtestファイルを再度転送すると、全て転送することができました。

@192.168.t.t
#scp -r test root@192.168.r.r:/
root@192.168.r.r's password:
test    100% 8304MB  26.5MB/s   05:13
気をつけること
ulimit -f unlimited

こちらのコマンドでも、file(blocks)はunlimitedに変更可能です。
しかし、/etc/security/limitsは変更されないため、再ログインした際に変更前の値に戻ります

以上です。

3
1
5

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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?