Bug 465639 - smartd cannot open /dev/twe* devices
smartd cannot open /dev/twe* devices
Status: CLOSED DUPLICATE of bug 456471
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: smartmontools (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Michal Hlavinka
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-04 20:57 EDT by Andreas Thienemann
Modified: 2008-10-13 09:01 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-13 09:01:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andreas Thienemann 2008-10-04 20:57:14 EDT
When trying to have smartd from the smartmontools package monitor the /dev/tweX devices, it fails with the following message:

Oct  5 04:57:46 localhost smartd[2542]: Device: /dev/twe0 [3ware_disk_00], File exists, open() failed 
Oct  5 04:57:46 localhost smartd[2542]: Unable to register ATA device /dev/twe0 [3ware_disk_00] at line 64 of file /etc/smartd.conf 
Oct  5 04:57:46 localhost smartd[2542]: Device /dev/twe0 [3ware_disk_00] not available 
Oct  5 04:57:46 localhost smartd[2542]: Device: /dev/twe0 [3ware_disk_01], File exists, open() failed 
Oct  5 04:57:46 localhost smartd[2542]: Unable to register ATA device /dev/twe0 [3ware_disk_01] at line 65 of file /etc/smartd.conf 
Oct  5 04:57:46 localhost smartd[2542]: Device /dev/twe0 [3ware_disk_01] not available 
Oct  5 04:57:46 localhost smartd[2542]: Monitoring 0 ATA and 0 SCSI devices 
Oct  5 04:57:46 localhost smartd[2544]: smartd has fork()ed into background mode. New PID=2544. 

calling setenforce 0 make smartd work as expected:
Oct  5 04:58:30 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_00], opened 
Oct  5 04:58:30 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_00], found in smartd database. 
Oct  5 04:58:30 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_00], is SMART capable. Adding to "monitor" list. 
Oct  5 04:58:30 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_01], opened 
Oct  5 04:58:31 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_01], found in smartd database. 
Oct  5 04:58:31 localhost smartd[2578]: Device: /dev/twe0 [3ware_disk_01], is SMART capable. Adding to "monitor" list. 
Oct  5 04:58:31 localhost smartd[2578]: Monitoring 2 ATA and 0 SCSI devices 
Oct  5 04:58:32 localhost smartd[2580]: smartd has fork()ed into background mode. New PID=2580. 


Relevant audit messages are as follows:

type=AVC msg=audit(1223175510.536:21): avc:  denied  { getattr } for  pid=2578 comm="smartd" path="/dev/twe0" dev=tmpfs ino=9357 scontext=ro
ot:system_r:fsdaemon_t:s0 tcontext=root:object_r:device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1223175510.536:21): arch=40000003 syscall=195 success=yes exit=0 a0=bfa25000 a1=bfa24eb0 a2=24eff4 a3=3 items=0 ppid=
2577 pid=2578 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="smartd" exe="/usr/sbin/smartd" subj=root:s
ystem_r:fsdaemon_t:s0 key=(null)
type=AVC msg=audit(1223175510.536:22): avc:  denied  { read } for  pid=2578 comm="smartd" name="twe0" dev=tmpfs ino=9357 scontext=root:syste
m_r:fsdaemon_t:s0 tcontext=root:object_r:device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1223175510.536:22): arch=40000003 syscall=5 success=yes exit=3 a0=83f89b0 a1=800 a2=326470 a3=327c80 items=0 ppid=257
7 pid=2578 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="smartd" exe="/usr/sbin/smartd" subj=root:syst
em_r:fsdaemon_t:s0 key=(null)
type=AVC msg=audit(1223175510.537:23): avc:  denied  { ioctl } for  pid=2578 comm="smartd" path="/dev/twe0" dev=tmpfs ino=9357 scontext=root
:system_r:fsdaemon_t:s0 tcontext=root:object_r:device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1223175510.537:23): arch=40000003 syscall=54 success=yes exit=0 a0=3 a1=1f a2=bfa247f8 a3=bfa249f8 items=0 ppid=2577 
pid=2578 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="smartd" exe="/usr/sbin/smartd" subj=root:system
_r:fsdaemon_t:s0 key=(null)
Comment 1 Michal Hlavinka 2008-10-13 09:01:58 EDT

*** This bug has been marked as a duplicate of bug 456471 ***

Note You need to log in before you can comment on or make changes to this bug.