The officially official Devuan Forum!

You are not logged in.

#1 2022-03-10 02:02:39

davidb
Member
From: Saskatchewan, Canada
Registered: 2020-08-10
Posts: 17  
Website

[SOLVED] Is it safe to clear out /media folder of old sd(x) references?

I'm not sure if this specific to Trinity (which is what the Exe derivative of Devuan uses) or if it's a Devuan thing, but my /media folder is filled with references to old USB storage devices that were once plugged into my netbook.  Is it safe for me to just go in as root and remove all of these old references, or is there a better way to get rid of them (aka purge them)?

Look at them all!  I detest clutter like this.

drwxr-xr-x  2 root root 4096 Dec 27 18:46 14.5GB Removable Device (sdd)
drwxr-xr-x  2 root root 4096 Dec  9 08:36 29.1GB Removable Device (sdc1)
drwxr-xr-x  2 root root 4096 Nov  8 23:28 29.1GB Removable Device (sdd1)
drwxr-xr-x  2 root root 4096 Dec 10 18:28 7.3GB Removable Device (sdd1)
drwxr-xr-x  2 root root 4096 Dec 25 10:07 976.6GB Removable Device (sdb1)
drwxr-xr-x  2 root root 4096 Dec 25 10:14 976.6GB Removable Device (sdd1)
drwxr-xr-x  2 root root 4096 Dec 27 18:52 EXEGNU_32 (sdc)
drwxr-xr-x  2 root root 4096 Nov  8 17:10 Misc (sdc1)
drwxr-xr-x  2 root root 4096 Dec 13 21:06 Mobile Media (sdc1)
drwxr-xr-x  2 root root 4096 Dec 22 15:19 SEAGATE3 (sdb1)
drwxr-xr-x  2 root root 4096 Dec 22 15:19 SEAGATE4 (sdb2)

Last edited by davidb (2022-03-10 02:03:39)

Offline

#2 2022-03-10 09:39:38

Camtaf
Member
Registered: 2019-11-19
Posts: 432  

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

Looks like it's a log file of the devices that had been attached, should be perfectly safe to empty/delete.

Last edited by Camtaf (2022-03-10 09:40:24)

Offline

#3 2022-03-10 20:57:56

davidb
Member
From: Saskatchewan, Canada
Registered: 2020-08-10
Posts: 17  
Website

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

Thank you for your reply and reassurance.  Removed them all with no apparent harm done.

It just seemed out of the ordinary to me that these old references stuck around.  On any other Linux distro. I've ever used, the mounted sd devices usually got cleared from the /media folder automatically when they were unmounted.

Offline

#4 2022-03-11 09:16:53

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

Does a new entry get created if you plug a storage device in? Check the logs afterwards to see what's happening.

I think Xfce should use GVFS to create user-owned directories under /media but your "old references" were all root-owned.


Brianna Ghey — Rest In Power

Offline

#5 2022-03-11 12:20:18

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,479  

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

I get leftover directories in /media occasionally and have one now. Looks like it's from pmount. I can't be sure if pmount made the error or if I did it by forgetting to pumount before unplugging the device or maybe by unmounting it as root. I just delete the leftovers when I find them.

With no removable media plugged in:

ls -la /media/sde2/
total 8
drwxr-xr-x 2 root root 4096 Apr 22  2021 .
drwxr-xr-x 4 root root 4096 Jan 12 16:36 ..
-rw------- 1 root root    0 Apr 22  2021 .created_by_pmount

Offline

#6 2022-03-11 20:37:56

davidb
Member
From: Saskatchewan, Canada
Registered: 2020-08-10
Posts: 17  
Website

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

fsmithred wrote:

With no removable media plugged in:

ls -la /media/sde2/
total 8
drwxr-xr-x 2 root root 4096 Apr 22  2021 .
drwxr-xr-x 4 root root 4096 Jan 12 16:36 ..
-rw------- 1 root root    0 Apr 22  2021 .created_by_pmount

Good catch!  I see the same thing.  It must be a pmount "thing" that happens.  I always use the mount/unmount commands via the TDE desktop, but maybe something with pumount happens every so often.  Interesting.  I'll keep a closer eye on when this happens.  Thanks!

Offline

#7 2022-03-11 20:41:05

davidb
Member
From: Saskatchewan, Canada
Registered: 2020-08-10
Posts: 17  
Website

Re: [SOLVED] Is it safe to clear out /media folder of old sd(x) references?

Head_on_a_Stick wrote:

Does a new entry get created if you plug a storage device in?

Nope.  The entries only get created when mounted.  TDE desktop does show the devices available, but only mounts them when the icons are selected.

Offline

Board footer