I've got the bug on extract data from multivolume archive.

1)create multivolume archive - no error after that.
2)extract this archive
and got error  "tar: This volume is out of sequence (15360 - 9216 != 7680)"

Error is gone if:
If i change the size of the files;
If i change format of archive ( from posix to gnu)


This scripts reproduce the error on extraction

# cat test.sh

[ -d ./RESTORE ]  || mkdir ./RESTORE

dd if=/dev/zero of=./data1 bs=1K count=15
dd if=/dev/zero of=./data2 bs=1K count=15

echo "Create archive"
tar -c -L 10 -F ./nvs.sh -M -p -f 1 -V 1 --format posix ./data1 ./data2

echo "Extract archive"
tar -x -M -p -F ./nvs.sh -f ./1 -C ./RESTORE


# cat nvs.sh

#!/bin/bash
name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
case $TAR_SUBCOMMAND in
-c) echo create
    ;;
-d|-t|-x) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
    ;;
 *)  exit 1
esac
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD

tar version: 1.27, .129

How to detect such archives?

Attachment: test.sh
Description: Bourne shell script

Attachment: nvs.sh
Description: Bourne shell script

Reply via email to