06-20-2024 07:57 AM
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
06-28-2024 05:58 AM
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