New IT forum
12 August 2022, 02:47:30 pm *
Welcome, %1$s. Please login or register.

: PiHub now in stock.
 
Pages: [1]

Author Topic: Dreamplug pre-purchase  (Read 8172 times)

purplemink

  • Newbie
  • *
  • Posts: 3
Dreamplug pre-purchase
« on: 23 April 2011, 12:51:26 am »

Looking to purchase one of these plugs soon, but would like some info before going out and getting one.

Current setup on my network is a Synology DS209+ dual bay server with a Sans Digital TR5UT 5 bay RAID 5/ext3 enclosure attached via eSATA. Using it to stream to my 2 media players hardwired to the network [Samba shares not uPnP/DLNA]. Since I must use the enclosure now that the server is full, I must eject the enclosure through a WebGUI before powering it off.....a little nuisance.

I'd like to do the following with the [hardwired] plug............connect via eSATA my Sans Digital enclosure to the plug and have both media players have access to the enclosure. I'd like to know if it's required that I also eject the enclosure from the plug before powering it off or am I able to power off the plug which I plan to do once I'm done with it for the evening. Strictly, I want to use the plug/enclosure just for my media and switch it off at night. I use the Synology 24/7, for that now as well as P2P/FTP/Squeezebox Server, etc. Will the plug run 'out of the box' as is or must I install anything else to get it running for Samba shares? I'm not a Linux guy but still have some command line knowledege if need be, and my old laptop is a dual boot machine [XP/Ubuntu], so I'm more than prepared. Need I use any command lines to mount the enclosure and is there a file that can be modified to auto-mount once both the enclosure/plug are turned on?

Thanks!
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Dreamplug pre-purchase
« Reply #1 on: 23 April 2011, 07:36:11 am »

samba-common and smb-client seem to be available in the Dreamplug out of the box (See package list here). If you want to access a Windows share on another PC, smb-client should do that. If you want to share data from a Dreamplug with the rest of your Windows network, I believe that you'd still need to install samba (apt-get install samba - easy).

linux is given access to hard drives (and / or shared network storage) by mounting the device (or network location) at a mount point. A mount point is a directory on the linux PC, often in /mnt

For instance, you could create:

  • /mnt/eSATA
  • /mnt/USB1
  • /mnt/USB2
  • /mnt/windows-shareA

Then you would establish each mount from the command line (or in a script). You could have the mounts occur automatically during boot, or you could trigger them with scripts via ssh or (for instance) a web interface. Equally, you could trigger an unmount (the command is actually umount) via the same interface - as you do at the moment. Automatic mounts are in /etc/fstab. Unmounting is the essential task that under Windows (and in your original post) is referred to as "ejecting".

None of our plug computers has a switch that can be used to cleanly shut down the computer. All can be rebooted by pushing a paperclip into a reset hole. This isn't a proper way of shutting down a computer. The proper way is with a shutdown command (because this will flush data to any mounted storage devices before issuing a umount), but this can be performed:

  • Manually (via an ssh connection from another computer)
  • Manually (via a web interface, for example, from another computer)
  • Automatically (from a task that runs according to a predefined schedule)
  • Automagically upon insertion of a special device eg a USB stick. You could configure udev to issue a shutdown when a USB stick with (for instance) device name "SHUTDOWN") was inserted

Note that switching a plug computer back on has to be done either by using a paperclip or by unpowering / repowering.
Logged

purplemink

  • Newbie
  • *
  • Posts: 3
Re: Dreamplug pre-purchase
« Reply #2 on: 23 April 2011, 10:23:40 pm »

Thanks for your quick and very thorough response. I much appreciate it. I don't think I'd have a problem in the /mnt command during boot [will have to look that one up], but it's the configuring of udev as a file on a USB stick with the shutdown command that has me stumped.......any hints on that? Afterwards, I'm assuming I'm able to pull the plug on the Dreamplug?

Thnaks again!
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Dreamplug pre-purchase
« Reply #3 on: 24 April 2011, 09:03:19 am »

Advice for udev is google. It's not simple or obvious. Here's the contents of a udev file that I have for handling attachment of a Sheevaplug to my host PC (via USB cable):

Code: [Select]
cat /etc/udev/rules.d/85-sheevaplug.rules
# if no driver has claimed the interface yet, load ftdi_sio
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
        ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", \
        DRIVER=="", \
        RUN+="/sbin/modprobe -b ftdi_sio"

# add the sheevaplug VID and PID to the list of devices supported by ftdi_sio
ACTION=="add", SUBSYSTEM=="drivers", \
        ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \
        ATTR{new_id}="9e88 9e8f"

# optionally create a convenience symlink for the console device
ACTION=="add", KERNEL=="ttyUSB*", \
        ATTRS{interface}=="GlobalScale SheevaPlug JTAGKey FT2232D B", \
        ATTRS{bInterfaceNumber}=="01", \
        SYMLINK+="sheevaplug"

Looking solely at the first group of text, for instance, the insertion of a USB device that is identified with Vendor ID 9e88 and Product ID 9e8f causes the command /sbin/modprobe -b ftdi_sio to be executed
Logged

purplemink

  • Newbie
  • *
  • Posts: 3
Re: Dreamplug pre-purchase
« Reply #4 on: 26 April 2011, 06:48:24 pm »

Been reading a lot on google since a few days ago. Thanks for the info on that.........I guess a couple of modifications will be in order when I receive my plug.................I'll keep on reading the forums for other info as well.
Logged

tummen

  • Newbie
  • *
  • Posts: 13
Re: Dreamplug pre-purchase
« Reply #5 on: 02 May 2011, 04:22:14 pm »

Is there a good way of knowing when the plug is ready with going to bed?
It would be good if i could turn of all blinking lights at the very end of the shutdown script. but im not sure how to do it. should i ad a script with very high/low number in init.1 ? that does some magic?
As always all i know have i stolen from someone else on the internet :-)
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Dreamplug pre-purchase
« Reply #6 on: 02 May 2011, 08:19:37 pm »

Is there a good way of knowing when the plug is ready with going to bed?

With the JTAG, you have a direct line to see what is happening (or not happening) on the Dreamplug. If your connection is via TCP/IP, then you cannot see what is happening after the Dreamplug has shut down the TCP/IP connection.

We could assume that within 30 seconds of dropping a TCP/IP connection, the plug should be properly shut down, but TBH the only way to know for sure is via the JTAG / console connection, where a "System halted." message may be visible. (I did a test shutdown and the lights did not change). Maybe you could modify the shutdown procedure so that the very last step would be a change in one or more LEDs.

The Dreamplug should be fairly resistant to problems related to unexpected power loss, at least so far as the O/S (micro-SD) card is concerned.

This issue should not be considered a major problem.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!