Re: [smartos-discuss] USB pass through to zone needed
I'll try to write something up tomorrow, I managed to strip out a lot of unneeded stuff and ended up just shy of 10mb. Everything seems to be working, I'll also write a manifest for it so it can be started. I'll probably roll with this, I don't like having a lot in the gz but ~10mb is acceptable. I just have all the node run a local copy and talk to a master to deal with the shutdown stuff. Regards Jorge On 2016-06-05 21:11, Jorge Schrauwen wrote: I was experimenting a bit today. pkg_add -p /opt/apcupsd apcupsd-*.tgz followed by patchelf to fix the paths seems to result in a ~65MB dir that can be dropped into the gz. I only give it a quick spin and got no segfaults so it looks promising. Regards Jorge On 2016-06-04 14:42, Jorge Schrauwen wrote: You can pass through the device to a native zone if you like. You need to manual edit the zone using zonecfg and use the 'add device' command. Due to SmartOS running from ramdisk the usb device order was not stable for me causing some problems. (APC SmartUPS) I abandoned that approach and switched to a RPi which failed last year and I haven't setup a replacement yet. I was thinking about using socat to forward it from the GZ to a zone over the network. Socat is available I just need to write a proper smf for this. Alternatively I'm looking into a smf that will reconfigure the zone automaticall on boot to have the correct usb device. Not sure which methode would be easier. Regards Jorge On 2016-06-04 05:40, John Croix wrote: I'm currently sitting in the dark in my house without power, pondering the need for an automatic means to shutdown my SmartOS server. When power went off, I raced upstairs to manually shut it down prior to draining the UPS, and I'd like to avoid a repeat scenario. It seems like the best way to do this might be to have a dedicated LX zone that runs the APC UPS daemon software. I can use it to touch a file when required, and, in the global zone, monitor the file system for the presence of that file. When the file appears, a power off command is issued. I just need to be able to have the local zone access the UPS via USB connection. Access to the LX file system from the global zone for monitoring is obviously not an issue. In short, I need to find out how to do the following: Determine which device in the global zone the UPS is attached to via USB cable Pass the device down to a local zone (I assume via some zonecfg commands) Determine which device to point the daemon to in the local zone Can anybody provide some info concerning the above issues? Thanks in advance, John Sent from my iPad --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
Re: [smartos-discuss] USB pass through to zone needed
I was experimenting a bit today. pkg_add -p /opt/apcupsd apcupsd-*.tgz followed by patchelf to fix the paths seems to result in a ~65MB dir that can be dropped into the gz. I only give it a quick spin and got no segfaults so it looks promising. Regards Jorge On 2016-06-04 14:42, Jorge Schrauwen wrote: You can pass through the device to a native zone if you like. You need to manual edit the zone using zonecfg and use the 'add device' command. Due to SmartOS running from ramdisk the usb device order was not stable for me causing some problems. (APC SmartUPS) I abandoned that approach and switched to a RPi which failed last year and I haven't setup a replacement yet. I was thinking about using socat to forward it from the GZ to a zone over the network. Socat is available I just need to write a proper smf for this. Alternatively I'm looking into a smf that will reconfigure the zone automaticall on boot to have the correct usb device. Not sure which methode would be easier. Regards Jorge On 2016-06-04 05:40, John Croix wrote: I'm currently sitting in the dark in my house without power, pondering the need for an automatic means to shutdown my SmartOS server. When power went off, I raced upstairs to manually shut it down prior to draining the UPS, and I'd like to avoid a repeat scenario. It seems like the best way to do this might be to have a dedicated LX zone that runs the APC UPS daemon software. I can use it to touch a file when required, and, in the global zone, monitor the file system for the presence of that file. When the file appears, a power off command is issued. I just need to be able to have the local zone access the UPS via USB connection. Access to the LX file system from the global zone for monitoring is obviously not an issue. In short, I need to find out how to do the following: Determine which device in the global zone the UPS is attached to via USB cable Pass the device down to a local zone (I assume via some zonecfg commands) Determine which device to point the daemon to in the local zone Can anybody provide some info concerning the above issues? Thanks in advance, John Sent from my iPad --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
[smartos-discuss] Change inotify max_user_watches in lx zone
I am running minidlna on a lx Ubuntu 16.04 zone. 4edaa46a-1b83-11e6-b863-3fb0064133ee ubuntu-16.04 20160516 linux lx-dataset2016-05-16 minidlna complains the inotify max_user_watches is too small (8192). I found I can't set it. Check smartos-discuss and found this thread: https://www.mail-archive.com/smartos-discuss@lists.smartos.org.email.enqueue.archive.listbox.com/msg01422.html Any better solution now? Do you think it an issue and to improve it? My smartos version is SunOS homelab_dp 5.11 joyent_20160414T011743Z i86pc i386 i86pc Thanks, David --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
Re: [smartos-discuss] USB pass through to zone needed
I'm also doing the Raspberry Pi with nut approach. I do however run the nut daemon "upsmon" on the SmartOS host in GZ which then handles shutdown "locally" after receiving shutdown signal. It was quite finicky to set it up so if you can use SSH shutdown it'll probably be better. Eric On 2016 June05 at 07:48:09, John Croix (jcr...@mac.com) wrote: Thanks for all of the cool suggestions. Looks like I have several opportunities to explore. Since I have a RPi running dnsmasq and pound, I might go with that approach (RPi sending shutdown command to the global zone via ssh). I could cleanly shut the RPi down, too, which would be nice considering that I've already had issues with the memory card and ungrateful reboots. Regards, John Sent from my iPad > On Jun 3, 2016, at 10:40 PM, John Croixwrote: > > I'm currently sitting in the dark in my house without power, pondering the need for an automatic means to shutdown my SmartOS server. When power went off, I raced upstairs to manually shut it down prior to draining the UPS, and I'd like to avoid a repeat scenario. > > It seems like the best way to do this might be to have a dedicated LX zone that runs the APC UPS daemon software. I can use it to touch a file when required, and, in the global zone, monitor the file system for the presence of that file. When the file appears, a power off command is issued. I just need to be able to have the local zone access the UPS via USB connection. Access to the LX file system from the global zone for monitoring is obviously not an issue. > > In short, I need to find out how to do the following: > Determine which device in the global zone the UPS is attached to via USB cable > Pass the device down to a local zone (I assume via some zonecfg commands) > Determine which device to point the daemon to in the local zone > Can anybody provide some info concerning the above issues? > > Thanks in advance, > John > > Sent from my iPad > --- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com