Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change ulimit to allow file transfer

Posted on 2013-06-18
16
Medium Priority
?
2,702 Views
Last Modified: 2013-06-19
Hello,

I'm trying to transfer a 23GB file back to my AIX box.  AIX Version 5.3.  I receive an error message which terminates the transfer.  "A file cannot be larger than the value set by ulimit".
I am logged in as root.  Can I change the value to allow the transfer?

Thank you.
0
Comment
Question by:cbones
  • 8
  • 7
16 Comments
 
LVL 23

Expert Comment

by:nemws1
ID: 39257581
What are your current limits?  Run as root:

ulimit -a

Open in new window

0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257608
Hi,

first, run

lssec -f /etc/security/limits -s root -a fsize_hard

If you see "root fsize_hard=-1" then you can set your file size limit to "unlimited" by just issuing

ulimit -f unlimited

If the above "lssec" command returns no value or a value other than -1 issue

chsec -f /etc/security/limits -s root -a fsize_hard=-1

then use "ulimit -f unlimited" to set the limit to "unlimited".

Please be aware that if the target filesystem is "jfs" (as opposed to "jfs2") it must be enabled for large files, otherwise there is a hard 2 GB limit.

Check with

lsfs -q /mount/point

if "VFS" is "jfs" then "bf: true" must be displayed.

Please note that "bf" is a creation time option which cannot be set afterwards.
0
 

Author Comment

by:cbones
ID: 39257637
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         131072
stack(kbytes)        32768
memory(kbytes)       unlimited
coredump(blocks)     2097151
nofiles(descriptors) 2000
#

file errors out around 1GB with the error.

What can I check?

Thank you.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257649
Did you check the jfs type and "bf" (see my comment)?

What do you see with

quota

?
0
 

Author Comment

by:cbones
ID: 39257665
VFS          Size               Options
  jfs2         348127232    rw


 (lv size: 348127232, fs size: 348127232, block size: 4096, sparse files: yes, inline log: no, inli
ne log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: no)
#
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257670
Are you sure that it's "root" who performs the transfer?

Which transfer tool are you using? Which is the exact command?
0
 

Author Comment

by:cbones
ID: 39257684
I am using ftp to do the transfer.  

When I type whoami it returns root.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257711
So you're doing this on AIX as root:

cd target_dir
ftp sourcehost
cd source_dir
get filename

right? If so, and if ulimit -f returns "unlimited" as you wrote, I can only assume a filesystem issue (corruption?), because everything should work just fine.

Is there something suspicious in

errpt | more

?
0
 

Author Comment

by:cbones
ID: 39257730
I am trying to ftp a file to the server.  I am doing an ftp to the aix box.  Changing to the directory I want to place the file.  Then doing a put to transfer the file to the box.

Nothing in the errpt that's  unusual.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257739
So you're doing this on the source machine

cd source_dir
ftp aix_server
(log in as root) <-- This is important!
cd target_dir
put filename

Right?
0
 

Author Comment

by:cbones
ID: 39257767
That's correct.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257777
Please make sure that the ulimit on AIX is indeed permanently set to unlimited by issuing

lssec -f /etc/security/limits -s root -a fsize

right after login and before issuing any ulimit command.

If it's still "-1" I must admit that I'm out of ideas.
0
 

Author Comment

by:cbones
ID: 39257788
Here is the output

# lssec -f /etc/security/limits -s root -a fsize
root fsize=
#
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39257802
Then:

lssec -f /etc/security/limits -s default -a fsize

If this gives an empty (or low) value too  - are you setting root's fsize limit in the .profile?

Please remember that profiles are not executed under FTP!
0
 

Author Comment

by:cbones
ID: 39257830
It did return an empty value.   I am setting this from the command line.  What do you mean in the profile?

# lssec -f /etc/security/limits -s default -a fsize
default fsize=
#
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39257845
Changing ulimit from the command line doesn't make the setting permanent - it will last just for your current shell session.
So if you were trying to get the file from the source sever this would be alright, but since you're tring to put it won't work.

Make the setting permanent:

chsec -f /etc/security/limits -s root -a fsize=-1

Now you can retry putting the file.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question