# AIX Invalid tape length

**URL:** <https://community.unix.com/t/aix-invalid-tape-length/390896>\
**Category:** AIX\
**Created:** [May 4, 2023, 10:13am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896 "2023-05-04T10:13:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![big123456](https://community.unix.com/letter_avatar/big123456/32/6_22734026db12803ebb3e059622ac3534.png) [@big123456](https://community.unix.com/u/big123456)\
**Post date:** [May 4, 2023, 10:13am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/1 "2023-05-04T10:13:16Z")

</div>

Hi,  
on AIX server 1 7  
When running tar commande to archive on disk, I have :

Invalid tape length

What does it mean? I don't ask to save on tape.  
Thanks for explanation.

---

<div class="post-metadata">

**Author:** ![MadeInGermany](https://community.unix.com/letter_avatar/madeingermany/32/6_22734026db12803ebb3e059622ac3534.png) [@MadeInGermany](https://community.unix.com/u/MadeInGermany)\
**Post date:** [May 4, 2023, 10:39am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/2 "2023-05-04T10:39:47Z")

</div>

Did you specify the ` f filename` option for `tar`?  
Can you post your `tar` command?

---

<div class="post-metadata">

**Author:** ![munkeHoller](https://community.unix.com/user_avatar/community.unix.com/munkeholler/32/7431_2.png) [@munkeHoller](https://community.unix.com/u/munkeHoller)\
**Post date:** [May 4, 2023, 10:41am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/3 "2023-05-04T10:41:24Z")

</div>

the file is corrupted/incomplete for reason(s) X (as in unknown...), show the tar cmd, show the output of **df** on the filesystem being written to etc ...

---

<div class="post-metadata">

**Author:** ![big123456](https://community.unix.com/letter_avatar/big123456/32/6_22734026db12803ebb3e059622ac3534.png) [@big123456](https://community.unix.com/u/big123456)\
**Post date:** [May 4, 2023, 11:27am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/4 "2023-05-04T11:27:26Z")

</div>

Thanks.  
Commande line is as following and is in a script running every evening from crontab:  
(/opt/freeware/bin/tar -cvf - -L ${FLIST} | gzip  
df -g:  
`Filesystem GB blocks Free %Used Iused %Iused Mounted on`  
`/dev/lvdatavg00 442.00 45.68 90% 1449825 12% /u0/backup`  
In log:  
/opt/freeware/bin/tar: /server/temp/liste\_fic.lst: Invalid tape length  
Try `/opt/freeware/bin/tar --help' or `/opt/freeware/bin/tar --usage' for more  
information.  
My question:  
Is there any limite for number of line s in -L ${FLIST}  
Regards.

---

<div class="post-metadata">

**Author:** ![munkeHoller](https://community.unix.com/user_avatar/community.unix.com/munkeholler/32/7431_2.png) [@munkeHoller](https://community.unix.com/u/munkeHoller)\
**Post date:** [May 4, 2023, 11:33am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/5 "2023-05-04T11:33:14Z")

</div>

no idea, how many lines is it ?

have you tried with ... 1 line / 10 lines / 100 lines ....

what is the actual tar version you are using.

tks

---

<div class="post-metadata">

**Author:** ![big123456](https://community.unix.com/letter_avatar/big123456/32/6_22734026db12803ebb3e059622ac3534.png) [@big123456](https://community.unix.com/u/big123456)\
**Post date:** [May 4, 2023, 11:40am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/6 "2023-05-04T11:40:49Z")

</div>

Thanks.  
Number of lines is : 148517 lines.  
It has worked fine for the years.  
Just last evening failed. It is usuel to add/delete files , then the number of files and lines in file liste is not fixed.  
How can I see the version of tar?  
which tar  
/usr/bin/tar

Regards.

---

<div class="post-metadata">

**Author:** ![MadeInGermany](https://community.unix.com/letter_avatar/madeingermany/32/6_22734026db12803ebb3e059622ac3534.png) [@MadeInGermany](https://community.unix.com/u/MadeInGermany)\
**Post date:** [May 4, 2023, 11:52am UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/7 "2023-05-04T11:52:13Z")

</div>

In GNU tar the `-L` is "tape length".  
Obviously `/opt/freeware/bin/tar` is a GNU tar  
Try `-T` instead.

Or use the `/usr/bin/tar` where `-L` is "list of files".

---

<div class="post-metadata">

**Author:** ![munkeHoller](https://community.unix.com/user_avatar/community.unix.com/munkeholler/32/7431_2.png) [@munkeHoller](https://community.unix.com/u/munkeHoller)\
**Post date:** [May 4, 2023, 12:23pm UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/8 "2023-05-04T12:23:25Z")

</div>

did you follow the advice given in the log  
**Try `/opt/freeware/bin/tar --help' or ` /opt/freeware/bin/tar --usage' for more information.**

as @MadeInGermany alludes to its likely gnu tar ... but you need to confirm  
and if its been running without issue for years ... maybe the commandline has changed from the AIX version of tar to the gnu version ....

---

<div class="post-metadata">

**Author:** ![big123456](https://community.unix.com/letter_avatar/big123456/32/6_22734026db12803ebb3e059622ac3534.png) [@big123456](https://community.unix.com/u/big123456)\
**Post date:** [May 4, 2023, 1:51pm UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/9 "2023-05-04T13:51:53Z")

</div>

Ok. Thank you. I will see with SYSTEM team.  
Regards.

---

<div class="post-metadata">

**Author:** ![big123456](https://community.unix.com/letter_avatar/big123456/32/6_22734026db12803ebb3e059622ac3534.png) [@big123456](https://community.unix.com/u/big123456)\
**Post date:** [May 5, 2023, 3:10pm UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/10 "2023-05-05T15:10:39Z")

</div>

Thanks to all.  
As MadeInGermany said we used -T instead of -L and it seems working.  
Regards.

---

<div class="post-metadata">

**Author:** ![munkeHoller](https://community.unix.com/user_avatar/community.unix.com/munkeholler/32/7431_2.png) [@munkeHoller](https://community.unix.com/u/munkeHoller)\
**Post date:** [May 5, 2023, 5:09pm UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/11 "2023-05-05T17:09:37Z")

</div>

@big123456 good news , and the mystery of it having worked for years before remains unsolved ?

---

<div class="post-metadata">

**Author:** ![system](https://community.unix.com/uploads/default/original/2X/c/c7e9e16a595259edafe88615719d5c5dcda035c2.png) [@system](https://community.unix.com/u/system)\
**Post date:** [February 29, 2024, 5:10pm UTC](https://community.unix.com/t/aix-invalid-tape-length/390896/12 "2024-02-29T17:10:10Z")

</div>

Closed on February 29, 2024, 5:10pm UTC

This topic was automatically closed 300 days after the last reply. New replies are no longer allowed.
