AIX ulimit: 0511-065 Requested a write of XXXX bytes, but wrote only YYY.

A quickie one because I keep forgetting about this often enough that I figured it was worth a quick blog post.

This is related to AIX, and the error:


AIX ulimit: 0511-065 Requested a write of XXXX bytes, but wrote only YYY.

This is a ulimit issue that can be fixed in /etc/security/limits file on AIX. (Read more about ulimit at my first blog post regarding ulimit writen for linux, still a good intro!)

aix-ulimit

The default fsize is set to 2gig. I come up on this because as a habit I like to copy the install .iso to the local disk. The install .iso often is larger than 2gig.

Here is an example ftp session:


fileserver:/staging/iso/AIX/AIX_6.1_TL9_iso # ftp 192.192.192.192
Connected to 192.192.192.192.
220 AIXserver FTP server (Version 4.2 Tue Feb 26 11:59:32 CST 2013) ready.
Name (192.192.192.192:byau): byau
331 Password required for byau.
Password:
230-Last unsuccessful login: Mon May 18 22:21:53 CDT 2015 on ftp from ::ffff:172.25.12.26
230-Last login: Mon May 18 22:21:56 CDT 2015 on ftp from ::ffff:172.25.12.26
230 User byau logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /spinstall
250 CWD command successful.
ftp> prompt
Interactive mode off.
ftp> bin
200 Type set to I.
ftp> put *iso
local: AIX_6.1_Base_Operating_System_TL_6100-09-00_DVD_1_of_2_112013.iso remote: AIX_6.1_Base_Operating_System_TL_6100-09-00_DVD_1_of_2_112013.iso
229 Entering Extended Passive Mode (|||34829|)
150 Opening data connection for AIX_6.1_Base_Operating_System_TL_6100-09-00_DVD_1_of_2_112013.iso.
0% | | -1 0.00 KB/s --:-- ETA
452 Error writing file: A file cannot be larger than the value set by ulimit.
ftp> bye
221 Goodbye.
fileserver:/staging/iso/AIX/AIX_6.1_TL9_iso #

You can test it using “dd” to write a file.

bash-3.2# dd if=/dev/zero of=3gigfile bs=1024 count=3000000
dd: 0511-065 Requested a write of 1024 bytes, but wrote only 512.
bash-3.2#

To fix, check the /etc/security/limits file

You will see this:


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

root:

daemon:

bin:

sys:

adm:

uucp:

guest:

nobody:

lpd:

Note the default “fsize”

Add in an “unlimited” value for “fsize” for root


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

root:
fsize = -1

daemon:

bin:

sys:

adm:

uucp:

guest:

nobody:

lpd:

Log back out and log back in (new shell) and you’re good to go!

, Geek, Unix

Leave a Comment

Your email address will not be published. Required fields are marked *

Spam protection by WP Captcha-Free