SD Card and storage issues; where do you deploy an app to?

Home Forums Conduit: AEP Model SD Card and storage issues; where do you deploy an app to?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #31428
    wkhatch@unimar.com
    Participant

    I struggled with the title of this thread, as it could just as easily have been “What is the best practice for deploying an actual application on an MTC”. I get out of space errors after uploading a single file in the users home directory. So, decided I’d just use the SD storage. Nope. Mounts it at /media/card, which is link to /run/media/mmcblk0p1 and neither of those paths are accessible; just get “No such file or directory”. I’m not able to reformat the card on the MTC, because there are no standard disk or file system utilities included in the build. Nothing anywhere in any documentation I’ve come across so far to explain such a simple, common thing. So, I’m asking… What is the recommended best practice for deploying an application on a conduit? How does it get there, scp, ftp, curl? Where should it live on the file system? If it’s on the SD card, how do we make that work? How is it hooked into whatever process management this device uses? I see monit references, maybe? Honestly, I’m shocked there’s nothing at all, anywhere, on the entire site, that even attempts to answer these questions. I’d think it’s a common thing, no?

    #31432
    wkhatch@unimar.com
    Participant

    For what it’s worth, this article https://www.multitech.net/developer/software/corecdp/applications/improving-sd-card-performance/ indicates that there’s an entry in /etc/fstab specifying the sd card, at /media/card, but there is no entry like that in my fstab. Instead, the closest I’ve got is:

    tmpfs /run tmpfs mode=0755,noexec,nodev,nosuid,strictatime 0 0

    #31433
    Jeff Hatch
    Keymaster

    Hello,

    The FAT32 or EXT3/4 formats should work on the MTCDT. Formatting can be done on any Windows or Linux PC (as long as you have an SD card slot). Have you “sudo’ed” to root privilege before trying to access the SD card?

    # sudo -s

    For instructions to get started on creating a custom application see http://www.multitech.net/developer/software/aep/creating-a-custom-application/

    Custom applications are managed on the Conduit by the app-manager program. This program can be used to install applications locally or download them remotely from Device HQ. It is also used to manage the applications starting and stopping.

    Jeff

    #31435
    wkhatch@unimar.com
    Participant

    No change in behavior after following the steps at the above link. Any access attempts to /media/card return “No such file or directory”

    fdisk -l:
    
    Disk /dev/mmcblk0: 127.8 GB, 127865454592 bytes
    255 heads, 63 sectors/track, 15545 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1               3       15546   124852224   7 HPFS/NTFS
    #31437
    wkhatch@unimar.com
    Participant

    Yes, I’m doing all this with either sudo or root. Do we have to use this AppManager application? I really don’t want or need another piece of middleware to deploy an app if I don’t have to. I know how to hook into monit, I just can’t carve out the space for my apps, and then getting the code or binaries on the device is a challenge, mostly due to this space issue. scp will fail if the file is too big, and I’m not able to scp to the card storage, etc.

    #31438
    wkhatch@unimar.com
    Participant

    So, the card was formatted using sdformatter, as HPFS/NTFS so that’s likely part of the problem. I’ll try it on a different machine using a different utility. I think the device should include formatting utilities so you can manage all this directly on the device. Thanks for the clarity on supported fs types; appreciate it.

    #31440
    Jeff Hatch
    Keymaster

    Hello,

    If the formatting utilities along with a lot of other “app building” tools, ie. cross compiler etc., were included on the Conduit there would be no space for anything else.

    Using app-manager is not a requirement as long as you are not planning to use the Device HQ platform to manage your application(s).

    One additional thing: The throughput on the SD card will be limited by the CPU and hardware on the Conduit. What that means is that you will not want to log lots of data to the SD Card or do busy database operations like high usage of a SQLite database. If you are just using it to store your apps and run them from there you should be good.

    Jeff

    Jeff

    #31441
    wkhatch@unimar.com
    Participant

    ext3/4 were no go’s, but FAT32 works, assuming you’re only accessing as root; everybody else outside of root:disk will have no access, which implies you have to run the apps as root; also not really great, but I’ll take it at this point. There’s probably something to be done to change it’s default permissions, umask, etc to at least allow read and execute for world, so I could assign directory level permissions as appropriate, but not going to dig into that right now.

    #31442
    Jeff Hatch
    Keymaster

    I’ve not had much luck with any kind of permissions on an SD card via Linux when the card is formatted in FAT32. In fact, I don’t think that FAT32 has any way of storing file permissions, so I don’t know if it could do anything with directory permissions.

    If you want, you could file a case at https://support.multitech.com/support/login.html to see if you can get some help getting EXT4 working. If nothing else, they will know the exact specs the SD Card needs to be compatible with a Conduit.

    Jeff

    #31447
    wkhatch@unimar.com
    Participant

    I worked around this by making sure the user my app runs as is also associated with the disk group, so it picks up the right permissions. And yeah, fat32 fs ignore linux permissions aside from whatever they’re initially assigned, so chmod, etc will have no effect; I haven’t found any way of changing them yet.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.