FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-25-2008, 11:09 AM
Santi Saez
 
Default Correct way to change I/O scheduler in a iSCSI dev

Hi,

What's the correct way to change configuration parameters for an iSCSI
device? For example I/O scheduler, max_sectors_kb, etc...

I could add commands to the S99local script:

echo noop > /sys/block/sdb/queue/scheduler
echo 64 > /sys/block/sdb/queue/max_hw_sectors_kb

Unfortunately, iSCSI device names might change from sdb to, say, sdc
(server reboot, iSCSI target reconnection). If this happens, customizations
would be lost or applied to a different device.

Any workaround for this using centOS? sysctl, udev, anything else? It also
may be applied to Fiber Channel devices..

Thanks!

--
Santi Saez
http://woop.es

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-28-2008, 02:11 PM
Santi Saez
 
Default Correct way to change I/O scheduler in a iSCSI dev

Santi Saez escribió:

What's the correct way to change configuration parameters for an iSCSI
device? For example I/O scheduler, max_sectors_kb, etc...

I could add commands to the S99local script:

echo noop > /sys/block/sdb/queue/scheduler
echo 64 > /sys/block/sdb/queue/max_hw_sectors_kb

Unfortunately, iSCSI device names might change from sdb to, say, sdc
(server reboot, iSCSI target reconnection). If this happens, customizations
would be lost or applied to a different device.

Any workaround for this using centOS? sysctl, udev, anything else? It also
may be applied to Fiber Channel devices.
Finally I think using udev to tune device config is the best and
simplest way.


$ cat /etc/udev/rules.d/99-san.rules

# $Id: 99-san.rules.udev 13 2008-11-28 10:20:32Z santi $
# Set "noop" as I/O scheduler for iSCSI and Fiber Channel devices
ACTION=="add", ENV{ID_FS_USAGE}!="filesystem", ENV{ID_PATH}=="*-iscsi-*", RUN+="/bin/sh -c 'echo noop > /sys$DEVPATH/queue/scheduler'"
ACTION=="add", ENV{ID_FS_USAGE}!="filesystem", ENV{ID_PATH}=="*-fc-*", RUN+="/bin/sh -c 'echo noop > /sys$DEVPATH/queue/scheduler'"

(To prevent line wrapping, udev rule it's also available at http://pastebin.com/f5ce875a1)

When new iSCSI or FC device is added udevd will execute $RUN command; I set !="filesystem" condition to prevent running the command for each partition, executing only for block devices.

Regards,

--
Santi Saez
http://woop.es

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org