Greg Stevenson
2011-11-20 19:26:56 UTC
I found the following udev rules on the citrix forums designed to expose
hard drive devices to VMs. By adding these rules to 50-udev.rules it does
the job but exposes a bunch of other rubbish I could do without.
ACTION=="add", SYSFS{vendor}=="ATA ",
ID=="1:0:0:0|2:0:0:0|3:0:0:0|4:0:0:0",
SYMLINK+="xapi/block/%k", \
RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1
ID=="1:0:0:0|2:0:0:0|3:0:0:0|4:0:0:0", \
RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1
sata drives? And while we are at it, is there a way to use IOCTL or hdparm
within the rules to turn write cache off on each of my three drives without
turning it off on the drive holding the system? (a completely separate
drive, SSD in this case, which is also exposed to the VMs by the above
rules)
Cheers
Greg Stevenson
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
hard drive devices to VMs. By adding these rules to 50-udev.rules it does
the job but exposes a bunch of other rubbish I could do without.
ACTION=="add", SYSFS{vendor}=="ATA ",
ID=="1:0:0:0|2:0:0:0|3:0:0:0|4:0:0:0",
SYMLINK+="xapi/block/%k", \
RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1
/dev/null&'"
ACTION=="remove", SYSFS{vendor}=="ATA ",ID=="1:0:0:0|2:0:0:0|3:0:0:0|4:0:0:0", \
RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1
/dev/null&'"
Can anyone see how I could alter these rules to only expose my 3 2Tb Seagatesata drives? And while we are at it, is there a way to use IOCTL or hdparm
within the rules to turn write cache off on each of my three drives without
turning it off on the drive holding the system? (a completely separate
drive, SSD in this case, which is also exposed to the VMs by the above
rules)
Cheers
Greg Stevenson
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug