From: Mark B. <mar...@gm...> - 2010-06-28 19:37:45
|
On Mon, Jun 28, 2010 at 3:32 PM, Vladislav Bolkhovitin <vs...@vl...> wrote: > Mark Buechler, on 06/28/2010 05:08 PM wrote: > > On Fri, Jun 25, 2010 at 2:31 PM, Vladislav Bolkhovitin <vs...@vl...<mailto: >> vs...@vl...>> wrote: >> >> Hi Mark, >> >> I tried today the latest scstadmin. I changed version in the >> Makefile and then did make and make install. Then I setup my regular >> testing configuration using my manual scripts and then ran scstadmin: >> >> # scstadmin -WriteConfig ./c.conf >> >> Collecting current configuration: >> >> FATAL: Received the following error: >> >> groups(): Driver '' is not available >> >> Here is content of my /sys/kernel/scst_tgt: >> >> ... >> >> Thanks, >> Vlad >> >> >> Vlad, can you add a few lines to readWorkingConfig()? After: >> >> my $drivers = $SCST->drivers(); >> immediateExit($SCST->errorString()); >> >> Please add: >> >> use Data::Dumper; >> print Dumper($drivers) >> >> And right after: >> >> foreach my $driver (@{$drivers}) { >> Please add: >> >> print "---> $driver\n"; >> >> So, the code should look like: >> >> # Get current assignments >> my $drivers = $SCST->drivers(); >> immediateExit($SCST->errorString()); >> >> use Data::Dumper; >> print Dumper($drivers); >> >> foreach my $driver (@{$drivers}) { print "--> >> $driver\n"; >> my %empty; >> $CURRENT{'assign'}->{$driver} = \%empty; >> >> And reply with the output? >> > > It works now! I simply confused the old scstadmin and the new > scstadmin.sysfs which I was supposed to run. Sorry for the confusion. > > To avoid such confusions in the future, looks like it would be better, if > one is installing v0.9.00, scstadmin.sysfs should also be installed as > scstadmin. > I intend to move the old scstadmin & module out of the way and replace it when the sysfs version is complete. > I tried saving current configuration and applying it. They worked well. > > I only was a bit confused why it generated empty CREATE_ATTRIBUTES section: > > HANDLER vcdrom { > DEVICE cdrom { > CREATE_ATTRIBUTES { > } > } > } > > Shouldn't the empty sections be omitted? > > Yes, it should be. I'll take a look. > I also did: > > # echo 2 > >/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt1/MaxOutstandingR2T > > (MaxOutstandingR2T was already key and was listed in the conf.file). Then I > tried to apply the config file over it hoping scstadmin will override the > new value. But instead: > > # ./scstadmin.sysfs -config ./s.conf > Collecting current configuration: $VAR1 = [ > 'qla2x00t', > 'iscsi' > ]; > --> qla2x00t > --> iscsi > done. > > -> Checking configuration file './s.conf' for errors. > -> WARNING: Target 'iqn.2006-10.net.vlnb:tgt1' lacks the settable > attribute 'MaxOutstandingR2T', ignoring. > > All done. > > Looks like there's something wrong in the writable attributes handling. > > I'll try more tomorrow. > > Thanks for the great work! > > How about the utility to convert the old procfs-based scstadmin's config > file to the new format? After we have such utility, we could make the sysfs > interface default. Hopefully, such utility should be straightforward to > create. > > Vlad > > I believe scstadmin.sysfs should already handle this by simply specifying an old configuration file. - Mark. |