Score:1

How to remove the same directory mounted to different mounts

gs flag

I tried to create few mounts for two local directories in Ubuntu 20.04 but ended up with this scenario. Clearly I made a mess. I want to delete all of these. How can I do that?

/dev/nvme0n1p1 on /mnt/student_report_files type ext4 (rw,relatime,discard)
/dev/nvme0n1p1 on /mnt/students type ext4 (rw,relatime,discard)
/dev/nvme0n1p1 on /mnt/students type ext4 (rw,relatime,discard)
/dev/nvme0n1p1 on /var/www/students/shared/files type ext4 (rw,relatime,discard)
/dev/nvme0n1p1 on /mnt/student_report_files type ext4 (rw,relatime,discard)
/dev/nvme0n1p1 on /var/www/students/shared/attachments type ext4 (rw,relatime,discard)

So if I manage to delete those above 6 wrong mounts, will it delete this one as well? I didn't create this

/dev/nvme0n1p1 on / type ext4 (rw,relatime,discard)

Thanks for the help in advance

waltinator avatar
it flag
You can specify a directory e.g. `sudo umount /mnt/student_report_files`. Do this before removing them from `/etc/fstab`
Larrikin avatar
gs flag
Thanks a lot guys, umount worked perfectly fine. Saved my day
Larrikin avatar
gs flag
@karel Yes, it answered my question. Thanks
Larrikin avatar
gs flag
Wanted to mark as answer but couldn't find any way to do that.
karel avatar
sa flag
@Larrikin If the above link answered your question please click the "Yes" option to the right of "Does this answer your question?" in the light blue banner above your question.
Larrikin avatar
gs flag
Yep, did that. Thanks a lot
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.