While trying to create an iSCSI root initrd, I noticed that $> iscsiadm -m discovery -t st -p foo tries to: - create and write to the nodes/ and send_targets directories - create the /etc/iscsi/lock file and lock.write symlink Wouldn't these be better under e.g. /var/lib/iscsi and /var/lock (respectively) I see the PID file just moved to /var too ... Also note, if we add /var/lib/iscsi we need /etc/rwtab to contain empty /var/lib/iscsi or if we stick with /etc/iscsi, then we need: files /etc/iscsi
(In reply to comment #0) > While trying to create an iSCSI root initrd, I noticed that > > $> iscsiadm -m discovery -t st -p foo > > tries to: > > - create and write to the nodes/ and send_targets directories > - create the /etc/iscsi/lock file and lock.write symlink > > Wouldn't these be better under e.g. /var/lib/iscsi and /var/lock (respectively) I can understnad lock.write going into /var/lock, but I am not sure about the nodes and discovery values. Does your bz title and comment here mean that it should go into /var because it is transient? If so I just want to clarify that those are not transient. They are setup files like /etc/sysconfig/network-scripts/ifcfg-eth0. Originally we had them in sysconfig, but upstream did not like that (something about it being red hat specific), so we moved it upstream to /etc/iscsi and just left it there for fedora/RHEL because I did not know better at the time. > > I see the PID file just moved to /var too ... > > Also note, if we add /var/lib/iscsi we need /etc/rwtab to contain > > empty /var/lib/iscsi > > or if we stick with /etc/iscsi, then we need: > > files /etc/iscsi Where do we need this? In the spec file or init script?
Moving the locks to /var/lock would be a good start In order to make /etc/iscsi/nodes and /etc/iscsi/send_targets writable when the root filesystem is read-only, the /etc/rwtab should contain: files /etc/iscsi/nodes files /etc/iscsi/send_targets instead of files /var/db/iscsi I'll log another bug on that. Note, in order for this to work the iscsi-initiator-utils should create these two directories at installation time.
Ah ok, thanks Mark. One other question. What is the /var/locks dir for? Should the iscsi lock file go there?
(In reply to comment #3) > > One other question. What is the /var/locks dir for? Should the iscsi lock file > go there? /var/lock ? It's for lock files just like the iscsi ones ...
Sorry, sorry I misread your bugzilla. For some reason I thought you wanted the lock under some other dir there. Igore that :)
One last question though. Is it preferable to have the installer (make install or rpm) make the /var/iscsi, /var/lib/iscsi files or is the app normally supposed to do this?
Ignore that. I have done a fix for this and moved the lock stuff to /var/lock/iscsi. I will wait to build into brew and update until we have the other BZ fixed, unless it will help your testing. Thanks.