On 10/10/2012 11:57 AM, Brian J. Murrell wrote: > On 12-10-10 02:47 PM, Nicholas A. Bellinger wrote: >> >> This means the >> individual /sys/kernel/config/target/core/$HBA/$DEV/wwn/vpd_unit_serial >> attributes values are not being saved and/or reset between target >> restart. > > Ahhh. > >> How are you saving the running configuration of configfs..? > > I'm instantiating on each reboot with lio_node commands in > /etc/target/lio_start.sh. Presumably this is not guaranteed to maintain > a consistent vpd_unit_serial then, is that right? > >> If using your own native rtslib code to setup everything in configfs, >> then you'll need to _get_wwn() + save the newly generated values for >> each device after first time creation, and then re-set the saved value >> using _set_wwn() after subsequent creations with gen_wwn=false. > > I see. I never came across any configuration examples that did this. I > will look further into it. > >> Otherwise you can also use 'saveconfig' from within rtsadmin/targetcli, > > I did see that, and I did try one and noticed the JSON file that was > created in /etc/target but I couldn't manage to figure out how that > saved JSON file was ever reloaded on a reboot. If it's a json file instead of a shell script, I assume you're using a -fb version of targetcli? Then you don't need lio-utils. You can restore the config in /etc/target/saveconfig.json with 'targetcli restoreconfig clear_existing=true', which is what the distro's init scripts should be doing for you, if the service is enabled. Regards -- Andy -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html