LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Mounted external harddisk and suspend (https://www.linuxquestions.org/questions/debian-26/mounted-external-harddisk-and-suspend-811521/)

jongkind 06-01-2010 12:12 PM

Mounted external harddisk and suspend
 
In Debian if I suspend the PC, will the external mounted harddisk safely umount automatically?

I want to make sure that the integrity of my external HDD is not compromised while the PC goes in the suspend mode.

tredegar 06-01-2010 03:56 PM

Quote:

In Debian if I suspend the PC, will the external mounted harddisk safely umount automatically?
Which "Debian" ? There are many to choose from.
Quote:

I want to make sure that the integrity of my external HDD is not compromised while the PC goes in the suspend mode.
OK. But please feel free to test the behaviour of your linux distribution.

This will probably take you less time than posting a question here and waiting for an answer.

If it doesn't work to your liking, please post further details, then maybe we can help you further.

jongkind 06-02-2010 12:28 PM

Version is Debian Squeeze with Gnome.

I tested it already some time ago, things seem to go well, but it's not as straightforward as you pretend....

The crulpit is that it is not clear whether the external harddisk stops spinning before the PC goes into suspend mode, which can lead to external harddisk hardware failure, see e.g. these links:

http://ssergeje.wordpress.com/2009/0...ves-in-ubuntu/

or

http://elliotli.blogspot.com/2009/01...-in-linux.html

grtz.

tredegar 06-02-2010 01:02 PM

I have never worried about disks not spinning down when they were unmounted, and nothing bad has ever happened to my external drives in the time I have been using linux. I am always careful to unmount them (one way or another) before I remove them though.

In 10.04 I notice that my external HDD now spins down when it is "Safely removed" from the gnome GUI.
Neat, and I see this as an improvement, but before, I just used to wait a few seconds, and then pull the USB plug. Then it would spin down. This drive is about four years old, and as I said, I have never had a problem with it (it is ext3 formatted, and passed fsck with a clean bill of health about two weeks ago).

So, as I said, if you are worried, please do some experiments: Put some non-essential data on the drive, then try suspend or whatever (I'd suggest you do try this more than once), and see what happens. Run fsck on it (when it is unmounted, of course), even if errors have not been reported. Then you'll have your answer, and please post it here.

I confess that I do not use suspend, sleep, hibernate etc: My devices are either "on", and being used for something, or "off". I have an odd dislike of these "in-between" states. Perhaps I'm a binary geek at heart ;)

jongkind 06-02-2010 04:01 PM

After suspending the system with no external HDD file open drive letter remains /dev/sdb1; with a file open it changes to /dev/sdc1. That does not seem to be OK.

The output of e2fsck is given below. Nothing strange as far as I can see.



38789 inodes used (0.04%)
158 non-contiguous files (0.4%)
47 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 38574/86
43260758 blocks used (11.81%)
0 bad blocks
3 large files

33362 regular files
5194 directories
0 character device files
0 block device files
0 fifos
0 links
224 symbolic links (119 fast symbolic links)
0 sockets
--------
38780 files


All times are GMT -5. The time now is 12:36 PM.