/srv/irclogs.ubuntu.com/2018/11/04/#ubuntu-server.txt

RoyKopenfire, nacc et al: bug #1059541 is a good example of how things aren't really cared for in the ubuntu server camp01:12
ubottubug 1059541 in initramfs-tools (Ubuntu) "Change default behavoir to boot degraded RAID" [Undecided,Confirmed] https://launchpad.net/bugs/105954101:12
=== Mr-Pan is now known as Mr_Pan
kantlivelongahasenack: comparing the output of rpc.gssd between 16.04 and 18.04 looks very different15:49
kantlivelongit looks like 16.04 is looking for a machine entry with the FQDN where 18.04 uses the short name15:57
kantlivelonghostname.domainname.com$@DOMAIN.COM vs hostname$@DOMAIN.COM16:05
kantlivelongnot sure if thats configurable16:06
lotuspsychjewelcome Curtman16:13
lotuspsychjeperhaps also mention the ubuntu server version to the channel16:13
CurtmanI'm using open-iscsi to connect to a target, I would like to do 'rmmod g_mass_storage; modprobe g_mass_storage file=/dev/sda stall=0' each time the initiator connects to a particular target.  Does anyone know how to make that happen?16:14
CurtmanUbuntu 18.0416:14
CurtmanInitially I tried adding 'modprobe g_mass_storage file=/dev/sda stall=0' to rc.local, but found that it does that before the initiator connects to the target.  Does anyone have an idea how to make that happen after iscsid in systemd?  My systemd-foo is not good.16:16
lotuspsychjeidle here a bit Curtman, as we have different timezones volunteers might read a bit later when wakeup/back from away16:18
CurtmanYep,  I'm not sure this is the best place to ask but I cant seem to find a better one.16:20
lotuspsychjeCurtman: if you have ubuntu server your question fits right in here16:21
CurtmanWell, the target is on a Ubuntu Server with the tgt package.  The Initiator would be any debian based distro with open-iscsi.  I'm hoping to make a rasperry pi zero (raspbian distro) connect to an iscsi target at boot, then use the g_mass_storage gadget to make the pi look like a usb mass storage device to whatever it is plugged in to.16:25
CurtmanEverything works wonderfully if I ssh into the pi and modprobe the kernel module manually each boot.  I'd like to find a way to automate that each time the target is connected.16:29
CurtmanMore googling leads me to believe my answer is udev. 'udevadm info -a -n sda' provides a bunch of information.  Possibly I need to figure out how to create udev rules that insert and remove the module.17:37
TJ-Curtman: you need to remove/re-insert the module, or just insert it once at the correct time?18:03
CurtmanIdeally remove it when the iscsi target disconnects and insert it when it connects.  I think this is a good clue:  https://www.suse.com/support/kb/doc/?id=3684654  "all iSCSI disks (identified by the vendor ID IET) will be ..."18:06
TJ-Curtman: you could add a udev.rules file, firing on ADD/REMOVE events, matching on the iSCSI device. e.g. ACTION=="add", SUBSYSTEM=="scsi", ENV{ID_VENDOR}=="IET",RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/$kernel"  and a similar ACTION=="remove" to do RUN+="/sbin/modprobe -r g_mass_storage"18:17
CurtmanThank you very much TJ-18:19
CurtmanTJ-, I must be missing something, I've added exactly this to /etc/udev/rules.d/99-com.rules: ACTION=="add", SUBSYSTEM=="scsi", ENV{ID_VENDOR}=="IET", RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/sda"19:06
CurtmanIt doesn't seem to be happening.19:06
CurtmanI tried restarting udev, and even rebooting to be sure..  It should happen when I restart the open-iscsi service, /dev/sda disappears then reappears when I start it.19:07
TJ-Curtman: to begin with, I suggested using the udev variable to make it mroe modular, as in "...file=/dev/$kernel"19:08
TJ-Curtman: you need to ensure all the match entries do match (the == ) - I may not have it entirely correct, so you need to use "udevadm info ..." to check what the relevant keys/attributes are19:10
CurtmanYes, I think I've got it now.. ATTRS instead of ENV..  This seems to work: ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="IET     ", RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/sda"19:15
CurtmanThanks very much for your helo19:16
Curtmanhelp19:16

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!