Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Raspberry Pi - my disks disappear!  (Read 7958 times)

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Raspberry Pi - my disks disappear!
« on: May 01, 2014, 06:43:04 PM »

I've got a Raspberry PI, running Raspbian, with latest updates & firmware.  I use it as a NAS device, serving out two disks via two USB to SATA adaptors.  It runs SAMBA so that Windows computers can easily see the shares.

This has worked well for some time, but recently the disks keep disappearing - the shares remain, but attempts to access the disks gives errors.  Even via the console, I cannot access the disks.

They still appear to be mounted, as I can issue a umount without error, but attempting to remount them gives me an error.  (Stupidly I didn't note what this error was)

A reboot will cure this 95% of the time, though a few times I've had to power cycle to get everything back.  It then runs for a while (few hours - 1 day sometimes 2) before doing it again.

Main question, then : is there a system log file somewhere that might record something to help me work out what's going on?

Thanks

Ian
Logged

loonylion

  • Reg Member
  • ***
  • Posts: 723
Re: Raspberry Pi - my disks disappear!
« Reply #1 on: May 01, 2014, 08:13:46 PM »

either dmesg or /var/log/messages I would imagine.
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Raspberry Pi - my disks disappear!
« Reply #2 on: May 01, 2014, 11:30:08 PM »

I would recommend that you check any of the files in the /var/log/ directory. At a guess, there will be a samba logfile present therein.

Have you recently checked the root filesystem for sufficient free space? df -h / might be worth a look . . .
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Raspberry Pi - my disks disappear!
« Reply #3 on: May 02, 2014, 12:05:18 AM »

Thanks for the replies Loonylion and B*cat.

I don't think the problem is with samba, since once the fault ocurrs, I can't access the disks from the console either. 

Looking in messages.1 from last night, there is lots of regular stuff, then a gap of 1 hour and 2 minutes, and then this:

Code: [Select]
Apr 26 22:34:01 oldpi kernel: [ 3591.583568] sd 1:0:0:0: [sdb] Unhandled error code
Apr 26 22:34:01 oldpi kernel: [ 3591.583609] sd 1:0:0:0: [sdb]
Apr 26 22:34:01 oldpi kernel: [ 3591.583623] Result: hostbyte=0x07 driverbyte=0x00
Apr 26 22:34:01 oldpi kernel: [ 3591.583637] sd 1:0:0:0: [sdb] CDB:
Apr 26 22:34:01 oldpi kernel: [ 3591.583648] cdb[0]=0x28: 28 00 08 cd 11 98 00 00 10 00
Apr 26 22:34:01 oldpi kernel: [ 3591.607447] usb 1-1.3: USB disconnect, device number 4
Apr 26 22:34:01 oldpi kernel: [ 3591.607482] usb 1-1.3.1: USB disconnect, device number 5
Apr 26 22:34:01 oldpi kernel: [ 3591.623107] usb 1-1.3.2: USB disconnect, device number 6
Apr 26 22:34:01 oldpi kernel: [ 3591.629674] sd 1:0:0:0: [sdb] Unhandled error code
Apr 26 22:34:01 oldpi kernel: [ 3591.629711] sd 1:0:0:0: [sdb]
Apr 26 22:34:01 oldpi kernel: [ 3591.629724] Result: hostbyte=0x01 driverbyte=0x00
Apr 26 22:34:01 oldpi kernel: [ 3591.629740] sd 1:0:0:0: [sdb] CDB:
Apr 26 22:34:01 oldpi kernel: [ 3591.629751] cdb[0]=0x28: 28 00 08 cd 11 a8 00 00 f0 00
Apr 26 22:34:01 oldpi kernel: [ 3591.629999] sd 1:0:0:0: [sdb] Unhandled error code
Apr 26 22:34:01 oldpi kernel: [ 3591.630022] sd 1:0:0:0: [sdb]
Apr 26 22:34:01 oldpi kernel: [ 3591.630033] Result: hostbyte=0x01 driverbyte=0x00
Apr 26 22:34:01 oldpi kernel: [ 3591.630047] sd 1:0:0:0: [sdb] CDB:
Apr 26 22:34:01 oldpi kernel: [ 3591.630055] cdb[0]=0x28: 28 00 08 cd 12 98 00 00 10 00
Apr 26 22:34:01 oldpi kernel: [ 3591.650383] XFS (sdb1): xfs_do_force_shutdown(0x2) called from line 1115 of file fs/xfs/xfs_log.c.  Return address = 0xbf12cafc
Apr 26 22:34:01 oldpi kernel: [ 3591.671643] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:34:01 oldpi kernel: [ 3591.697082] usb 1-1.3.3: USB disconnect, device number 7
Apr 26 22:34:01 oldpi kernel: [ 3591.710636] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Apr 26 22:34:01 oldpi kernel: [ 3591.710902] cp210x 1-1.3.3:1.0: device disconnected
Apr 26 22:34:01 oldpi kernel: [ 3591.974082] usb 1-1.3: new high-speed USB device number 8 using dwc_otg
Apr 26 22:34:01 oldpi kernel: [ 3592.076710] usb 1-1.3: New USB device found, idVendor=05e3, idProduct=0608
Apr 26 22:34:01 oldpi kernel: [ 3592.076747] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Apr 26 22:34:01 oldpi kernel: [ 3592.076764] usb 1-1.3: Product: USB2.0 Hub
Apr 26 22:34:01 oldpi kernel: [ 3592.085216] hub 1-1.3:1.0: USB hub found
Apr 26 22:34:01 oldpi kernel: [ 3592.086016] hub 1-1.3:1.0: 4 ports detected
Apr 26 22:34:02 oldpi kernel: [ 3592.364062] usb 1-1.3.1: new high-speed USB device number 9 using dwc_otg
Apr 26 22:34:02 oldpi kernel: [ 3592.466312] usb 1-1.3.1: New USB device found, idVendor=152d, idProduct=2338
Apr 26 22:34:02 oldpi kernel: [ 3592.466346] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Apr 26 22:34:02 oldpi kernel: [ 3592.466366] usb 1-1.3.1: Product: USB to ATA/ATAPI bridge
Apr 26 22:34:02 oldpi kernel: [ 3592.466381] usb 1-1.3.1: Manufacturer: JMicron
Apr 26 22:34:02 oldpi kernel: [ 3592.466395] usb 1-1.3.1: SerialNumber: 609910780000
Apr 26 22:34:02 oldpi kernel: [ 3592.476994] usb-storage 1-1.3.1:1.0: USB Mass Storage device detected
Apr 26 22:34:02 oldpi kernel: [ 3592.479152] scsi2 : usb-storage 1-1.3.1:1.0
Apr 26 22:34:02 oldpi kernel: [ 3592.574920] usb 1-1.3.2: new high-speed USB device number 10 using dwc_otg
Apr 26 22:34:02 oldpi kernel: [ 3592.676703] usb 1-1.3.2: New USB device found, idVendor=152d, idProduct=2338
Apr 26 22:34:02 oldpi kernel: [ 3592.676739] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Apr 26 22:34:02 oldpi kernel: [ 3592.676759] usb 1-1.3.2: Product: USB to ATA/ATAPI bridge
Apr 26 22:34:02 oldpi kernel: [ 3592.676774] usb 1-1.3.2: Manufacturer: JMicron
Apr 26 22:34:02 oldpi kernel: [ 3592.676788] usb 1-1.3.2: SerialNumber: 000000000000
Apr 26 22:34:02 oldpi kernel: [ 3592.687352] usb-storage 1-1.3.2:1.0: USB Mass Storage device detected
Apr 26 22:34:02 oldpi kernel: [ 3592.692649] scsi3 : usb-storage 1-1.3.2:1.0
Apr 26 22:34:02 oldpi kernel: [ 3592.774723] usb 1-1.3.3: new full-speed USB device number 11 using dwc_otg
Apr 26 22:34:02 oldpi kernel: [ 3592.881216] usb 1-1.3.3: New USB device found, idVendor=10c4, idProduct=ea60
Apr 26 22:34:02 oldpi kernel: [ 3592.881250] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 26 22:34:02 oldpi kernel: [ 3592.881563] usb 1-1.3.3: Product: CP2102 USB to UART Bridge Controller
Apr 26 22:34:02 oldpi kernel: [ 3592.881590] usb 1-1.3.3: Manufacturer: Silicon Labs
Apr 26 22:34:02 oldpi kernel: [ 3592.881606] usb 1-1.3.3: SerialNumber: 0001
Apr 26 22:34:02 oldpi kernel: [ 3592.898434] cp210x 1-1.3.3:1.0: cp210x converter detected
Apr 26 22:34:02 oldpi kernel: [ 3592.974078] usb 1-1.3.3: reset full-speed USB device number 11 using dwc_otg
Apr 26 22:34:02 oldpi kernel: [ 3593.082508] usb 1-1.3.3: cp210x converter now attached to ttyUSB0
Apr 26 22:34:03 oldpi kernel: [ 3593.475658] scsi 2:0:0:0: Direct-Access     ST325031 0AS                   PQ: 0 ANSI: 5
Apr 26 22:34:03 oldpi kernel: [ 3593.482178] sd 2:0:0:0: [sdc] 488397168 512-byte logical blocks: (250 GB/232 GiB)
Apr 26 22:34:03 oldpi kernel: [ 3593.485210] sd 2:0:0:0: [sdc] Write Protect is off
Apr 26 22:34:03 oldpi kernel: [ 3593.490460] sd 2:0:0:0: Attached scsi generic sg0 type 0
Apr 26 22:34:06 oldpi kernel: [ 3596.614890]  sdc: sdc1
Apr 26 22:34:06 oldpi kernel: [ 3596.634679] sd 2:0:0:0: [sdc] Attached SCSI disk
Apr 26 22:34:07 oldpi kernel: [ 3597.829501] usb 1-1.3.2: USB disconnect, device number 10
Apr 26 22:34:19 oldpi kernel: [ 3609.934619] usb 1-1.3.2: new high-speed USB device number 12 using dwc_otg
Apr 26 22:34:19 oldpi kernel: [ 3610.036916] usb 1-1.3.2: New USB device found, idVendor=152d, idProduct=2338
Apr 26 22:34:19 oldpi kernel: [ 3610.036947] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Apr 26 22:34:19 oldpi kernel: [ 3610.036965] usb 1-1.3.2: Product: USB to ATA/ATAPI bridge
Apr 26 22:34:19 oldpi kernel: [ 3610.036980] usb 1-1.3.2: Manufacturer: JMicron
Apr 26 22:34:19 oldpi kernel: [ 3610.036997] usb 1-1.3.2: SerialNumber: 000000000000
Apr 26 22:34:19 oldpi kernel: [ 3610.048420] usb-storage 1-1.3.2:1.0: USB Mass Storage device detected
Apr 26 22:34:19 oldpi kernel: [ 3610.049975] scsi4 : usb-storage 1-1.3.2:1.0
Apr 26 22:34:21 oldpi kernel: [ 3611.116052] scsi 4:0:0:0: Direct-Access     ST325062 0AS                   PQ: 0 ANSI: 5
Apr 26 22:34:21 oldpi kernel: [ 3611.119484] sd 4:0:0:0: [sdd] 488397168 512-byte logical blocks: (250 GB/232 GiB)
Apr 26 22:34:21 oldpi kernel: [ 3611.121188] sd 4:0:0:0: [sdd] Write Protect is off
Apr 26 22:34:21 oldpi kernel: [ 3611.131586] sd 4:0:0:0: Attached scsi generic sg1 type 0
Apr 26 22:34:21 oldpi kernel: [ 3611.148071]  sdd: sdd1
Apr 26 22:34:21 oldpi kernel: [ 3611.157595] sd 4:0:0:0: [sdd] Attached SCSI disk
Apr 26 22:34:24 oldpi kernel: [ 3615.004278] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:34:54 oldpi kernel: [ 3645.085387] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:35:25 oldpi kernel: [ 3675.166474] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:35:55 oldpi kernel: [ 3705.247627] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:36:25 oldpi kernel: [ 3735.328708] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:36:55 oldpi kernel: [ 3765.409820] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:37:25 oldpi kernel: [ 3795.490916] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:37:55 oldpi kernel: [ 3825.572031] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:38:25 oldpi kernel: [ 3855.653132] XFS (sdb1): xfs_log_force: error 5 returned.
Apr 26 22:38:55 oldpi kernel: [ 3885.734158] XFS (sdb1): xfs_log_force: error 5 returned.

with the "error 5 returned" stuff repeating until I shut it down.

"Unhandled error code" doesn't sound very good to me  :(

Ian
[edited to correct appalling typing]
« Last Edit: May 02, 2014, 11:22:55 PM by sheddyian »
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Raspberry Pi - my disks disappear!
« Reply #4 on: May 02, 2014, 12:36:28 AM »

Oops.  :(

Is it software or hardware in origin? That is the first question.  :-\

I would be tempted to perform a check for any software updates and if any are found, install what is offered.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Raspberry Pi - my disks disappear!
« Reply #5 on: May 02, 2014, 11:19:41 PM »

Oops.  :(

Is it software or hardware in origin? That is the first question.  :-\

I would be tempted to perform a check for any software updates and if any are found, install what is offered.

I regularly check & install updates

Code: [Select]
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

to the point where I wondered if the fault was caused by one of these updates!

Curiously, since the last reboot and posting here, the Pi disks have remained available for 1 day and 4 hours.  I'd expect it to have typically failed by now.

So it must be:

The last update has fixed something
The random fault hasn't recurred yet
Posting to the Kitz forum cures the problem

 ;D

Ian
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Raspberry Pi - my disks disappear!
« Reply #6 on: May 03, 2014, 12:53:09 AM »

Quote
The last update has fixed something
The random fault hasn't recurred yet

 :hmm:  I don't like mysteries.  :-\

Quote
Posting to the Kitz forum cures the problem

 :D
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: Raspberry Pi - my disks disappear!
« Reply #7 on: May 03, 2014, 07:30:57 AM »

I wonder if it's anything to do with SSL and associated updates in the aftermath of the Heartbleed bug. It could be that an error crept into one of the security updates and it's quickly been fixed.
Logged
  Eric

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Raspberry Pi - my disks disappear!
« Reply #8 on: May 12, 2014, 08:20:14 PM »

:hmm:  I don't like mysteries.  :-\

Quote

Well, I was a bit eager with my "it's fixed itself" mystery, as a fwe hours after that post, it failed again.

I've since bought a different USB hub to which the disks are connected via USB to SATA adaptors, and so far it's been working well without problem - 3 days without fail, which is unusual but has happened before.

If it *was* hardware, how odd that it would often work for 2 days before failing, despite getting varied use.

I wonder if it's anything to do with SSL and associated updates in the aftermath of the Heartbleed bug. It could be that an error crept into one of the security updates and it's quickly been fixed.

I don't think SSL fixes caused it to fail, but I suspect the many updates I've had on the Pi recently have included Heartbleed related stuff.  Hoping it was the hardware, which I've replaced - let's see  :fingers:

Ian
Logged

sevenlayermuddle

  • Helpful
  • Addicted Kitizen
  • *
  • Posts: 5369
Re: Raspberry Pi - my disks disappear!
« Reply #9 on: May 12, 2014, 09:12:25 PM »

Not clear on your USB/SATA adapters... do the disks have separate power supply, or are the powered from USB?

Basically I am wondering if perhaps the Pi's USB power is being overloaded.   If it were borderline then it may all work for a while, until you hit some 'perfect storm' where both disks happen do be conspiring in unison, that may expain the apparent randomness?
Logged

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Raspberry Pi - my disks disappear!
« Reply #10 on: May 12, 2014, 09:34:15 PM »

Not clear on your USB/SATA adapters... do the disks have separate power supply, or are the powered from USB?

Basically I am wondering if perhaps the Pi's USB power is being overloaded.   If it were borderline then it may all work for a while, until you hit some 'perfect storm' where both disks happen do be conspiring in unison, that may explain the apparent randomness?

The disks get their power from a separate switch mode PSU, which also provides power for the USB hub - so there shouldn't be any problem with overloading the USB power.  (I'd also tried reverting back to a separate PSU for the USB hub in case it was too much for the little switch mode PSU I'm using, but this didn't fix the fault).

Ian
Logged

guest

  • Guest
Re: Raspberry Pi - my disks disappear!
« Reply #11 on: May 29, 2014, 05:43:18 PM »

This sounds like the USB hub on the Pi is getting a higher voltage presented to it from the external hub which is seperately powered (?) than its getting from the onboard supply.

Maybe worth trying putting a dumb hub in between & see if that's it.

I have a vague recollection of something about USB on Pi's but I'm buggered if I can remember details.
Logged

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Raspberry Pi - my disks disappear!
« Reply #12 on: May 29, 2014, 07:04:18 PM »

Oops!  I thought I'd posted an update to this saga a while back, evidently I didn't.

Basically - I fixed it by replacing the USB hub with a generic USB 3 hub I got from Ebay for a few pounds.

Since then, it's worked without problem for weeks on end.

The only downside is that the new hub didn't come with a PSU (I knew this, didn't think it would be a problem) and it turns out the power connector on the new hub is a different size to the old one, so I can't re-use the power lead I'd made up.

That said, all that I've got plugged into it are two USB to SATA adaptors, which seem to be happy running on an unpowered hub.  The disks get their power from a separate switch mode PSU.

All seems well :)

Ian
Logged
 

anything