brainsys
Posts: 69
Joined: Fri Jun 29, 2012 7:16 pm

The curious case of a deranged disk

Thu Aug 30, 2012 10:06 pm

Debian Wheezy

I use this RPi as a network disk & printer server. No probs in two months operation till tonight. I could not access the disk (a 500Gb portable drive). I did a df -h and it was there. I did a fdisk -l and it was there. Then I spotted a difference. df was reporting it as sda which is what is should be. fdisk was reporting as sdb hence the issue.

But it was working earlier in the day so it must have been sda at that time. A reboot perhaps? Nope 'w' showed the system up for six days.

So how did my portable disk magically move from being sda to sdb during the day with no user intervention? How come df & fdisk report differently?

Help, do I have a haunted pie!

itimpi
Posts: 1083
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: The curious case of a deranged disk

Fri Aug 31, 2012 11:13 am

Just a thought - but if it dropped offline for a second or so, and then came back online I could see this happening as the Pi might then treat it as a new device. As to WHY that should happen I have no idea.

brainsys
Posts: 69
Joined: Fri Jun 29, 2012 7:16 pm

Re: The curious case of a deranged disk

Fri Sep 07, 2012 9:27 am

You may be right. Its just happened again overnight. What was sda has become sdb. I remounted it as sdb1 and I can read it.

df -h shows both the non-existent sda disk so a presumably lost connection is 'remembered'. I wonder if this issue arises from the USB problem? last night I was doing a lot of streaming from the disk into the USB which immediately went out on the ethernet line. All a bit busy, confusion and lost connect. Reconnect as sdb?

ghans
Posts: 7857
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: The curious case of a deranged disk

Fri Sep 07, 2012 9:41 am

Can't you do something with a UUID ? I'm no Linux expert , but i think this could be a solution.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

brainsys
Posts: 69
Joined: Fri Jun 29, 2012 7:16 pm

Re: The curious case of a deranged disk

Fri Sep 07, 2012 2:50 pm

Thanks Ghans. In theory that should work. /etc/fstab updated. Fingers crossed.
And thanks for the hint in your sig - now back on prosilver. The native theme was driving me mad!

Muizer
Posts: 1
Joined: Sun Oct 27, 2013 9:23 am

Re: The curious case of a deranged disk

Sun Oct 27, 2013 9:27 am

I've got the same case here: sda has now even become sdc - in two steps. Ghans could you explain me your solution? Thanks!

ghans
Posts: 7857
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: The curious case of a deranged disk

Mon Oct 28, 2013 8:19 am

Entries in the file /etc/fstab are automatically mounted or at least
referred to while execing the "mount" command.
You need to be root to edit this file (sudo).

http://www.cyberciti.biz/faq/linux-find ... ate-fstab/


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Debian”