Hello,

thanks for the great rules to umount /tmp/SECUPD after the usb device is lost. I test the rules in SLES and the following works for sles11 and sles12

sles11:

# Fix to ensure /tmp/SECUPD is properly unmounted when the idrac usb device is disconnected prior to being unmounted. ACTION=="remove", ENV{ID_VENDOR}=="iDRAC", ENV{ID_TYPE}=="disk", ENV{ID_FS_LABEL}="SECUPD", RUN+="/bin/sh -c '/bin/findmnt /tmp/SECUPD 1>/dev/null 2>&1; [[ $? -eq 0 ]] && /bin/logger Unmounting /tmp/SECUPD: See /etc/udev/rules.d/99-dell-tmp-secupd-fix.rules && /bin/umount -fli /tmp/SECUPD'"

sles12

# Fix to ensure /tmp/SECUPD is properly unmounted when the idrac usb device is disconnected prior to being unmounted. ACTION=="remove", ENV{ID_VENDOR}=="iDRAC", ENV{ID_TYPE}=="disk", ENV{ID_FS_LABEL}="SECUPD", RUN+="/bin/sh -c 'systemctl status tmp-SECUPD.mount 1>/dev/null 2>&1; [[ $? -eq 0 ]] && /bin/logger Unmounting /tmp/SECUPD: See /etc/udev/rules.d/99-dell-tmp-secupd-fix.rules && systemctl stop tmp-SECUPD.mount'"

With regards,
Werner Frerichs


Am 06.01.2017 um 06:03 schrieb [email protected]:
...

From: Ed Velez <[email protected]>
Subject: Re: [Linux-PowerEdge] Dell System Update or Dell Linux
        Repository which is better
...

Hey Soorej,

I am only seeing the inventory collection script fixed in the 
invcol_WF06C_LN64_16.12.200.896_A00.x86_64 package which is used by dsu. The 
inventory collection script provided in srvadmin-cm is still broken. Is it 
still the case that we will have to wait for the next OMSA point release in 
March for this to be corrected?

I have created a udev rule/hack to address this in the interim:

1) umount /tmp/SECUPD # as many times as you need to in order to fix existing 
mounts
2) Create /etc/udev/rules.d/99-dell-tmp-secupd-fix.rules with the rule 
corresponding to your distro:

rhel/cent 7:

# Fix to ensure /tmp/SECUPD is properly unmounted when the idrac usb device is 
disconnected prior to being unmounted.
ACTION=="remove", ENV{ID_VENDOR}=="iDRAC", ENV{ID_TYPE}=="disk", ENV{ID_FS_LABEL}="SECUPD", RUN+="/bin/sh -c 
'/bin/systemctl is-active tmp-SECUPD.mount 1>/dev/null 2>&1; [[ $? -eq 0 ]] && /bin/logger Unmounting /tmp/SECUPD: See 
/etc/udev/rules.d/99-dell-tmp-secupd-fix.rules && /bin/systemctl stop tmp-SECUPD.mount'"

rhel/cent 6:

# Fix to ensure /tmp/SECUPD is properly unmounted when the idrac usb device is 
disconnected prior to being unmounted.
ACTION=="remove", ENV{ID_VENDOR}=="iDRAC", ENV{ID_TYPE}=="disk", ENV{ID_FS_LABEL}="SECUPD", RUN+="/bin/sh -c 
'/bin/findmnt /tmp/SECUPD 1>/dev/null 2>&1; [[ $? -eq 0 ]] && /bin/logger Unmounting /tmp/SECUPD: See 
/etc/udev/rules.d/99-dell-tmp-secupd-fix.rules && /bin/umount -fli /tmp/SECUPD'"

3) udevadm control --reload-rules

The rule is only trigged when the device is removed and is pretty explicit so I 
feel it to be fairly safe.  You can test by running 'srvadmin-services.sh 
restart' or just calling the invcol script directly 
/opt/dell/srvadmin/sbin/invcol and verifying no mounts exist.

--
Werner Frerichs
Christian-Albrechts-Universität zu Kiel
Rechenzentrum
Abteilung Basisdienste
Ludewig-Meyn-Str. 4
D-24118 Kiel
Tel: +49 (0)431 880-3582
Fax: +49 (0)431 880-1523
[email protected]
www.uni-kiel.de


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Linux-PowerEdge mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/linux-poweredge

Reply via email to