1835360 Members
3667 Online
110078 Solutions
New Discussion

Re: tar

 
SOLVED
Go to solution
Fadia Almarei
Super Advisor

tar

Dear All
i know that the restriction for the tar command is 2GB , my question is that restriction depends on the media i do the backup in ,i mean that is this restriction deiffers if i do the backup on a tape or in the disk . speacially in the disk is there is more reston.
fadia.marei
14 REPLIES 14
Mark Grant
Honored Contributor

Re: tar

It is a restriction is "tar" itself, it doesn't matter what you are trying to read from or write to. However, GNU tar gets around this problem as does using "pax".
Never preceed any demonstration with anything more predictive than "watch this"
Fadia Almarei
Super Advisor

Re: tar

but i have a strange thing
i do the backup for a file it more than 2gb to the tape and it dose not give me problem .
but when i do the backup for the same file on the disk it give me a problem ,it seems to be a size problem
fadia.marei
Robert-Jan Goossens
Honored Contributor
Solution

Re: tar



Check if your filesystem has the largefiles option enabled.

onlinejfs installed

# fsadm /filesystem

Non Online jfs
# fsadm /dev/vg01/rlvol4
nomultifsets
largefiles

Regards,
Robert-Jan
Mark Grant
Honored Contributor

Re: tar

The 2GB problem is per individual file. The tar archive itself can be as big as you like. In your case, I would suggest that maybe you are writing a tar archive to a filesystem that has not been mounted with the "largefiles" option.

If it is a vxfs filesystem, it should have been created with "newfs" and the "-o largefiles" option and mounted in /etc/fstab with the "-o largefiles" options. If it was not created with largefile support, you can change it online, assuming you have OnlineJFS with "fsadm".
Never preceed any demonstration with anything more predictive than "watch this"
Jose Mosquera
Honored Contributor

Re: tar

Hi,

The restriction refers to the command and not to the media.

An option could be GNU tar (tar-1.13.25) from http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.25/

Any other HP's native backup command will be useful for you, i.e: fbackup.

Of course, your disk definition mus be support largefiles. To check this feature:
#fstyp -v /dev/vgnn/filesystem
Take note about f_flag value, 16 indicate you that largefile option is available.

If you need activate largefile option in your filesystem:
#umount /filesystem_mount_point
#fsadm -F vxfs -o largefiles /dev/vgnn/[r]filesystem
#fstyp -v /dev/vgnn/filesystem|grep f_flag (chk new value)
#mount /dev/vgnn/filesystem /filesystem_mount_point

Rgds.
Fadia Almarei
Super Advisor

Re: tar

i do the backup for a folder contanning many files some of them arge and others small some of them reach 1G , this mean that the tar command restrict the backup for each file individually
fadia.marei
Mark Grant
Honored Contributor

Re: tar

Yes, it's the size of the individual file. If no file is greater than 2GB you won't have a problem. However, as mentioned above, if you are creating a file from your tar output that is greater than 2GB and you are creating this on a filesystem that does not have "largefiles" support, it will fail.
Never preceed any demonstration with anything more predictive than "watch this"
Fadia Almarei
Super Advisor

Re: tar

i try to umount my file system but it does not work it gives me device busy , what would be the problem
fadia.marei
Mark Grant
Honored Contributor

Re: tar

It means that something is accessing that filesystem. You can't unmount a filesystem that has a file open in it. The first thing to check is that you current working directory is not on the filesystem in question. After that, try "fuser -cu /filesyste,". It is usually good enough to tell you what processes are using the filesystem.
Never preceed any demonstration with anything more predictive than "watch this"
Fadia Almarei
Super Advisor

Re: tar

it gives me the following , what is it mean

/u04: 13311c(root)
fadia.marei
Robert-Jan Goossens
Honored Contributor

Re: tar

try
# ps -ef | grep 13311

should return the process.
Fadia Almarei
Super Advisor

Re: tar

the process is /sbin/sh
could i kill it ?
fadia.marei
Robert-Jan Goossens
Honored Contributor

Re: tar

Beforeyou kill it do a
# cd /
# fuser -c /u04

could be you are on the filesystem, otherwise you could kill it.
KapilRaj
Honored Contributor

Re: tar

this is a shell (probably u started it) so come out of all the sessions and login again and try a umount.

Or else u can kill it

Kaps
Nothing is impossible