Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO 9030 volume info for connected USB drive

Solved!
Go to solution

I would like to display the available disk space for a USB drive plugged into a cRIO-9030 running Linux Realtime (path to drive is /U).  This is for a data logging application that might run for a month with users only glancing to see that things are running OK, which they won't be if the disk space gets used up.  I have tried the Get Volume Info and the File/Directory Info VIs, but they both are giving me nonsense values.  It seems as though the Get Volume Info VI always reports on the internal drive (/C) no matter what path I use, so I can't see how much space I have on the /U drive.  I have plugged in different USB drives with different capacities and amount free, but I always get the same values from the VI, which also differ from what MAX reports for the /C drive, but are closest to the values for that drive than anything else.  I also get a useless value back from the File/Direcory Info VI, which seems to be reporting how many files are at the root level of the drive, not its capacity or its free space.  Any suggestions for how to get the free space and capacity for a USB drive plugged into the cRIO?

bjlv

0 Kudos
Message 1 of 3
(5,033 Views)
Solution
Accepted by topic author bjlv

Odd. I just tried this on my own Linux RT target (running LVRT 2014) and it seems to work as you expect, where Get Volume Info on "/u" returns the space available on the USB stick, and is definitely different than what I get from the internal drive. I did see a bug (?) where just "/" was not supported, which it should be on Linux:

gvi.png

/u (or /U) is actually a symbolic link to where the disk is actually mounted, such as /media/sda1 or /media/sdc1. (/u is provided as a compatibility convenience for porting applications from Phar Lap or VxWorks.) Do you get the same result from using the actual mount location? Do you have shell access to the target? If so, what does "df" show?

 

0 Kudos
Message 2 of 3
(5,020 Views)

Thanks for the reply.  I just repeated what I spent about an hour playing with yesterday, and today it is just fine.  There must have been something corrupted yesterday that the reboot into today has fixed.  At least it works fine now

0 Kudos
Message 3 of 3
(5,010 Views)