From: Kern S. <ke...@si...> - 2007-05-25 13:57:23
|
On Friday 25 May 2007 14:55, Andreas Helmcke wrote: > Hello, > > i am answering only to the bacula-devel list, because I think, the > discussion is getting to technical for the users-list. Yes, that is better. What is the *exact* command you are using to do the "update slots"? > > On 25.05.2007 12:22, Kern Sibbald wrote: > > [...] > > So bottom line: you need to figure out why your Volume has StorageId=0. This > > is probably because you either you created it with a pre-2.0 Bacula, which > > didn't know anything about StorageId, or you haven't yet done an > > > > "update slots" > > > > on your Autochanger, which *should* immediately fix the problem. > > Unfortunately it does not. > "update slots" actually sets the the StorageId to 0 on all volumes, > which are in the changer. (To check, I did set the StorageId for one > volume using sql update, did "update slots" and the StorageId was reset > to 0) This sounds like a bug. Regards, Kern > > > > > The morale of the story is in version 2.0 or later of Bacula, it is *critical* > > to do an "update slots" when moving up from any prior version, and whenever > > you modify the contents of the magazine. Users who have the habit of > > manually tweaking the fields in the database such as InChanger, may also have > > problems. > > > I am doing an "update slots" at least once a week (when i unload the > actual weekly backups to put them into a safe and load older tapes which > can be reused). > For any other task i use bconsole or bweb. I have never changed any > databaseentries by hand. > > > > > There may be some other "bug" (i.e. sequence of commands such as Scratch > > pools, or recycling, ...) that cause the StorageId to be lost, so I would > > suggest you first do an "update slots ..." then check that the StorageId is > > properly set on all your autochanger volumes, then when you have problems, > > check again. > > > > I believe this (need for update slots) was documented in the 2.0 Release > > notes, but I can see that it is more important than I thought and I will make > > sure it is appropriately documented in the manual. > > > > I don't know if it is documented clearly enough, but as I am using bweb > to load and unload volumes I most likely will never forget to do "update > slots" because on the autochanger tab of bweb there is a clear notice, > if there are differences between the real slots the tapes are in and the > slots where bacula expects them to be. > > I just did a few sql-selects and I think we are on the right track, at last: > > Enter SQL query: select * from Storage; > > +-----------+---------+-------------+ > > | StorageId | Name | AutoChanger | > > +-----------+---------+-------------+ > > | 1 | File | 0 | > > | 2 | Drive-1 | 1 | > > | 3 | ADIC | 1 | > > +-----------+---------+-------------+ > > Enter SQL query: select MediaId, VolumeName, InChanger, Slot, StorageId, > DeviceId from Media order by slot; > > +---------+------------+-----------+------+-----------+----------+ > > | MediaId | VolumeName | InChanger | Slot | StorageId | DeviceId | > > +---------+------------+-----------+------+-----------+----------+ > > | 26 | 000024L1 | 0 | 0 | 3 | 0 | > > | 39 | 000045L1 | 1 | 1 | 0 | 0 | > > | 6 | 000040L1 | 1 | 2 | 3 | 0 | > > | 15 | 000008L1 | 1 | 2 | 0 | 0 | > > | 67 | GLG331L1 | 0 | 2 | 3 | 0 | > > | 48 | 000047L1 | 1 | 3 | 0 | 0 | > > | 49 | 000048L1 | 1 | 4 | 0 | 0 | > > | 12 | 000033L1 | 0 | 5 | 3 | 0 | > > | 52 | GLG316L1 | 1 | 5 | 0 | 0 | > > | 68 | GLG332L1 | 1 | 6 | 0 | 0 | > > | 16 | 000044L1 | 0 | 7 | 3 | 0 | > > | 31 | 000010L1 | 0 | 7 | 3 | 0 | > > | 35 | 000004L1 | 1 | 7 | 0 | 0 | > > | 36 | 000025L1 | 1 | 8 | 0 | 0 | > > | 14 | 000007L1 | 1 | 9 | 0 | 0 | > > | 51 | 000014L1 | 1 | 9 | 3 | 0 | > > | 19 | 000043L1 | 1 | 10 | 0 | 0 | > > | 29 | 000003L1 | 0 | 10 | 3 | 0 | > > | 34 | 000030L1 | 0 | 10 | 3 | 0 | > > | 69 | GLG333L1 | 1 | 11 | 0 | 0 | > > | 24 | 000027L1 | 1 | 12 | 0 | 0 | > > | 55 | GLG320L1 | 1 | 13 | 0 | 0 | > > | 7 | 000041L1 | 0 | 14 | 3 | 0 | > > | 20 | 000031L1 | 1 | 14 | 0 | 0 | > > | 22 | 000029L1 | 1 | 15 | 0 | 0 | > > | 9 | 000039L1 | 1 | 16 | 0 | 0 | > > | 10 | 000035L1 | 1 | 17 | 0 | 0 | > > | 11 | 000037L1 | 1 | 18 | 0 | 0 | > > | 4 | 000011L1 | 1 | 19 | 0 | 0 | > > | 70 | GLG334L1 | 1 | 20 | 0 | 0 | > > | 72 | 000038L1 | 1 | 21 | 3 | 0 | > > | 38 | 000002L1 | 1 | 21 | 0 | 0 | > > | 62 | GLG326L1 | 1 | 22 | 0 | 0 | > > | 47 | 000050L1 | 0 | 23 | 3 | 0 | > > | 43 | 000015L1 | 1 | 23 | 0 | 0 | > > | 17 | 000009L1 | 1 | 24 | 0 | 0 | > > | 50 | 000049L1 | 0 | 25 | 3 | 0 | > > | 63 | GLG327L1 | 1 | 25 | 0 | 0 | > > | 3 | 000013L1 | 0 | 26 | 3 | 0 | > > | 53 | GLG317L1 | 1 | 26 | 0 | 0 | > > | 13 | 000032L1 | 0 | 27 | 3 | 0 | > > | 54 | GLG318L1 | 1 | 27 | 0 | 0 | > > | 21 | 000028L1 | 1 | 28 | 0 | 0 | > > | 61 | GLG319L1 | 1 | 29 | 0 | 0 | > > | 64 | GLG328L1 | 1 | 30 | 0 | 0 | > > | 23 | 000026L1 | 1 | 31 | 0 | 0 | > > | 65 | GLG329L1 | 0 | 31 | 3 | 0 | > > | 25 | 000023L1 | 0 | 32 | 3 | 0 | > > | 56 | GLG321L1 | 1 | 32 | 0 | 0 | > > | 57 | GLG322L1 | 1 | 33 | 0 | 0 | > > | 27 | 000022L1 | 0 | 34 | 3 | 0 | > > | 58 | GLG323L1 | 1 | 34 | 0 | 0 | > > | 28 | 000021L1 | 0 | 35 | 3 | 0 | > > | 59 | GLG324L1 | 1 | 35 | 0 | 0 | > > | 60 | GLG325L1 | 1 | 36 | 0 | 0 | > > | 37 | 000001L1 | 1 | 37 | 0 | 0 | > > | 5 | 000012L1 | 1 | 38 | 3 | 0 | > > | 66 | GLG330L1 | 0 | 38 | 3 | 0 | > > | 71 | GLG335L1 | 1 | 39 | 0 | 0 | > > | 44 | 000016L1 | 0 | 40 | 3 | 0 | > > | 33 | 000005L1 | 0 | 41 | 3 | 0 | > > | 46 | 000020L1 | 1 | 42 | 0 | 0 | > > | 30 | 000046L1 | 1 | 43 | 0 | 0 | > > | 45 | 000019L1 | 1 | 44 | 0 | 0 | > > | 32 | 000006L1 | 0 | 45 | 3 | 0 | > > +---------+------------+-----------+------+-----------+----------+ > > There *are* volumes, which have StorageId=3, but my guess is, that they > have this value set, while i was on bacula 2.0.3. > > There are even volumes with StorageId=3 and InChanger=1, but they are > definitely not loaded. > > I think, that the SD for version 2.1.10 uses a wrong StorageId (0) for > the autochanger (ADIC). > This would explain the values in the medialist: > > I recently upgraded from V2.0.3 to 2.1.10. The first backups had trouble > finding the correct tapes (all StorageId fields being 3 (set by bacula > 2.0.3) and the SD assuming the autochanger to have StorageId 0. > After the first weekly backup i unloaded the weekly tapes and did > "update slots". This did set the StorageId to 0 on all volumes still in > changer and did _not_ reset the InChanger flag of the unloaded tapes, > because they had StorageId 3 and the storage, for which i did "update > slots" has StorageId 0. The the SD *must not* touch the Inchanger flag > because for him this volumes are in another changer. > > > > Andreas > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Bacula-devel mailing list > Bac...@li... > https://lists.sourceforge.net/lists/listinfo/bacula-devel > |