←  [EN] Enduser support

Forums

»

Internal hdd mounting by label

Taapat's Photo Taapat 25 Nov 2015

I apologize if this somewhere already been discussed.

I have hdd which long time ago for experiments with the software is divided into 4 partitions. The first is the fat, the second swap, the third is a small ext2 for the root system, the fourth is large ext2 for data. Each has its own label. The fourth partition has a label hdd.
So far I this drive to my solo2 receiver connect via USB and all partitions on start monted by this label. The fourth was mounted as hdd as I expect:

/dev/sda1                 3.9G    168.0M      3.8G   4% /media/usb
/dev/sda3                 7.7G     78.9M      7.3G   1% /media/image
/dev/sda4               285.8G     67.5G    204.0G  25% /media/hdd

Today I this drive put inside in solo2 and after restart I see that the partitions is no longer mounted by label:

/dev/sda1                 3.9G    168.0M      3.8G   4% /media/hdd
/dev/sda3                 7.7G     78.9M      7.3G   1% /media/sda3
/dev/sda4               285.8G     67.5G    204.0G  25% /media/sda4

I see that in mdev-mount.sh provides that the internal drive ignores the label and as hdd is mounted the first device.

 

I think that this is wrong. I think that also the internal drive should mounted by label and only if there is no label hdd, first device should mounted as hdd.

Why it's not so, what I've missed?


Edited by Taapat, 25 November 2015 - 19:36.
Quote

MiLo's Photo MiLo 26 Nov 2015

Labeling a disk "hdd" will only work if you have exactly one harddisk. It will never work with multiple harddisks or partitions.

The partitions "arrive" in random order. When a partition announces itself, there is no way to know that this is going to be the last one. So another partition may "steal" the "hdd" name if it happens to get recognized sooner than the one with that label..

Label it whatever you want, just don't name it "hdd" if there's more than one. Best label them "orange-stick", "music" and "movierips" and stuff like that.
Edited by MiLo, 26 November 2015 - 13:39.
Quote

MiLo's Photo MiLo 26 Nov 2015

For stupid old plugins that still refer to /hdd or similar hard-coded paths, just create a symlink.
Quote

Taapat's Photo Taapat 26 Nov 2015

Labeling a disk "hdd" work without problems if there is only one device with the following label.

I look in the script and see that another partition can not "steal" the "hdd" name, it will be used only in the first one.

 

With the label "hdd" I refer directly to the device witch I want to use as the hdd for epg.dat, recordings, etc...

 

And it works as long this is not an internal drive. I think that right mdev-mount.sh would be as follows: https://github.com/T...x/mdev-mount.sh

Prefer label in any case, and only if there is no label mont first device as the hdd.


Edited by Taapat, 26 November 2015 - 14:34.
Quote

MiLo's Photo MiLo 26 Nov 2015

I think I don't understand what you mean.

Could you formulate your request as a simple patch to the mdev-mount.sh script?
Quote

Taapat's Photo Taapat 26 Nov 2015

I want also for the internal drive mount by label.

 

Before creating a pull request, I wanted to discuss this situation.

Maybe I do not understand something.

 

But perhaps more appropriate is create a pull request, and then after a few weeks get accept or rejection.

Quote

Dimitrij's Photo Dimitrij 26 Nov 2015

I think I don't understand what you mean.

Could you formulate your request as a simple patch to the mdev-mount.sh script?

It's simple ...
The first is to check the label.
Second, it is an internal drive or not.

Quote

MiLo's Photo MiLo 26 Nov 2015

Ah, I see. Yeah, doing label first makes sense. I thought it already did so, but it doesn't, it only treats non-internal disks this way.

 

Since the internal format doesn't label the disk, most people should be unaffected.

Quote

Taapat's Photo Taapat 26 Nov 2015

I create pull request: https://github.com/O...oe-core/pull/25

Quote