Embedded linux drive umounting issue

Hello, my issue regarding embedded linux is, when I didn’t insert any HDD/SSD drive via USB after booting,
in /media, I could see sda1 sdb1 sdc1 sdd1, and sde1. Even I could write or create file on that! (I have no idea how this is possible)

How can I fix this issue?


This is not an issue, it is how the Linux filesystem works.

You did connect USB (or SATA) drives which made Linux create the directories /media/sd?1, here as part of the rootfs.
These directories were then used as mount points for the attached drives. The filesystem on the mounted drive was then accessible under the mount point.

Any files/directories contained in the directory used as the mountpoint on the rootfs are now hidden by the now mounted file system. Once unmounted these files/directories become accessible again, also files can again be created.