在AIX中,用户对文件系统的资源使用是有默认限制的。
该值默认是:1 GB

如下:

root@AIX-ME:/ # cat /etc/security/limits

*
* Sizes are in multiples of 512 byte blocks, CPU time is in seconds
*
* fsize      - soft file size in blocks
* core       - soft core file size in blocks
* cpu        - soft per process CPU time limit in seconds
* data       - soft data segment size in blocks
* stack      - soft stack segment size in blocks
* rss        - soft real memory usage in blocks
* nofiles    - soft file descriptor limit
* fsize_hard - hard file size in blocks
* core_hard  - hard core file size in blocks
* cpu_hard   - hard per process CPU time limit in seconds
* data_hard  - hard data segment size in blocks
* stack_hard - hard stack segment size in blocks
* rss_hard   - hard real memory usage in blocks
* nofiles_hard - hard file descriptor limit
*
* The following table contains the default hard values if the
* hard values are not explicitly defined:
*
*   Attribute        Value
*   ==========    ============
*   fsize_hard    set to fsize
*   cpu_hard      set to cpu
*   core_hard         -1
*   data_hard         -1
*   stack_hard      8388608 
*   rss_hard          -1
*   nofiles_hard      -1
*
* NOTE:  A value of -1 implies "unlimited"
*

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

root:

(过多的输出,... )

fsize,就是用户对文件系统的使用大小限制。
–> -1,表示无限制
–> 2097151,限制:1G = 1024 MB

如果在默认限制情况下,你传输一个文件,会发现它的大小一直会被限制在【1073741312】。
如下:

root@AIX-ME:/oracle_backup/primary_rman_datafile # ls -ltr
total 2097152
drwx------    2 tempme   dba             256 Jan 22 13:09 control_file
drwx------    2 tempme   dba             256 Jan 22 13:52 datafile
-rwx------    1 tempme   staff    1073741312 Jan 22 14:09 ForStandby_gdsot8bs_1_1
root@AIX-ME:/oracle_backup/primary_rman_datafile # 
root@AIX-ME:/oracle_backup/primary_rman_datafile # du -sm *
1024.00 ForStandby_gdsot8bs_1_1
870.74  control_file
0.00    datafile
root@AIX-ME:/oracle_backup/primary_rman_datafile #   

看看这个时候的tempme的文件系统限制:

root@AIX-ME:/ # su - tempme  
3004-614 Unable to change directory to "/home/tempme".
        You are in "/home/guest" instead.
$ ulimit -Ha
time(seconds)        unlimited
file(blocks)         2097151
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited
$

要立即修改某个用户的资源限制,可以使用【smitty chuser】

root@AIX-ME:/ # smitty chuser

(接下来会开启命令行图形界面,... )

图形化信息:

SMITTY修改成功后,查看一下当前的用户状态:

root@AIX-ME:/ # lsuser tempme
tempme id=255 pgrp=staff groups=staff home=/home/tempme shell=/usr/bin/ksh login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=77 registry=files SYSTEM=compat logintimes= loginretries=5 pwdwarntime=0 account_locked=false minage=1 maxage=13 maxexpired=13 minalpha=1 minother=1 mindiff=1 maxrepeats=2 minlen=8 histexpire=0 histsize=6 pwdchecks= dictionlist= default_roles= fsize=-1 cpu=-1 data=-1 stack=-1 core=-1 rss=-1 nofiles=-1 fsize_hard=-1 time_last_login=1516604481 time_last_unsuccessful_login=1516259986 tty_last_login=ssh tty_last_unsuccessful_login=ssh host_last_login=172.29.248.226 host_last_unsuccessful_login=172.29.192.1 unsuccessful_login_count=0 roles=
root@AIX-ME:/ # 

root@AIX-ME:/ # su - tempme
3004-614 Unable to change directory to "/home/tempme".
        You are in "/home/guest" instead.
$ 
$ ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited
$ 
$ ulimit -Ha
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited
$ 
$ ulimit -f
unlimited
$ 
$ ulimit -Hf
unlimited
$ 
$ exit
root@AIX-ME:/ # 

这样之后,再次传输就没问题了:

root@AIX-ME:/oracle_backup/primary_rman_datafile # du -sm *
1955.43 ForStandby_gdsot8bs_1_1
870.74  control_file
0.00    datafile
root@AIX-ME:/oracle_backup/primary_rman_datafile # 

————————————————
最后,… AIX和Linux的差别还是蛮大的,所以细节的地方容易受惯性思维影响而忽视与遗漏。
————————————————
Done。

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