Jump to content


Photo

About USB drive mounted RW ....


  • Please log in to reply
13 replies to this topic

#1 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 11 November 2011 - 10:25

Hi folks.

I use OpenPli 2011-11-09 in my CT9100

I realize that every USB mass storage device (HDD or FlashDisk) inserted after E2 is up and running are mounted RW (ReadWrite).

So if I insert my USB HDD 500GB full of MKV videos, when I want to detach it I need to 'umount' it
How ? I've not find any simply E2 way to do it.
I need to connect to console and do a manual 'umount /dev/sd??' This is very annoying.

So yesterday I've made a simple E2 extension (I've called SimpleUmount) to provide a simple way to umount one device simple pressing remote control blue button and select SimpleUmount from extensions list.

There is a better way ?
I.e. force USB mass storage device inserted AFTER E2 is up and running to be mounted as RO (ReadOnly) ?
But mounted RO ONLY device inserted AFTER E2 is up.
I.e. I've an internal ext4 SATA HDD and and external 2GB ext2 usb flash drive always connected (I use this device to store some data as logs and CrossEPG data avoiding writing in main 128MB motherboard flash and avoding HDD wake-up): these devices are always connected and should be mounted always RW

I suspect that not skilled users know nothing about mount/umount procedures. They simply insert and remove device don't care about umount .... and probably they can have damage in device filesystem.


If you find useful SImpleUmount or want to test it, I can attach here.
And If you wish I can join E2OpenPlugin github community and add my simple plugin ....
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #2 MiLo

  • PLi® Core member
  • 14,049 posts

+298
Excellent

Posted 11 November 2011 - 10:35

And If you wish I can join E2OpenPlugin github community and add my simple plugin ....


Excellent idea, make it so!
Real musicians never die - they just decompose

Re: About USB drive mounted RW .... #3 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 08:46

If someone wish to test it ...

- Download the file attached here
- Put it in STB / directory
- cd /
- tar xvzf SimpleUmount.tgz
- restart Enigma2

Press on remote control the BLUE key and select SimpleUmount
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #4 Dimitrij

  • PLi® Core member
  • 10,050 posts

+339
Excellent

Posted 12 November 2011 - 11:22

USB flash drive to unmount properly, leaving only the hard drive.
When you call the plug-in crash.
[SimpleUmount] ++ START PLUGIN ++
Screen <class 'Plugins.Extensions.SimpleUmount.plugin.SimpleUmount'>((), {}): <type 'exceptions.AttributeError'>
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 232, in create
    return screen(self, *arguments, **kwargs)
  File "/usr/lib/enigma2/python/Plugins/Extensions/SimpleUmount/plugin.py", line 44, in __init__
    self.wdg_list_dev.append = ( "ERROR: can't read mount point" )
AttributeError: 'list' object attribute 'append' is read-only
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 194, in processDelay
    callback(*retval)
  File "/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 1463, in extensionCallback
    answer[1][1]()
  File "/usr/lib/enigma2/python/Tools/BoundFunction.py", line 9, in __call__
  File "/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 717, in runPlugin
    plugin(session = self.session, servicelist = self.servicelist)
  File "/usr/lib/enigma2/python/Plugins/Extensions/SimpleUmount/plugin.py", line 86, in main
    session.open(SimpleUmount)
  File "/usr/lib/enigma2/python/mytest.py", line 306, in open
    dlg.isTmp = True
AttributeError: 'NoneType' object has no attribute 'isTmp'

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


Re: About USB drive mounted RW .... #5 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 12:16

Thanks for feedback.

Mmmhh ... I've tried to recreate the problem without success.
Dima73, a question for you:
- which image are you using ?
- which STB ?
- have installed an HDD or something else ?
- can you post the output of a 'mount' command, please ?

Edited by ambrosa, 12 November 2011 - 12:17.

STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #6 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 12:18

USB flash drive to unmount properly, leaving only the hard drive.
When you call the plug-in crash.


I've not understood.
If you are able to umount the USB drive, the plugin is working. WHEN it crash ?
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #7 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 12:21

Ok, found the bug :-)
Wait for correction.
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #8 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 12:30

Ok, very_stupid_bug solved.

Try this

Edited by ambrosa, 12 November 2011 - 12:30.

STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #9 Dimitrij

  • PLi® Core member
  • 10,050 posts

+339
Excellent

Posted 12 November 2011 - 12:47

The questions may not have to answer :) ?
I just seen them.

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


Re: About USB drive mounted RW .... #10 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 12:52

The questions may not have to answer :) ?
I just seen them.


Yes and I'm happy about your feedback. Thanks
But remember that if anyone try to solve a bug, more details are appreciated ;)
Often bugs are not in main code but in a strange user customization, so it's important that a developer know exactly how and when the problem occours.
This time the very_stupid_idiot_bug it's my own and I've solved it :D
Try new release and let me know.
Thanks again.
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #11 Dimitrij

  • PLi® Core member
  • 10,050 posts

+339
Excellent

Posted 12 November 2011 - 12:54

Version 0.2 ALL OK

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


Re: About USB drive mounted RW .... #12 Dimitrij

  • PLi® Core member
  • 10,050 posts

+339
Excellent

Posted 12 November 2011 - 13:41

ambrosa
1) Thank you.
2) If you do not mind, added Russian language.

Edited by Dima73, 12 November 2011 - 13:41.

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


Re: About USB drive mounted RW .... #13 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 13:57

Wait please.
I'm working in an improved version with some confirm messages, warning message if device cannot be umounted (because "busy") and auto reload device list.
When finally all will be fine, I will add multilanguage support in po/gettext fashion

Edited by ambrosa, 12 November 2011 - 13:57.

STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)

Re: About USB drive mounted RW .... #14 ambrosa

  • Senior Member
  • 161 posts

+35
Good

Posted 12 November 2011 - 15:41

I will continue here http://openpli.org/f...tension-plugin/
STB: Clarke Tech ET9100
Mass storage: internal SATA-II HDD 1TB WD10EACS GreenPower 5400rpm
Mass storage: external USB pen drive 2GB
Firmware: OpenPLi kernel 3.x.x
Tuner A: AVL2108 (DVB-S2) HotBird 13E
Tuner B: AVL2108 (DVB-S2) HotBird 13E
Tuner C: AverMedia A867 (DVB-T HD) (AF9035 + MXL5007T)
TV: plasma PANASONIC GT30 fullHD
Audio: PCM through HDMI (no Dolby decoder)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users