Reading from a USB or an SD Card on Linux Real-Time Controller Unsuccessful

Updated Aug 1, 2023

Reported In

Operating System

  • NI Linux Real-Time

Issue Details

On my NI Linux Real-Time controller, I get an error when trying to read from my mounted USB key or SD Card. When I re-insert the card or key the console gives the error: 
FAT-fs(sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsk.

When I try to read the USB key or SD card data from LabVIEW, I receive the following error: Error 6 occurred at Open/Create/Replace File...

Why does this happen and what can I do to fix it?


The problem comes from power down on USB keys or SD cards formatted in the FAT file system. The FAT file system registers the abrupt power down with disk errors, which locks the removable storage device as read-only. The error message results in LabVIEW not being able to access the storage device because it is in read-only mode.

To quickly resolve the issue: Perform a reboot or power cycle of your system.

Additional Information

​If your application can result in abrupt controller power downs, then you can avoid this issue by using journaling file systems like EXT3 on your removable storage device.