Author Topic: Attached external storage disappears from LinuxMCE time to time  (Read 8333 times)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Attached external storage disappears from LinuxMCE time to time
« on: February 03, 2010, 10:50:16 pm »
Hi,

That problem is known since 0710 and it still exists in 0810. Time to time the attached external storage - USB HDD or NAS disappears from LinuxMCE. That means it isn't visible from the Orbiter (video or audio menu). Moreover, when I try to do just ls /home/public/data/video on the core the command runs till I type Ctrl+C without any output. That's the reason why I mount my NAS and USB HDD using fstab under 0710. Because it's too annoying wait when the media files appear again.

 Any help will be very appreciated. I have 1TB FreeAgent USB HDD and 2TB D-Link DNS-321 NAS connected to the 0810 core using LinuxMCE mount mechanism.

TIA
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #1 on: February 03, 2010, 11:40:52 pm »
I used to have that problem and it occured often. I have since then switched to freenas as my only external storage I set it up using lmce directory structure and it has worked without 1 drop for close to a year now.

I think it has only been rebooted a half a dozen times in that year. (Planned reboots)

Where previously I was rebooting my iomega nas or core to bring the connection back, 1-2 times a week.



Tim
« Last Edit: February 03, 2010, 11:42:49 pm by tkmedia »
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #2 on: February 04, 2010, 10:20:14 pm »
I found an old post related to that problem. I spent some time and found how to implement totallymaxed's hack. The actual command is that:
Code: [Select]
screen -d -m -S "Keep my drive mounted" `cd /home/public/data/videos/<symlink to the mounted drive>`Run separate command for each drive. Sure, you should change the caption and symlink. The command(s) can be added to the /etc/rc.local, for example, to run during the boot time.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #3 on: February 05, 2010, 04:20:53 am »
Be _VERY_ careful with this hack!

You are keeping a file handle open on the NAS, and you can cause potential filesystem corruption if you remove the brick without disabling the hack. THERE IS A REASON WE DO NOT APPLY THIS! USE WITH EXTREME CAUTION.

-Thom

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #4 on: February 05, 2010, 09:01:55 am »
Be _VERY_ careful with this hack!

You are keeping a file handle open on the NAS, and you can cause potential filesystem corruption if you remove the brick without disabling the hack. THERE IS A REASON WE DO NOT APPLY THIS! USE WITH EXTREME CAUTION.

-Thom

Thanks for your replay, Tom. It's good point. But I have NAS and USB HDD attached to the LinuxMCE core continuously. So, hope that hack won't break anything. BTW, maybe it'd be good do manual unmount via Drive Management? Because, the problem with disappearing media files from the Orbiter is too annoying. Moreover, if the drive was unmount it isn't accessible (at least in my case) till the core is reboot. Auto unmounting is important for portable storage such USB sticks. But for NAS or USB storage attached permanently it isn't needed at all IMHO. 
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #5 on: February 05, 2010, 01:03:16 pm »
dude, I seriously need to smack you. hard. do not use USB media on this system on a permanent basis! It is a severe performance drain, especially due to the fact that UpdateMedia constantly hammers the disks. Your load average will suck. stop that.

-Thom

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #6 on: February 05, 2010, 02:55:22 pm »
Well, that's really bad! IMHO we should split storage by permanent and not. Maybe by adding new property in its template. Then in case of permanent storage LinuxMCE will just mount it one and unmount during shutdown of by pressing button Eject in the Manage Drives. In that case the all media will be available permanently.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #7 on: February 05, 2010, 03:01:10 pm »
dude, I seriously need to smack you. hard. do not use USB media on this system on a permanent basis! It is a severe performance drain, especially due to the fact that UpdateMedia constantly hammers the disks. Your load average will suck. stop that.

-Thom

He,he.

nite_man, just fyi: Thom did have USB hdd attached to his systems, and found out the hard way about this problem   ;)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #8 on: February 09, 2010, 12:49:05 pm »
Quote
nite_man, just fyi: Thom did have USB hdd attached to his systems, and found out the hard way about this problem

