Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO USB and SD card drive mounting and identifiers

Hi

 

Is it possible to control the way symlinks (/u /v etc) are allocated to USB and SD removable storage on cRIO controllers running NI Linux RT?

 

I have a LabVIEW app that writes data to /u which is fine when just a single device is present (USB drive) but when an SD card is added that takes /u and the USB becomes /v.

 

All I can find in SysVinit is a script to delete old symlinks:

 

cat /etc/init.d/nicleanstalelinks
#!/bin/sh
# Copyright (c) 2012-2013 National Instruments.
# All rights reserved.

# clean-up any stale compatibility symlinks created for hot-plugged mass storaged devices
for symlink in u v w x y z U V W X Y Z
do
    if [ -h "/$symlink" ]; then
        symlink_target=`readlink /$symlink`
        if [ ! -e "$symlink_target" ]; then
            rm "/$symlink"
        else
            grep -q -F "$symlink_target" /proc/mounts || rm "/$symlink"
        fi
    fi
done

 

Does anyone know what process creates them on bootup, and if you can control which letter is allocated to which drive?

 

In addition, how is the automounting is controlled?  It doesn't appear to be controlled by /etc/fstab 

 

Many thanks!

 

Aaron

 

 

0 Kudos
Message 1 of 2
(275 Views)

Failing the above - anyone know how to stop the uSD card from automounting and stealing the "U" letter - so it could be manually mounted later if needed instead and USB will keep "U"??

 

Thanks!

 

Aaron

 

0 Kudos
Message 2 of 2
(240 Views)