LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-24-2008, 05:56 AM   #1
TTL_2
LQ Newbie
 
Registered: Jul 2004
Location: Germany
Posts: 26

Rep: Reputation: 15
Is there ANY way for a proper shut down if USB has crashed with a mounted USB drive?


Hello,
on my motherboard (ga-ma69g-s3h) USB disappears from time to time. (The BIOS is up-to-date and no one else reports problems like this, so I think its a hardware failure). But thats not the big problem, I do a restart (luckily my keyboard is still PS/2) and everything is working fine again.
The problem starts if this happens while an USB drive is mounted. Then (obvious) no unwritten data can be wrote back. This results in:
a) I can not unmount the drive
b) Running sync does hang completely. (Need to switch to an other tty and log in there a second time)
c) Running shutdown 0 as root does not shut down. CTRL+ALT+DEL does not do so either.
d) Processes which were using the drive cant be killed, not even with -9 as root.
e) No warnings or errors were reported in dmesg.
f) I can not unmount / or /home as they are reported to be busy (by the hanging applications above...)
g) I tried the various mount options like remount read-only on the normal partitions, but this did not help either.

In the end the ONLY thing I can do is pressing the reset button on my PC. Resulting in potential loss of data on my normal drives as they were not unmounted. It is very annoying to loose data /home just because the Linux is in a "I have to write the files on the non existing USB drive even if it takes to the end of all time" mode.

Is there any way I can tell the System "Its ok to loose the data on the USB drive, but please sync all internal hard disks and shut down"?

My system is Debian running with a 2.6.24 kernel.

Last edited by TTL_2; 09-24-2008 at 05:59 AM.
 
Old 09-24-2008, 07:39 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

some suggestions

1) post the contents of the section of your /etc/inittab pls
eg
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

2) I am assuming you have normal ide or sata drives for /?

3) I would have thought it was normal not to be able to unmount / in a working system?

4) Can you post your /etc/fstab if usb is mentioned and if not mentioned what folder is it mount to pls?

5) Is usb drive a usb stick or an external usb hard drive? Who has write powers? just one user or all users?

6) At a wild guess, it may be a power supply that is failing. There is a web page I can't remember where at this stage where you can calculate with all hardware on...what your min power is...if you are close it may be that?

7) Other than warm reboot it, can you issue a root command reboot?

cheerio
 
Old 09-24-2008, 08:04 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,503
Blog Entries: 2

Rep: Reputation: 68
Quote:
Originally Posted by TTL_2 View Post
Is there any way I can tell the System "Its ok to loose the data on the USB drive, but please sync all internal hard disks and shut down"?
Yes. It is called "Magic System Request".

It is triggered by Alt + PrintScreen/SysReq + 'another key' keys combination.
To use it, you need an enabled kernel (CONFIG_MAGIC_SYSRQ directive).
If you have a file called '/proc/sys/kernel/sysrq' then your kernel have it.
To enable the magic functions, you need a "1" in that file (echo "1" > /proc/sys/kernel/sysrq).

The 'another key' I mentioned above is one single letter, each one has a specific function. For instance, the 'm' key will dump the memory to console; 't' will dump the task list to console; 'b' will reboot your system without any sync or umounting; 'h' will print all options.

To sync all filesystems use 's' (Alt+SysReq+s).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How is an USB drive mounted, and how can I change the permissions jjge Ubuntu 6 04-26-2007 05:59 PM
Run script when USB drive is mounted highgeere Linux - Desktop 2 11-13-2006 08:44 AM
Can not access mounted USB drive Honkeychops Mandriva 5 03-06-2006 12:59 PM
how come usb flash drive doesn't get auto mounted? darkhatter Fedora 5 02-26-2006 08:04 PM
USB Drive - Mounted OK, but files aren't recognized Dr3n Linux - Hardware 6 03-14-2005 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration