Jump to content


Photo

attached usb drives partitions mounted at same point


  • Please log in to reply
27 replies to this topic

#1 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 11 November 2022 - 21:35

hello,

 

I have a zgemma h7 installed openpli release 8.2.

 

I attached two harddisks ,one of them with 2 partitions, other 1 partition, which are automatically mounted as expected.

 

But all mounted at the same point "/media/usb":

 

root@h7:~# mount
/dev/mmcblk0p5 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=149272k,nr_inodes=37318,mode=755)
tmpfs on /media type tmpfs (rw,relatime,size=64k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sdc1 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdb2 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /media/usb type ext4 (rw,relatime,data=ordered)

 

..and I can see only one of them randomly.

 

This behavior was not in previous openpli.

 

please help

regards


Edited by kallquk, 11 November 2022 - 21:38.


Re: attached usb drives partitions mounted at same point #2 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 11 November 2022 - 21:55

Did you restore stuff from a previous version? If so, your backup may have contained files you should not have restored, for example the udev mount script.

 

Run this to see if that is the case:

init 4
opkg update
opkg install udev-extraconf --force-reinstall
reboot

 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #3 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 13 November 2022 - 19:07

 

Did you restore stuff from a previous version? If so, your backup may have contained files you should not have restored, for example the udev mount script.

 

Run this to see if that is the case:

init 4
opkg update
opkg install udev-extraconf --force-reinstall
reboot

 

Thank you very much for helping me

 

I did a fresh install, got nothing from previous installation.

 

Anyway, I followed your steps, but problem persists:

 

root@h7:~# mount
/dev/mmcblk0p5 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=149272k,nr_inodes=37318,mode=755)
tmpfs on /media type tmpfs (rw,relatime,size=64k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered)
/dev/sdc1 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdb2 on /media/usb type ext4 (rw,relatime,data=ordered)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

 

Please note that I had this problem with this version only(release 8.2), and I don't know if it is in 8.3.



Re: attached usb drives partitions mounted at same point #4 Dimitrij

  • PLi® Core member
  • 10,331 posts

+350
Excellent

Posted 14 November 2022 - 06:19

answer:

cat /etc/fstab

 


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


Re: attached usb drives partitions mounted at same point #5 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 14 November 2022 - 21:20

 

answer:

cat /etc/fstab

 

Here:

 

 

root@h7:~# cat /etc/fstab
rootfs               /                    auto       defaults              1  1
proc                 /proc                proc       defaults              0  0
devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
tmpfs                /var/volatile        tmpfs      defaults              0  0


 



Re: attached usb drives partitions mounted at same point #6 Dimitrij

  • PLi® Core member
  • 10,331 posts

+350
Excellent

Posted 15 November 2022 - 06:14

opkg install blkid
blkid

Please answer.


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


Re: attached usb drives partitions mounted at same point #7 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 15 November 2022 - 21:28

opkg install blkid
blkid

Please answer.

 

apologize me for late response

 

root@h7:~# blkid
/dev/sdc1: UUID="782740f2-7d7f-44af-817d-59e29c3a762f" TYPE="ext4"
/dev/sdb2: UUID="be97b1e0-e6e0-4227-86f4-57d17d1842f0" TYPE="ext3"
/dev/sdb1: UUID="8fa9bdda-2d6d-47d3-b8ae-06c282a4b4aa" TYPE="ext3"
/dev/mmcblk0p10: UUID="06bc3dfa-2481-4c0c-b27b-c9a6098e2e89" TYPE="swap"
/dev/mmcblk0p9: UUID="cd3b2a32-863f-4b6f-8c72-ceb4702eed22" TYPE="ext4"
/dev/mmcblk0p7: UUID="2176020e-827a-43fa-8e80-97ab10e70d17" TYPE="ext4"
/dev/mmcblk0p5: UUID="fb1f0bb5-afc4-4357-9084-2db51f6d527b" TYPE="ext4"
/dev/mmcblk0p3: UUID="c2d12396-5f38-403d-bac0-0c45a1b74abc" TYPE="ext4"
/dev/mmcblk0p1: UUID="33CA-7DB5" TYPE="vfat"
/dev/sda1: UUID="d7a1590b-e9bb-47e5-bf94-188d1808238a" TYPE="ext4"

 



Re: attached usb drives partitions mounted at same point #8 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 15 November 2022 - 21:51

The automounter doesn't use UUID's.

 

It does

	if [ ! -z "${LABEL}" ] && [ -d /media/$LABEL ]; then
		# and something is mounted on it
		mountpoint -q /media/$LABEL && LABEL=
		# or not an empty directory
		test -z "$(ls -A /media/$LABEL)" || LABEL=
	fi

	# If no label, use the device name
	if [[ -z "${LABEL}" ]]; then
		LABEL="$NAME"
	fi

to make sure the mountpoint isn't used. If it is, it will default to the device name instead.

 

As this doesn't happen, either the udev configuration has changed (so the automounter isn't called), or the automount script itself has changed (which is unlikely after the force-reinstall).

 

To be sure, please retrieve /etc/udev/rules.d/automount.rules and /etc/udev/scripts/mount.sh from the box, put them in a zip file, and attach them here so we can check.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #9 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 16 November 2022 - 16:42

Here it is

 

 

Thank you again for helping me

Attached Files



Re: attached usb drives partitions mounted at same point #10 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 16 November 2022 - 17:07

Looks fine. So far, I'm clueless.

 

Can you put this debug version on the box (rename the current one first), and reboot the box? After it has booted, you will find a log in /home/root/udev.log, if you can retrieve and post that?

Attached Files


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #11 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 17 November 2022 - 01:49

here it is, as expected.

 

please note that I encounter this problem in the release-8.2 only

Attached Files



Re: attached usb drives partitions mounted at same point #12 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 17 November 2022 - 19:06

The formal answer to that last remark is "8.2 is no longer supported, upgrade to 8.3" ;).

 

But since that has the same udev setup, I doubt that would fix it. From the logs it seems that detecting that the /media/usb mountpoint already exists fails, which is why it keeps assigning the "usb" label to each device.

 

Can you copy and paste this on the commandline, and tell me what the output is?

ls -la /media
[ -d /media/usb ] && mountpoint /media/usb

after a reboot of the box?
 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #13 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 17 November 2022 - 20:50

 

root@h7:~# ls -la /media [ -d /media/usb ]
ls: [: No such file or directory
ls: ]: No such file or directory
drwxrwxrwt    5 root     root           100 Nov 17 01:40 /media
drwxr-xr-x    5 root     root          4096 Nov  9  2019 /media/usb
root@h7:~# mountpoint /media/usb
/media/usb is a mountpoint

 here it is, I think

 

I can switch to fstab &blkid also, can I ?

But in this case I must create other mount points than /media, because it is deleted after reboot, isn;t it?


Edited by kallquk, 17 November 2022 - 20:55.


Re: attached usb drives partitions mounted at same point #14 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 17 November 2022 - 21:44

These are two separate lines, execute them one at the time please.

 

And no, for mounts in fstab, mountpoints are created automatically.

 

But it is easier to label your partitions if you want a specific mountpoint for them:

e2label /dev/sdc1 mylabel

after this, /dev/sdc1 will be mounted at /media/mylabel.

 

But I'd rather understand and fix what goes wrong here.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #15 kallquk

  • Senior Member
  • 38 posts

+1
Neutral

Posted 18 November 2022 - 20:07

excuse me,

yes , agree, would be great fix automount

 

 

root@h7:~# mount
/dev/mmcblk0p5 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=149272k,nr_inodes=37318,mode=755)
tmpfs on /media type tmpfs (rw,relatime,size=64k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered)
/dev/sdb2 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /media/usb type ext4 (rw,relatime,data=ordered)
/dev/sdc1 on /media/usb type ext4 (rw,relatime,data=ordered)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
192.168.6.37:/media/hdd/movie on /media/net/37 type nfs (rw,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.6.37,mountvers=3,mountport=51329,mountproto=tcp,local_lock=all,addr=192.168.6.37)
192.168.6.37:/media/usb on /media/net/37a type nfs (rw,noatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.6.37,mountvers=3,mountport=51329,mountproto=tcp,local_lock=all,addr=192.168.6.37)
root@h7:~# ls -la /media
drwxrwxrwt    5 root     root           100 Nov 17 01:40 .
drwxr-xr-x   15 root     root          4096 Jan  1  1970 ..
drwxr-xr-x   16 root     root          4096 Nov 18 00:08 hdd
drwxr-xr-x    4 root     root            80 Nov 17 01:40 net
drwxr-xr-x    5 root     root          4096 Nov  9  2019 usb
root@h7:~# [ -d /media/usb ] && mountpoint /media/usb
/media/usb is a mountpoint
root@h7:~#


Edited by kallquk, 18 November 2022 - 20:11.


Re: attached usb drives partitions mounted at same point #16 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 18 November 2022 - 21:16

Found the cause.

 

The mount script is not thread-safe, if you look at the udev log in details, you can see it is called 4 times in parallel, for sda1, sdb1, sdb2 and sdc1, so at one point it runs for all 4 in parallel. This in turn makes the checks fail, because at the time the data for the second USB partition is checked, the first isn't mounted yet.

 

I think for the short term, it is probably best if you label your partitions using e2label (label must be lowercase and without spaces), this will take some time and brainpower to fix...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #17 littlesat

  • PLi® Core member
  • 57,187 posts

+699
Excellent

Posted 19 November 2022 - 06:33

A check a mount is labeled and when not create a default label based on the ‘mointpoint’ not_labeled_sdc1 etc….?

Edited by littlesat, 19 November 2022 - 06:34.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: attached usb drives partitions mounted at same point #18 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 19 November 2022 - 13:32

No, because the problem is nothing exists yet that can be checked. By the time the second device is processed, the first isn't created yet.

 

One possible option is to set an "in-progress" flag at the beginning, and do a "while in-progress sleep" so the second mount waits until the first is finished. I'll see if I can make a test script...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: attached usb drives partitions mounted at same point #19 Dimitrij

  • PLi® Core member
  • 10,331 posts

+350
Excellent

Posted 19 November 2022 - 14:40

No, because the problem is nothing exists yet that can be checked. By the time the second device is processed, the first isn't created yet.

 

One possible option is to set an "in-progress" flag at the beginning, and do a "while in-progress sleep" so the second mount waits until the first is finished. I'll see if I can make a test script...

oe-alliance-core


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


Re: attached usb drives partitions mounted at same point #20 WanWizard

  • PLi® Core member
  • 70,552 posts

+1,813
Excellent

Posted 19 November 2022 - 17:19

Has the same problem, it will also use the "usb" label if no mount for /media/usb exists.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users