Koozali.org: home of the SME Server

Configuration database help needed.

Offline Arnie

  • ***
  • 81
  • +0/-0
  • Old Dog, New Tricks.
Configuration database help needed.
« on: January 16, 2009, 06:11:58 AM »
I'm trying to fix the Vista slow samba problem. I want to enable the readahead VFS module on all of my ibays. I can manually edit the smb.conf file but I want to do it the proper way and add the needed properties to the accounts database. I've tried various combinations of keywords but I can't get the template to expand with the "vfs objects = readahead" statement.

I've found an earlier post http://forums.contribs.org/index.php/topic,33225.0.html that give the command to enable the audit module, but the command returns an error :

Code: [Select]
db accounts <ibayname> setprop vfs object audit

Can anyone please post the necessary db comand to achieve this?

Many thanks in advance.
...

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Configuration database help needed.
« Reply #1 on: January 16, 2009, 07:21:55 AM »

I'm trying to fix the Vista slow samba problem.


Arnie,

I see you need help about inserting a line to samba config file.  Also, I see you (probably) found a Samba-Vista bug and the way to fix it. You should put this problem/bug and proposed fix to bugtracker and work with the devs to fix it. This way the fix/workaround/feature will be included in next SME server update and many (Vista) users will benefit from it.

Outside of the bugtracker, the bug fix WILL NOT included in SMEserver update.

So, please post a bug.
You'll get the help needed and the (SMEServer Vista) community will thank you for that.

thomas.

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Configuration database help needed.
« Reply #2 on: January 17, 2009, 12:50:10 PM »
db dbfile setprop key prop1 val1
so
db accounts setprop ibayname ? ?

but there is no fragment that will use these db values

first you need the fragment

view the fragments in ...templates/etc/smb.conf
create a new one in the right order, with the line from the other thread
expand-template /etc/smb.conf
service smb restart

create a bug
« Last Edit: January 17, 2009, 12:52:08 PM by snoble »

Offline Arnie

  • ***
  • 81
  • +0/-0
  • Old Dog, New Tricks.
Re: Configuration database help needed.
« Reply #3 on: January 17, 2009, 06:37:38 PM »
tomasch,

I haven't found a fix. I've tried all the Vista fixes I've found and none of them work. My last resort is to enable readahead support in samba. I don't know if this will fix it until I can get the mods done to smb.conf.

snoble,

There is a fragment that will use these db values:

/etc/e-smith/templates/etc/smb.conf/ibays/90vfs

However, I don't know Perl from a hole in the ground so I can't figure out which db props it's using, hence my original question. I'm assuming it works because that is how people load the audit module.

Are there any docs that map out all of the DBs and their valid key->prop->value structure?
...

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Configuration database help needed.
« Reply #4 on: January 17, 2009, 07:31:52 PM »
Are there any docs that map out all of the DBs and their valid key->prop->value structure?

yes.. wiki.. please read here

HTH
Ciao
Stefano

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Configuration database help needed.
« Reply #5 on: January 19, 2009, 02:31:30 AM »

/etc/e-smith/templates/etc/smb.conf/ibays/90vfs


I have no idea how that fragment works, good question


Quote
    return "" unless scalar keys %$ibay_vfs;                                   
                                                                               
    $OUT = "vfs objects = " . (join " ", keys %$ibay_vfs) . "\n";               
    foreach $mod (keys %$ibay_vfs) {                                           
        foreach $opt (keys %{$ibay_vfs->{$mod}}) {                             
            $OUT .= "  $mod:$opt=$ibay_vfs->{$mod}->{$opt}\n";                 
        }
    } 
                                                                     
   
« Last Edit: January 19, 2009, 02:33:17 AM by snoble »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Configuration database help needed.
« Reply #6 on: January 19, 2009, 12:56:38 PM »
I have no idea how that fragment works
I don't have a clue either, not sure if you quoted enough as it seems the definition/declaration of %$ibay_vfs is not listed here, it is most likey defined in some other template fragment.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Configuration database help needed.
« Reply #7 on: January 20, 2009, 04:20:22 AM »
Hi,
I try to play with template to insert a line in ibay config in smb.conf:

Create custom template:

Code: [Select]
#mkdir -p /etc/e-smith/templates-custom/etc/smb.conf/ibays
#pico /etc/e-smith/templates-custom/etc/smb.conf/ibays/10audit
insert these lines :

Code: [Select]
{
    $OUT = "";
    return unless (($ibay->prop('audit') || 'disabled') eq 'enabled');
    $ibay_vfs->{audit}->{facility} = "LOCAL5";

}

then create the db key needed (audit):

Code: [Select]
db accounts setprop ibayname audit enabled

expand the template

Code: [Select]
expand-template /etc/samba/smb.conf

result is :

Code: [Select]
[ibayname]
<snip>
vfs objects = audit
  audit:facility=LOCAL5
note :
this line must exist or the "vfs objects = audit" line won't be created :
Code: [Select]
    $ibay_vfs->{audit}->{facility} = "LOCAL5";

Hope This Helps
thomas