Hello Antti Rytsola,
Welcome to microsoft Q&A, Thankyou for posting your query here.
Adjust the permissions of the /mnt
directory to allow writing and execution.
chmod 755 /mnt
check if the disk is still mounted using
mount | grep /dev/sdb1
mount command to list all mounted filesystems and grep for /dev/sdb1 to see if it appears in the list.
Find out if it’s being used by another process, using lsof or fuser to identify any processes that might be using /dev/sdb1.
lsof /dev/sdb1
fuser -m /dev/sdb1
You can forcly umount using -f and -l tag.
umount -f /dev/sdb1 or umount -f /mnt
umount -l /dev/sdb1 or umount -l /mnt
Try formatting again using
mkfs.ext4 /dev/sdb1
Check for filesystem issues using "fsck"
fsck /dev/sdb1
If all else fails, a reboot can sometimes clear up the issue, especially if the disk is stuck in a busy state due to a system or kernel issue.
Hope this helps you, if an answer has been helpful, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!