Issue 1362587: Problem with tapedevices and the tarfile module (original) (raw)
Problem to read a archive from tape that was created with the tarfile module in python.
Error:
tar = tarfile.open("/dev/st0", "r") Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/tarfile.py", line 916, in open return func(name, "r", fileobj) File "/usr/local/lib/python2.4/tarfile.py", line 933, in taropen return cls(name, mode, fileobj) File "/usr/local/lib/python2.4/tarfile.py", line 811, in init fileobj = file(self.name, self.mode) IOError: [Errno 16] Device or resource busy: '/dev/st0'
I was creating the archive with succes:
tar.close() tar = tarfile.open("/dev/st0", "w") tar.add("/tmp/bin1.tar") tar.add("/tmp/bin2.tar") tar.close()
When I try to read the tape without pyton the folowing error: [root@localhost tmp]# tar tvbf 20 /dev/st0 tar: Record size = 8 blocks -rw-r--r-- root/root 128614400 2005-11-20 19:53:11 tmp/bin1.tar tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory tar: /dev/st0: Cannot read: Cannot allocate memory ......
Can anyone help me with this problem or have another module for tarfile that works with tapedevices?
/Henrik