RHEL7.9 running on zVM 7.1 with VMTAPE.

A vmtape mount command successfully mounts a tape and “gives” the tape
drive to Linux. Linux promptly detaches the drive.

I thought it was due to udev rules, but I don’t see what’s wrong. I thought
maybe it was related to blacklisted device numbers, but cio_ignore shows
nothing is blacklisted.

How can I get more information about why the tape drive is detached?

The udev rules look specific to IBM drives, and these are Secure Agent
drives…maybe no rules covers it so Linux says “oh no you don’t, you’re not
bringing that in here”? :-)

How can I see the device info in order to make a suitable udev rule?

#udevadm monitor

monitor will print the received events for:

UDEV - the event which udev sends out after rule processing

KERNEL - the kernel uevent



KERNEL[192616.914861] add      /devices/css0/0.0.0061 (css)

KERNEL[192616.914901] add      /devices/css0/0.0.0061/0.0.0478 (ccw)

UDEV  [192616.955020] add      /devices/css0/0.0.0061 (css)

UDEV  [192616.963492] add      /devices/css0/0.0.0061/0.0.0478 (ccw)

KERNEL[192617.916677] remove   /devices/css0/0.0.0061/0.0.0478 (ccw)

KERNEL[192617.916699] remove   /devices/css0/0.0.0061 (css)

UDEV  [192617.917073] remove   /devices/css0/0.0.0061/0.0.0478 (ccw)

UDEV  [192617.917191] remove   /devices/css0/0.0.0061 (css)







The above kernel/udev events happen when I vmtape mount --vol <x>

The tape is mounted, attached to linux then immediately removed/detached



The relevant rules file I have is:

#cat 99-vmt_event.rules

SUBSYSTEM=="ccw", ACTION=="add", RUN+="/usr/bin/vmtuevent attach %k"

#SUBSYSTEM=="ccw", ACTION=="remove", RUN+="/usr/bin/vmtuevent detach %k"

KERNEL=="[nr]tibm[0-9]*", ACTION=="add", KERNELS=="[0-9A-Fa-f.]*",
RUN+="/usr/bin/vmtuevent mount %b %n"

#KERNEL=="[nr]tibm[0-9]*", ACTION=="remove", RUN+="/usr/bin/vmtuevent
umount %n"

#KERNEL=="btibm[0-9]*", ACTION=="remove", RUN+="/usr/bin/vmtuevent umount
%n"



I commented out the remove items and restarted the server…. the remove
events still happened.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to