View previous topic :: View next topic |
Author |
Message |
curmudgeon Veteran
Joined: 08 Aug 2003 Posts: 1741
|
Posted: Wed Dec 25, 2013 2:51 am Post subject: more destruction of usability |
|
|
I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.
First question - can someone explain any purported benefits of this?
Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.
Thank you in advance for your help. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Dec 25, 2013 5:48 am Post subject: |
|
|
Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory. _________________ Paul |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Wed Dec 25, 2013 6:01 am Post subject: |
|
|
Quote: | First question - can someone explain any purported benefits of this? |
Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Wed Dec 25, 2013 11:09 am Post subject: |
|
|
The Doctor wrote: | Quote: | First question - can someone explain any purported benefits of this? |
Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
|
For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd. But... |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Wed Dec 25, 2013 11:29 am Post subject: |
|
|
The Doctor wrote: | Quote: | First question - can someone explain any purported benefits of this? |
Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for. |
Makes me glad that I don't run or even have udisks* installed.
The constant change simply because redhat wants to do it a form of insanity.
i92guboj wrote: | For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd |
I keep /mnt as a hard mount point, though I do symbolic link /media to it.
Been that way for years. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Wed Dec 25, 2013 11:54 am Post subject: |
|
|
I understand the fstab vs. removable media stuff. But, taking into consideration that the new system is broken anyway, and that you need to tinker with files in /etc related to *kit* *dev* foobarmoocow, there's really no point in separating them.
Previously you needed to be root to mount drives. Now you need to be root to do all that, to kill whatever is locking a given drive at a given moment, and then to be able to format, remove it, etc etc etc. That is, unless you give your user full 777 permissions over /dev/*, which might not be advisable for many reasons.
More and more this is reminding me of a given OS where you sometimes need to reboot to be able to push off a cdrom. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Wed Dec 25, 2013 1:33 pm Post subject: |
|
|
i92guboj wrote: | I still wonder what the reason for the move from /mnt to /media is. |
The FHS explicitly requires /media for filesystems from removable media (suggesting floppy, cdrom, cdrecorder, zip as subdirectories) while /mnt is for "temporarily mounted filesystems" (being a bit vague what that means, but apparently not removable media).
Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons. |
|
Back to top |
|
|
curmudgeon Veteran
Joined: 08 Aug 2003 Posts: 1741
|
Posted: Wed Dec 25, 2013 3:57 pm Post subject: |
|
|
Logicien wrote: | Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory. |
How to do that is not clear at all. Looking at the directory structure (at least on my systems), /run/ is a real directory and /var/run/ (which appears in the PRUNEPATHS variable in /etc/updatedb.conf) is symlinked to it.
It seems to me that anything under /run/ (/var/run/) is going to get skipped, whether linked somewhere else or not.
It MIGHT work if there were an "exclude" option (like rsync has), since I want to skip everything in /run/ (which I can't even specify completely in advance) EXCEPT for /run/media/.
Very helpful (and especially noteworthy that Ubuntu "got it right" - in my opinion). Probably faster for me to search the tarball and patch it myself rather than running down their patch. Thanks.
mv wrote: | Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons. |
I can certainly live with /media/user/ (even though it is a bit more typing :) ), which is what Ubuntu went with according to the link posted by The Doctor above (and what I will probably end up going with). There is some point to keeping user separation, even though I would guess that well over ninety percent of mounting removable media is effectively in a single user environment). But putting removable media in /run/ just seems so wrong on so many levels.
The biggest reason I use gentoo is that it is (relatively) easy to fix idiocies like this (not just once, but to sort of automate a set of "permanent" patches).
Thanks, all. |
|
Back to top |
|
|
chaseguard Tux's lil' helper
Joined: 25 Jun 2004 Posts: 140
|
Posted: Thu Dec 26, 2013 3:58 am Post subject: |
|
|
I use uam, not udisk. My mountpoint has not changed and is easily configured in uam.conf. If your media is USB, then perhaps uam might work for you? |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Thu Dec 26, 2013 12:01 pm Post subject: |
|
|
curmudgeon wrote: | But putting removable media in /run/ just seems so wrong on so many levels. |
Not necessarily: There are new subdirectories created at runtime which "typically" should not be permenant. So you either you clean up /media at every reboot (which would be a very questionable policy) or you put that data on a ramdisk (which /run is guaranteed to be). Maybe Redhat has a symlink /media -> /run/media in which case they would follow FHS and additionally have "solved" the cleanup problem. |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Thu Dec 26, 2013 6:52 pm Post subject: |
|
|
i92guboj wrote: | The Doctor wrote: | Quote: | First question - can someone explain any purported benefits of this? |
Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
|
For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd. But... |
I totally agree |
|
Back to top |
|
|
OldTango l33t
Joined: 21 Feb 2004 Posts: 718
|
Posted: Mon Feb 03, 2014 6:15 pm Post subject: Re: more destruction of usability |
|
|
curmudgeon wrote: | I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.
First question - can someone explain any purported benefits of this?
Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.
Thank you in advance for your help. | I think this move sucks as well and won't get into all the problems it has caused me. To simply answer your question YES you can change it back. Create a file in "/etc/udev/rules.d/99-udisks2.rules" that reads Code: | ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1" | after which your removable media will be mounted @/media/foo |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Feb 03, 2014 6:53 pm Post subject: |
|
|
Thanks a lot OldTango!
Works like a charm.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
|