I also have both: USB HDD and problem ;) The bad thing is that the same situation with NAS and additional internal HDD. Any storage (except primary HDD) mounted by LinuxMCE produces the problem with auto unmounting. I have no idea how to solve that in proper way but IMHO it should be disabled till that proper way won't be found. The auto unmounting feature is questionable advantage IMHO comparing with unaccessible media on the external storage.
 
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #9 on: February 11, 2010, 12:53:44 pm »
Just as a heads up: I have none of my media on the primary hard disk. And all of my media is visible all of the time. Could the people that experience these problems, check if they maybe have machines that are a bit on slow side? I don't have a screamer either (just a BE2400 with a Raptor system drive, and a couple of 1TB drives for VDR recordings, plus an older samba server on the external net).

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #10 on: February 12, 2010, 05:26:42 pm »
My suspicion is it's related to the USB drive itself, not a bug in LMCE/Linux.  I used to see this on occasion with a WD mybook essentials (or something like that).  When that drive started to die I replaced it with a 1TB Fantom Drive, and have since added a second 1TB Fantom Drive.  After swapping out the original WD I have not had any issues.  Well, at first I left the FD drive as NTFS (or was it Fat32?) like it came, but that caused all kinds of problems.  After I reformatted it to ext3 I have not had a single issue I can remember with a drive not mounting when needed.

Techstyle

  • Addicted
  • *
  • Posts: 674
    • View Profile
    • Techstyle UK Ltd.
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #11 on: February 12, 2010, 08:01:57 pm »
I had a similar problem which is the post that Nite_man pointed to in this post earlier. My problem was with 0710 but haven't had it in 0810.  My drives are in my core but not my primary drive.  They were both SATA, non-are USB.  They would only disappear when an MD was switched on.

I used (carefully, before I get a smack) the 'Screen' work around to get them mounted.  I did it manually everytime I rebooted (about three times a year).

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #12 on: March 24, 2010, 04:48:59 pm »
dude, I seriously need to smack you. hard. do not use USB media on this system on a permanent basis! It is a severe performance drain, especially due to the fact that UpdateMedia constantly hammers the disks. Your load average will suck. stop that.

-Thom

Can you explain this a bit more? I want to update this page with a warning. I had no idea of this problem either and have been running with USB HDs for a long time.

http://wiki.linuxmce.org/index.php/Usage_Intro#Drive_and_network_drive_management

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #13 on: March 24, 2010, 05:37:52 pm »
Be _VERY_ careful with this hack!

You are keeping a file handle open on the NAS, and you can cause potential filesystem corruption if you remove the brick without disabling the hack. THERE IS A REASON WE DO NOT APPLY THIS! USE WITH EXTREME CAUTION.

-Thom

Thanks for your replay, Tom. It's good point. But I have NAS and USB HDD attached to the LinuxMCE core continuously. So, hope that hack won't break anything. BTW, maybe it'd be good do manual unmount via Drive Management? Because, the problem with disappearing media files from the Orbiter is too annoying. Moreover, if the drive was unmount it isn't accessible (at least in my case) till the core is reboot. Auto unmounting is important for portable storage such USB sticks. But for NAS or USB storage attached permanently it isn't needed at all IMHO. 

Its certainly safe to use a screen session to stop the continual maniacal mount/unmounting of NAS Storage by the storage management scripts...doing this with a USB drive might not be such a good idea though I agree...

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Attached external storage disappears from LinuxMCE time to time
« Reply #14 on: March 24, 2010, 06:37:31 pm »
I have now have several 1TB USB disks attached to my core and to one of my MDs (the one with TV cards in). To replace this with a NAS is going to costs fair bit, so I'd like to understand what the real issue is. I also feel that I should put something in the Wiki about this, so that nobody else goes down the same route as me if there really is a big issue.

Regards,

Chris