1

My embedded Linux system has two block devices:

  • SD card: /dev/mmcblk0
  • Nvme ssd: /dev/nvme0n1

I am copying files from an SD card to NVMe SSD, and I use nmon to monitor the disk activities on both devices.

I was expecting that there will be only R (read activity) from the source device (i.e., /dev/mmcblk0), but it seems there are also W (write activities) shown for the SD card.

nmon screenshot

Is it normal? And if it is, why?

sawdust
  • 18,591
bruin
  • 145

1 Answers1

3

I am copying files from an SD card
...
but it seems there are also W (write activities) shown for the SD card.

The metadata for each file read is being updated.
Specifically the last 'access' timestamp has to be recorded for each file that is read and copied.

You can verify that the 'access' timestamp has been updated for each file by using the stat command.
See this answer that describes the drive activity for a file copy.

Since the SD card also has the rootfs, there could be some I/O activity related to the system logs and/or swap area, but normal file copying is not likely to generate log messages or induce page swapping.

sawdust
  • 18,591