Re: [Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
On Sat, Nov 13, 2010 at 6:01 PM, Dan Langille d...@langille.org wrote: . The project needs more people. Can you help? It is things like this for which patches are required. :) I'd be willing to help... the problem is, I dont feel that I sufficiently understand the subject to write an update. Sometimes, documenting things that work, when they work for bad reasons, is worse than no documentation. Better they would be written by, for example, the person that put that working snippet into the regression testing tree? -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
On 11/15/2010 12:38 PM, Philip Brown wrote: On Sat, Nov 13, 2010 at 6:01 PM, Dan Langilled...@langille.org wrote: . The project needs more people. Can you help? It is things like this for which patches are required. :) I'd be willing to help... the problem is, I dont feel that I sufficiently understand the subject to write an update. Sometimes, documenting things that work, when they work for bad reasons, is worse than no documentation. Thing is, the doc project needs someone to take charge and then coordinate items. e.g. establish what needs to be done, then hand out the tasks. Better they would be written by, for example, the person that put that working snippet into the regression testing tree? In short, definitely not. :) In general people are bad at knowing what they didn't know. They only know what they know now. So, it's better for someone who doesn't know how something works to write about it. Any gaps in knowledge can be obtained by asking. Or by trying. And again, you don't have to be doing the writing. People will take up the tasks. They just need someone to tell them what needs doing. -- Dan Langille - http://langille.org/ -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
On 11/12/2010 3:21 PM, Philip Brown wrote: Martin Simmons writes: Have you looked at how the regression tests do it? In particular: http://bacula.git.sourceforge.net/git/gitweb.cgi?p=bacula/bacula;a=blob;f=regress/scripts/bacula-sd-2disk.conf.in;h=7f8f33e9fb1b896aa65db3739dda1d2d367b4154;hb=HEAD I don't know if that works, but it is subtly different from your setup. WOW! The good news is... it seems to work. Thank you so much! The bad news is this means that the bacula documentation, and shipped examples, are horribly horribly out of date, and just plain WRONG! While I'll disagree with the chosen adjective The project needs more people. Can you help? It is things like this for which patches are required. :) I will start by mentioning that I'm using bacula 5.0.3 the examples/bacula-sd.conf which is autogenerated, has one and only one section for a filesystem based device, which looks like the following: Device { Name = FileStorage Media Type = File Archive Device = /tmp LabelMedia = yes; # lets Bacula label unlabeled media Random Access = Yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; } Interestingly, that works when by itself. But not referenced by an autochanger The Device declaration that actually works when used with a virtual autochanger, is Device { Name = FileStorage0 Device Type = File Media Type = Disk Archive Device = /dir/name AutomaticMount = yes; Autochanger = yes Drive Index = 0 AlwaysOpen = yes; RemovableMedia = yes; } Notice that there is a Device Type that seems to be required.. that was totally missing. Notice also, that Media Type is now specified as Disk, instead of File !!! (Hmm. I guess this is free-form and does not strictly matter. But its still really confusing and bug-inducing, to have that inconsistency!) It's really tough to find any reference under http://www.bacula.org/5.0.x-manuals/en/main/ of This is the proper way to set up a Filesystem based storage demon device There is no official example of a Disk based device in (src)/examples/devices either. PS: I think my original message was right, in that there is some kind of subtle bug in the storage demon code. It seems like, *if Device Type is not specified*, it defaults to type = File, when archive device is a directory, and it is a standalone device. But it defaults to type=Tape, when device is associated with an autochanger and not otherwise specified. Possibly the best way to fix this would be to insist that Device Type be always specified explicitly. -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Dan Langille - http://langille.org/ -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
On Thu, 11 Nov 2010 16:04:35 -0800, Philip Brown said: Hello, I've been wrestling with configuration of a filesystem based autochanger, aka the 'disk-changer' script. I've made some progress, but have hit a point where I believe a bug in the core sd libraries (specifically around src/stored/dev.c:549) is stopping me from going further. First of all, I have a regular, non-autochanger device working just great. I can successfully label volumes and use them. I then got the basic autochanger code working, by reading the script, and figuring out that most of the examples to use it are now wrong. This is because for media type=files, the Device clause expects a reference to a directory, for the Archive Device. I think that last assumption is wrong for a disk-based autochanger. Have you looked at how the regression tests do it? In particular: http://bacula.git.sourceforge.net/git/gitweb.cgi?p=bacula/bacula;a=blob;f=regress/scripts/bacula-sd-2disk.conf.in;h=7f8f33e9fb1b896aa65db3739dda1d2d367b4154;hb=HEAD I don't know if that works, but it is subtly different from your setup. __Martin -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
Martin Simmons writes: Have you looked at how the regression tests do it? In particular: http://bacula.git.sourceforge.net/git/gitweb.cgi?p=bacula/bacula;a=blob;f=regress/scripts/bacula-sd-2disk.conf.in;h=7f8f33e9fb1b896aa65db3739dda1d2d367b4154;hb=HEAD I don't know if that works, but it is subtly different from your setup. WOW! The good news is... it seems to work. Thank you so much! The bad news is this means that the bacula documentation, and shipped examples, are horribly horribly out of date, and just plain WRONG! I will start by mentioning that I'm using bacula 5.0.3 the examples/bacula-sd.conf which is autogenerated, has one and only one section for a filesystem based device, which looks like the following: Device { Name = FileStorage Media Type = File Archive Device = /tmp LabelMedia = yes; # lets Bacula label unlabeled media Random Access = Yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; } Interestingly, that works when by itself. But not referenced by an autochanger The Device declaration that actually works when used with a virtual autochanger, is Device { Name = FileStorage0 Device Type = File Media Type = Disk Archive Device = /dir/name AutomaticMount = yes; Autochanger = yes Drive Index = 0 AlwaysOpen = yes; RemovableMedia = yes; } Notice that there is a Device Type that seems to be required.. that was totally missing. Notice also, that Media Type is now specified as Disk, instead of File !!! (Hmm. I guess this is free-form and does not strictly matter. But its still really confusing and bug-inducing, to have that inconsistency!) It's really tough to find any reference under http://www.bacula.org/5.0.x-manuals/en/main/ of This is the proper way to set up a Filesystem based storage demon device There is no official example of a Disk based device in (src)/examples/devices either. PS: I think my original message was right, in that there is some kind of subtle bug in the storage demon code. It seems like, *if Device Type is not specified*, it defaults to type = File, when archive device is a directory, and it is a standalone device. But it defaults to type=Tape, when device is associated with an autochanger and not otherwise specified. Possibly the best way to fix this would be to insist that Device Type be always specified explicitly. -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] possible bug in bacula-sd, relating to Type=Files and autochanger
(sorry for potential repeat: Sent from a non-subscribed address previously) Hello, I've been wrestling with configuration of a filesystem based autochanger, aka the 'disk-changer' script. I've made some progress, but have hit a point where I believe a bug in the core sd libraries (specifically around src/stored/dev.c:549) is stopping me from going further. First of all, I have a regular, non-autochanger device working just great. I can successfully label volumes and use them. I then got the basic autochanger code working, by reading the script, and figuring out that most of the examples to use it are now wrong. This is because for media type=files, the Device clause expects a reference to a directory, for the Archive Device. however, disk changer in argument 4.. what IT calls archive device... expects a reference to a fake filename. So instead of the old syntax, Changer Command = disk-changer %c %o %S %a %d it now seems one must use Changer Command = disk-changer %c %o %S %a/drive%d %d %v All well and good. IF, I label new volumes through my regular Device.. except that that leaves the new volume in slot 0. Which means I then need to enter them into the fake autoloader system by hand , and then run the bconsole update command. Yuck! Problem is when I attempt to label through the autochanger dev, I get: Sending label command for Volume EIMD1VOL003 Slot 5 ... 3307 Issuing autochanger unload slot 4, drive 0 command. 3304 Issuing autochanger load slot 5, drive 0 command. 3305 Autochanger load slot 5, drive 0, status is OK. 3910 Unable to open device FileStorage0 (/Bacula/ei-md1-sd): ERR=dev.c:549 Could not open: /Bacula/ei-md1-sd, ERR=Is a directory Umm.. yes, that should be OKAY, for Media Type=File. In fact, it should be expected, Right?! it seems like there is some kind of overly zealous check in the labelling code that kicks in, and disallows labelling File type media if it is marked as within an autochanger. Could someone please either help undo that check, or tell me some magic config to change? Here are the relevant snippets from bacula-sd.conf Autochanger { Name = DiskVTL Device = FileStorage0,FileStorage1 Changer Device = /var/local/etc/bacula/disk-changer.conf Changer Command=/var/local/etc/bacula/disk-changer %c %o %S %a/drive%d %d %v } Device { Name = FileStorage0 Autochanger = Yes Drive Index = 0 Media Type = File Archive Device = /Bacula/ei-md1-sd LabelMedia = yes; Random Access = Yes; RemovableMedia = no; AutomaticMount = yes; AlwaysOpen = yes; } # (FileStorage1 is same, with index=1) #Below is the NON-autochanger, which works Just Fine Device { Name = EiMd1Labeller Media Type = File Archive Device = /Bacula/ei-md1-sd LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no; } -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users