Skip to contentSkip to conversation

can I freeze I/O for some time to a given disk / md / dm

DISCUSSION Tomasz Chmielewski 1 participant 1 message Apr 7, 2009 libata

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines · Tomasz Chmielewski
Quoted 4 lines

Is it possible to "freeze I/O" for some time to a given disk / md / dm device?

Say, "freeze I/O" so that userspace waits for any response for 30, 60 seconds or more?

For real disks you can use /sys/block/sdX/device/unload_heads to achieve something similar (see Documentation/laptops/disk-shock-protection.txt in the kernel source about how to use it). That won't work for md/dm devices though.

For drives which don't support "unload_heads" plain hdparm should work:

hdparm -Y /dev/sdX

(possibly repeated in a loop for some time).

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org