Ask Your Question
1

Optimizing mount options for additional HDD

asked 2016-05-02 12:30:39 -0500

thingummybob gravatar image

I have read the man pages for mount, mount.cifs, lsblk, fstab etc. I don't have a problem with basic mounting, but I am curious. A short example will show why:

I installed a new HDD purely to house a music library. I thought it would be a good idea to mount it into ~/Music to avoid showing two "Music" locations in Folder view. I also hoped it might mean Gnome music would find the music files (presently it doesn't). This is via a basic mount in fstab:

LABEL=Music /home/thingummybob/Music ext4 defaults 0 2

Following suggestions in the manuals, I'm led to believe that using device labels is preferred over UIDs.

Broadly speaking the mount works exactly as expected. The drive is visible in Folder views and as /home/Music. But I suspect all is not quite as good as it could be. First is that whenever I open the folder after first boot, it seems to take quite a long time to display the contents. Okay there's 300+ Gb in there, but still. More confusing though is the display of embedded thumbnails. Seeing that some music files display only a default icon (and not the embedded art) I set about checking the files themselves but could find NO apparent differences. And then I plugged in a USB stick containing a copy of one of the problem files, and immediately it opened in Folders where the embedded art was visible!

So there is a difference between how files are treated on the mounted internal drive, and how files are treated during automount. I'd like to ensure that my internal drive - which has a specific role within the system (I have another for general data) - gains all the apparent advantages of auto-mounted ones, or is optimised entirely as a music library.

I've been reading that /media and /mnt have slightly different 'privileges' within the system as opposed to mounting to any old location (which one can).

Are there any gains available by mounting the HDD into /media or /run/media? What part do symlinks play in all of this, if any? What are mask permissions? Do they have a part to play in this?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2016-05-11 16:32:09 -0500

genodeftest gravatar image

I prefer UUIDs over labels due to being unique and thus there is less chance to mess things up by attaching another disk with the same label.

Thumbnails: In nautilus preferences you can choose the maximum size of files to generate thumbnails for. You might want to change this. Furthermore this might be related to some file formats not being supported. And you might want to check syslog for fails when getting those thumbnails.

I guess /media and /mnt are different only in the way they get labelled by SELinux. If you care about that, mount your disk in /media and create a symlink from /home/thingummybob/Music to it.

For mask permissions have a look at /etc/mtab. I don't think there are any differences.

edit flag offensive delete link more

Comments

thanks, will do. So if a thumnail shows up on the SAME file when inserted via a USB stick but not when viewed at its mounted location, this would be because of caching on the automount?

Was looking at the manual for Udisks to see if that might have anything to do with it.

thingummybob gravatar imagethingummybob ( 2016-05-12 03:21:38 -0500 )edit
1

answered 2016-05-11 20:59:27 -0500

My recommendation i to use your favorite media play and have it scan the drive for your media and store it in its database. That way the album art will be stored in the application and you will not have to worry about the thumbnails in the folders.

There is really no difference between /media /mnt and so forth they are all mount points.

As for the thumbnails it more depends on your folder structure. Thumbnails take a while to load when you have hundreds of them in a directory. I am not sure what your folder layout is but most likely it is all the albums in one directory. If that is the case any OS would take a while to load the thumbnail data.

Are there any gains available by mounting the HDD into /media or /run/media? No at all

What part do symlinks play in all of this, if any? Symlinks will not speed up the loading of the thumbnails

What are mask permissions? The mask are the fault permission a file gets when it is created and that will not help in your case that is more so related to security

edit flag offensive delete link more
0

answered 2016-05-12 02:58:50 -0500

thingummybob gravatar image

Thanks to you all for the various answers - all very useful. Several further comments:

The music directory structure is largely as was imported, but is well organised e.g. everything under one parent "Music" but with folders per artist > album, plus some folders for "genre" for larger grouping. So yeah, ultimately one folder, but very well organised. Point being that thumbnails will appear through driving down into subdirs - levels as low as five or six folders down.

From other helpful comments (from the quodlibet dev) I think the thumbnail display issue is quite narrow and related to two things only: one is cache - when and how files are read as altered or not, and thus whether the system might update the cache to reflect that fact that, for example, I may have edited the music file. The other is to do entirely with .wma files. Seems that ASF is a Microsoft proprietary format, so while the system codecs (and by extension any suitable installed media player) will recognise and play .wma, I'm told that the specs are not open to be read by developers, thus there's what I might call the barest, minimum support for such flies. It is almost exclusively these file types I'm having thumbnail issues with. Lesson from this? Just ditch all the ghastly Microsoft/Windows related crap out of my Linux box, and stick to things like mp3 and flac, which while also being patent encumbered, are widely enough used and understood to present far less problems :0)

Don't think I want or need to go down the road of masking my music dir as a portable device, but thanks for the tip.

edit flag offensive delete link more
0

answered 2016-05-11 19:33:11 -0500

mclmmc gravatar image

my 2c

create a file named: .is_audio_player in root directory

look here for file content.

this is an example

name="Toshiba 650GB"
audio_folders=Musica/

name: the player show this name in device list, so you may attach more than one hdd

audio_folders: where music is.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-02 12:30:39 -0500

Seen: 154 times

Last updated: May 12 '16