Jump to content


Photo

Internal hdd mounting by label


  • Please log in to reply
8 replies to this topic

#1 Taapat

  • PLi® Core member
  • 2,342 posts

+120
Excellent

Posted 25 November 2015 - 19:34

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.


Re: Internal hdd mounting by label #2 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 November 2015 - 13:37

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.

Real musicians never die - they just decompose

Re: Internal hdd mounting by label #3 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 November 2015 - 13:38

For stupid old plugins that still refer to /hdd or similar hard-coded paths, just create a symlink.
Real musicians never die - they just decompose

Re: Internal hdd mounting by label #4 Taapat

  • PLi® Core member
  • 2,342 posts

+120
Excellent

Posted 26 November 2015 - 14:31

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.


Re: Internal hdd mounting by label #5 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 November 2015 - 15:27

I think I don't understand what you mean.

Could you formulate your request as a simple patch to the mdev-mount.sh script?
Real musicians never die - they just decompose

Re: Internal hdd mounting by label #6 Taapat

  • PLi® Core member
  • 2,342 posts

+120
Excellent

Posted 26 November 2015 - 16:00

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.



Re: Internal hdd mounting by label #7 Dimitrij

  • PLi® Core member
  • 9,993 posts

+338
Excellent

Posted 26 November 2015 - 17:00

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.


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Internal hdd mounting by label #8 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 November 2015 - 18:27

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.


Real musicians never die - they just decompose

Re: Internal hdd mounting by label #9 Taapat

  • PLi® Core member
  • 2,342 posts

+120
Excellent

Posted 26 November 2015 - 18:50

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users