Operating System - HP-UX
1847707 Members
4180 Online
110265 Solutions
New Discussion

Re: file larger than 2 GB

 
ziad_1
Frequent Advisor

file larger than 2 GB

Hi All,

I want to copy and create files larger than 2 GB, please can you advise what command I must perform and is there any kernel parameters that I must change in the Kernel. the OS is HP-UX 11i version 1. thanks in advance.
ziad
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: file larger than 2 GB

Hi:

You simply need to enable 'largefiles" for the filesystem in which you want to create or copy into.

If you are creating a new filesystem:

# newfs -F vxfs -o largefiles /dev/vgNN/rlvolX

(note the use of the RAW device)...

If you have a existing filesystem and want to enable largefile support:

# fsadm -F vxfs -o largefiles /dev/vgNN/rlvolX

If you have OnlineJFS there is no need to unmount the filesystem beforehand.

Regards!

...JRF...
Stuart Abramson
Trusted Contributor

Re: file larger than 2 GB

I may be a little out of date on this, but the following utilities don't work on large files:

9. Backup utilities that work with large files:

dd
fbackup/frecover

10. UNIX utilities that won't work with large files:

tar, cpio
mail
shell script files (i.e. - ksh -x large_file)
vi
executables (loader)
print files
gzip

11. HP-UX 11.0 will completely support large files.

but not the utilities listed above.

12. All this is explained in:

/usr/share/doc/lg_files.txt

14. You can download "gtar" from:

http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.13.25/

but I had trouble with it.

15. You need a new "gzip" to support large files

You can get it at:

http://hpux.cs.utah.edu/
http://public.www.planetmirror.com/pub/hpux/Gnu/gzip-1.3.3/
http://hpux.asknet.de/hppd/hpux/Gnu/gzip-1.3.3

16. Here is a script to check largefiles status on a server:

##
# acshps05:~/bin/checklargefiles.ksh SDA 06/17/03
#
# Check Set large files. I forget to do this.
#
USAGE="Usage: checklargefiles.ksh "
#

if (( $# > 1 ))
then
print $USAGE
exit 1
fi

LV=${1:-dev} # Set default vgname

set -u

# Initialize counters

mount -p | grep -v vg00 | grep $LV | awk '{print $2}' | while read FS
do
FSADM=$(fsadm $FS 2>/dev/null)
print $FS "\t" $FSADM
done
Ken Grabowski
Respected Contributor

Re: file larger than 2 GB

Assuming you have already created or modified a file system to accept largefiles (those files 2GB or greater), as stated in the prior post, you can copy largefiles using the cp command. The mv command can also be used to move files between file systems.

You can use cpio or tar to copy largefiles between tape and file systems. However, you can NOT use cpio or tar to copy files between file systems.
Ted Buis
Honored Contributor

Re: file larger than 2 GB

You can also enable large files via sam. That is the easiest way if you don't know the commands.
Mom 6