NextcloudPi USB stick permanently in use

[/details]

Nextcloud version (eg, 29.0.5): 28.0.5 - NextcloudPi_RaspberryPi5_v1.54.0
Operating system and version (eg, Ubuntu 29.04): Raspberry Pi OS/Debian 11 (Bullseye)
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 8.3): PHP 8.1

The issue you are facing:

I have a new and clean NextcloudPi instance running.
The OS is running on an sdcard.
I attached a usb stick and configured it as the storage for the NC data.
Although actually no additional users except the default admin are in the system and no data is uploaded
the attached usb stick is constantly in use.
Means that the usb stick led is permanently blinking and showing that some access is happening.
Also the stick is getting quite warm.

Is that a normal behaviour?

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Install fresh NextcloudPi_RaspberryPi5_v1.54.0
  2. login with default ncp adnmin user
  3. configure attached usb stick as NC data storage

Thank you very much in advance.
Love Nextcloud.
Cheers

lsof /dev/sda

sda - usb stick

I don’t know what kind of flash drive you have, but flash drive manufacturers often set software current limits on flash drive controllers. There is 200-300 mA, more on USB 3.x. On the raspberry USB2 port - 500 mA. The smaller the difference between the source and the consumer, the less the conversion of current into heat. The dependence of the heat generated on the current is quadratic, everyone knows.

Thanks for your answer but that heat thing is rather less important, its just an ungly side effect that I wanted to mention.
The main focus for me is why there is apparently a constant access to the usb stick although no user, no logged in user and no data exists.
So is it normal that there is a constant access to the stick?

No, that is not usual behaviour. So I suggest to check filesystem,and/or change device.

Have you tested the performance of the USB stick with the DD comand?

https://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/

No, that is not usual behaviour. So I suggest to check filesystem,and/or change device.

But how to check the filesystem?
Possible to find sth in logs e.g. what is doing the constant access to the data directory on the usb stick?
Or find processes that are suspiciously doing this data access?

Is the device recognized by system?
Do some checks on cli
lsusb
lsblk

To see what the process doing the constant access use iotop, follow these steps:

  1. Install iotop: If iotop is not already installed on your system, you can install it using your package manager. For example, on a Debian-based system (like Ubuntu), you can use:

    sudo apt-get install iotop
    
  2. Run iotop: You need to have root privileges to run iotop and monitor I/O usage of processes. Use the following command to start iotop:

    sudo iotop
    
  3. Monitor a Specific Process: Once iotop is running, you can monitor the I/O usage of a specific process by looking at its process ID (PID). For example, if you want to see what a process with PID 1234 is doing, you would:

    • Start iotop with:
      sudo iotop -p 1234
      
    • This command will filter the I/O activity to show only the specified process.
  4. Interpret the Output: The iotop interface shows several columns of information:

    • PID: Process ID.
    • PRIO: Priority of the process.
    • USER: User running the process.
    • DISK READ: The amount of data the process is reading from the disk.
    • DISK WRITE: The amount of data the process is writing to the disk.
    • SWAPIN: Swap in activity.
    • IO: The percentage of time the process is waiting for I/O operations to complete.
    • COMMAND: The command used to run the process.

Here’s an example of how to use iotop to monitor a specific process:

sudo iotop -p <process_id>

Replace <process_id> with the actual PID of the process you want to monitor.

By using iotop, you can effectively monitor the disk I/O of processes, which can help in diagnosing performance issues related to disk usage.

What is the brand and size your USB stick is please?

To see what the process doing the constant access use iotop, follow these steps: …

Thank you very much for this detailed description.
I checked the IO the way you recommended.
Result:
No suspicious IO shows up.
Since the system is not in practical use at all, iotop basically shows 0.00 B/s for read and write almost all the time.
The usb stick still blinking continuously and thereby showing that apparently some access is happening.

Thats the usb stick I am using:
Kingston DataTraveler Max - 1TB - USB 3.2 Gen 2