PDA

View Full Version : is amanda (or dd) architeture/OS dependent ????



marozsas
October 29th, 2009, 05:25 AM
Hi,

I was using amanda 2.6.1p1 in a Dell Poweredge 2950 server, running openSuSE 10.2 i586 (32 bits).
Everything was fine, except the OS becomes obsolete and I had to move to a more recent OS. Then I choose CentOS 5.4 x86_64 (64 bits).
I made a separate backup on CD-R (ISO-9660) and on a tape using tar of /etc/amanda and /var/lib/amanda.

After installed CentOS I installed amanda from scratch using the proper package amanda-backup_server-2.6.1p1-1.rhel5.rpm, same version as used before.

Using the configuration files saved previously, I restored the amanda.conf, disklist, advanced.conf and I was ready to go in minutes.

Again, everything is working just fine. I start a new backup set, starting from the first tape and amanda set all DLEs to make the first backup at level 0 (full dump) and after this, it started to make incremental. fine.

The problem is I can NOT ready any tape written on my previous OS.
The command "dd" returns:


mt rewind; dd if=$TAPE bs=32k count=1
dd: reading `/dev/nst0': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 20.8385 seconds, 0.0 kB/s


If a use a tape labeled on the new system, I got the valid header, as expected, no problem:


mt rewind; dd if=$TAPE bs=32k count=1
AMANDA: TAPESTART DATE X TAPE regular-03


1+0 records in
1+0 records out
32768 bytes (33 kB) copied, 11.3031 seconds, 2.9 kB/s


So I am wondering if amanda or dd are OS or architeture (32/64 bits) dependent ?
Because the OS is the only thing was changed. the hardware is the same, the tapes are the same, the amanda is the same, the amanda configuration files are the same....

I need to recover some important files from the previous set so an answer for this issue is so important to me...

marozsas
November 3rd, 2009, 05:02 AM
I figure out what is different: On openSuse the block size of tape is 32kbytes. On CentOS is 512bytes; don't ask me why....

Anyway, on CentOS, the command "mt setblk 32k" restore the tape to same conditions it was before on openSuse.


[root@bigslam ~]# mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
[root@bigslam ~]# mt setblk 32k
[root@bigslam ~]# mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 32768 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
[root@bigslam ~]# dd if=$TAPE bs=32k count=1
AMANDA: TAPESTART DATE 20090811005402 TAPE diario-08


1+0 records in
1+0 records out
32768 bytes (33 kB) copied, 0.008734 seconds, 3.8 MB/s
[root@bigslam ~]#


And now I can read the old tapes. When finished, I need to go back the tape to 512 bytes as before, otherwise, the new tapes written with 512 bytes will return an error.

choogendyk
November 3rd, 2009, 05:38 PM
Cool. Thanks for posting the answer. I was going to reply this morning with some comments and a question, but the furnace repair guy came, and then I had to go to work. :)