cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

USB storage

USB storage

Venzi_
Established Member

I am using the USB storage on the ctrlX Core to store process recipes and logged process data from our machine via Node-red.

After update of Node-red from 1.4.0 to 1.8.1 (RM21.03) I lost the acces to the mounted USB device.

I tried to format a new USB memory, but failed:

grafik.png

After formating it on an external linux machine and several reboots I got it mounted, but with error:

grafik.png

As user admin I have full access on the storage:

grafik.png

But, Node-red has no permissions at all to acces the storage anymore:

"failed to write to file: Error: EACCES: permission denied, open '/media/mnt/sda1/recipes/recipe3.csv'"

How can I recover that functionallity? Is there something new I missed to set after the update?

Thanks!

7 REPLIES 7

CodeShepherd
Community Moderator
Community Moderator

For your first topic the problem with formatting an flash drive to mkfs.ext4 is a known bug in the OS and under investigation. FAT32 should work normal.

Second the rights of mounting a drive was restricted because of security reasons in the version 1.8. This will be reworked in the next release milestone RM21.07 (version 1.10) coming up end of July.Thenit will be possible again also via a web based user interface.

At least please beware, that a standard (productive) ctrlX CORE will have no user with root rights. This access is for development purposes only.

 

Venzi_
Established Member

Thanks for the information for those two topics.

Actualy, my issue is that Node Red cannot access sda1 anymore neither mounted as ext4 nor as FAT32. It seems it gets only permissions for directory /var/snap/ctrlx-node-red/48

CodeShepherd
Community Moderator
Community Moderator

That's the way in a secure system it should be. So a snap only can manipulate its own storage or needs to have interfaces to other locations. These interfaces and mechanisms are reworked and established in the next release (RM21.07 v1.10) that I mentioned.

EDIT:
As an addition: The configuration can also be used to write data. This data will then be stored remanent in the solution manager and will be switched with the active configuration. E.g.:

 

e.g.: /var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/MyConfiguration/node-RED
active: /var/snap/rexroth-solutions/common/solutions/activeConfiguration/node-RED

 

Venzi_
Established Member

Thanks for the clarification. I rearanged writing the recorded data after the update in /var/snap/ctrlx-node-red/48/package-run/ctrlx-node-red/. I will change to the path you recommended.

Is there a critical memory usage for each snap or especially for Node red  I shouldn't exceed? 

Is there any recommendation from your side to monitor one of the following values (or others) in order to prevent any issues with e.g. running out of memory for other processes until the next release?

grafik.png

CodeShepherd
Community Moderator
Community Moderator

Our internal storage is a 4Gb eMMC chip. At the moment only the size of a snap itself is limited to 250 Mb but not the storage used of it. Please beware of the limited write cycle lifetime of this chip.

You can have a look at the values mentioned by you for CPU and RAM utilisation and also the total storage (https://192.168.1.2/storage/storage). We recommened to keep at least 200Mb of free disc space for normal operation: 

2021-05-04_15h50_32.png

As an update to this topic: access to SD/USB storage is available since July like promised. Devices can be mounted and data is found in the path: (Hint: In version 1.14 the path to the mounted devices is displayed in the ctrlX web visu)

 

/media/mmcblk1p1/

 

2021-11-17_15h20_16.png

aFouraker
Occasional Contributor
I tried this today with python attempting to copy a file from /media/sda1 to a local directory. I got the error that there were not sufficient privileges. When I did the same from NodeRed I had no problems. Any suggestions on this?
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist