# Determine what is waking up hard drive.

## drescherjm

I have a noisy hard drive (vibrates the hot swap bay) that does not need to be spinning 24/7 because it contains data that is not needed often. I have it in its own lvm volume group. vg_temp. Any filesystems on this volume will be mounted via autofs. I am running mythtv and I have some music on this volume and that is registered as the base folder for music in mythtv. Anyways I see it startup in dmesg

```
[1753158.395241] ata7.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6

[1753158.395245] ata7.00: waking up from sleep

[1753158.395252] ata7: hard resetting link

[1753158.875529] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

[1753158.878081] ata7.00: configured for UDMA/133

[1753158.878090] ata7: EH complete

```

But then I do not see any filesystems mounted in this drive

```
jmd0 ~ # mount | grep vg_temp

jmd0 ~ # 
```

Any ideas how I can determine exactly what (mythtv, lvm, autofs, kde-4.4, hal, something else?) is waking up the drive?

----------

## Yuu

Hi,

maybe sys-process/iotop ? I doesn't show what's waking-up your drive, but it shows which programs are reading/writting on your disk.

An iotop capture : http://www.0x11.net/iotop.png

PS : aww, the img tag isn't working ><

----------

## drescherjm

Thanks, I could try that. I know about iotop. I use it a lot..

----------

## dlaor

The script called 'lm-profiler', part of the laptop-mode-tools package, may be helpful. It records all read/write accesses to a hard drive, giving output like the following:

```
Profiling run started.

Write accesses at 1/600 in lm-profiler run: +jbd2/sda5-8                    

Read accesses at 1/600 in lm-profiler run: +gconfd-2                        

Read accesses at 14/600 in lm-profiler run: +gvfs-gdu-volume +udisks-daemon +udisks-helper-a

Write accesses at 28/600 in lm-profiler run: +jbd2/sda5-8 +opera            

Read accesses at 30/600 in lm-profiler run: +opera                          

Read accesses at 40/600 in lm-profiler run: +opera                          

Read accesses at 69/600 in lm-profiler run: +opera

```

Hope this helps!

----------

## drescherjm

Thanks. I have not heard of that. I will try later if I can ..

----------

## drescherjm

I was busy tracking down a different problem on a different machine so I did not try that. I did however power off the drive (hot swap bay with switches) after I saw that all references to it in /etc/autofs and /etc/fstab were commented out.

----------

