USB 장치를 서버에 연결하는 데 문제가 있습니다. USB 장치를 반복적으로 삽입했거나 장치 문자가 다시 할당된 것 같습니다.sdb1: sdb1
문제는 USB 장치를 연결할 때마다 udev 규칙이 실행된다는 것입니다. 이제 장치 문자가 표시될 때마다 udev 규칙이 여러 번 실행됩니다. 오류 소스에서 제외하기 위해 사용자 정의 udev 규칙을 비활성화했습니다. 따라서 이러한 모든 효과와 로그는 사용자 정의 udev 규칙 없이 생성됩니다.
이 효과는 장치를 설치할 때까지만 지속됩니다. 이 메시지는 장치가 설치된 후에 중지됩니다.
이것은 a를 연결할 때의 로그이지만 RDX-Device via USB
효과는 동일합니다.USB-Sticks
/var/log/메시지
2018-08-06T09:23:29.139628+02:00 SLES12RDX kernel: [241820.600269] sd 4:0:0:0: [sdb] 976764976 512-byte logical blocks: (500 GB/466 GiB)
2018-08-06T09:23:29.171622+02:00 SLES12RDX kernel: [241820.632581] sdb: sdb1
2018-08-06T09:23:44.979634+02:00 SLES12RDX kernel: [241836.437561] sdb: sdb1
2018-08-06T09:24:15.199624+02:00 SLES12RDX kernel: [241866.657525] sdb: sdb1
2018-08-06T09:24:45.415636+02:00 SLES12RDX kernel: [241896.874298] sdb: sdb1
2018-08-06T09:25:15.631630+02:00 SLES12RDX kernel: [241927.093221] sdb: sdb1
2018-08-06T09:25:45.851637+02:00 SLES12RDX kernel: [241957.311295] sdb: sdb1
2018-08-06T09:26:16.067646+02:00 SLES12RDX kernel: [241987.530071] sdb: sdb1
정보
[241262.363311] usb 2-1.6: new high-speed USB device number 5 using ehci-pci
[241262.457475] usb 2-1.6: New USB device found, idVendor=1a5a, idProduct=0006
[241262.457487] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[241262.457488] usb 2-1.6: Product: RDX
[241262.457490] usb 2-1.6: Manufacturer: TANDBERG
[241262.457491] usb 2-1.6: SerialNumber: 032613566487
[241262.457917] usb-storage 2-1.6:1.0: USB Mass Storage device detected
[241262.458197] scsi host4: usb-storage 2-1.6:1.0
[241263.456000] scsi 4:0:0:0: Direct-Access RDX 0227 PQ: 0 ANSI: 6
[241263.456240] sd 4:0:0:0: Attached scsi generic sg2 type 0
[241263.459249] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[241288.618894] sd 4:0:0:0: [sdb] 976764976 512-byte logical blocks: (500 GB/466 GiB)
[241288.657955] sdb: sdb1
[241294.065836] sdb: sdb1
[241324.282380] sdb: sdb1
[241766.323096] sd 4:0:0:0: [sdb] 976764976 512-byte logical blocks: (500 GB/466 GiB)
[241766.360054] sdb: sdb1
[241776.112351] sdb: sdb1
[241820.600269] sd 4:0:0:0: [sdb] 976764976 512-byte logical blocks: (500 GB/466 GiB)
[241820.632581] sdb: sdb1
[241836.437561] sdb: sdb1
[241866.657525] sdb: sdb1
[241896.874298] sdb: sdb1
[241927.093221] sdb: sdb1
[241957.311295] sdb: sdb1
[241987.530071] sdb: sdb1
답변1
부분 답변:
아직 원인이 무엇인지는 모르지만 udevd 디버그 로그에서 이런 일이 발생하는 위치를 알려드릴 수 있습니다.
/dev/sda
즉, 및 다음에 대한 "inotify close" 이벤트를 수신합니다 /dev/sdb
.
2018-08-06T16:20:28.414845+02:00 SLES12RDX systemd-udevd[429]: inotify event: 8 for /dev/sda
2018-08-06T16:20:28.416130+02:00 SLES12RDX systemd-udevd[429]: device /dev/sda closed, synthesising 'change'
2018-08-06T16:20:28.556561+02:00 SLES12RDX systemd-udevd[429]: inotify event: 8 for /dev/sdb
...
2018-08-06T16:20:28.566988+02:00 SLES12RDX systemd-udevd[429]: seq 2123 queued, 'remove' 'block'
2018-08-06T16:20:58.630120+02:00 SLES12RDX systemd-udevd[429]: inotify event: 8 for /dev/sda
...
2018-08-06T16:20:58.631408+02:00 SLES12RDX systemd-udevd[429]: device /dev/sda closed, synthesising 'change'
잠깐만요, udev는 "변경" 이벤트를 결합하여 전체 블록 장치와 모든 파티션을 여러 번 다시 검색합니다.
나는 이런 것을 본 적이 없습니다. inotify
파일 시스템 이벤트를 모니터링하여 이러한 이벤트가 사용자 공간에서 발생한 것처럼 보이도록 하는 데 사용됩니다.
어떤 응용 프로그램이 이 문제를 일으키는지 알아내는 방법을 모르겠습니다. udev 버그 추적 사이트에 버그를 신고하고 추가로 추적하는 방법에 대한 아이디어가 있는지 알아보세요.
답변2
USB 장치를 연결한 후 많은 udev 이벤트가 수신됩니다. 15~20초 동안 반복되면 장치가 다시 연결된 것처럼 이벤트가 표시됩니다. 출력은 다음에서 비롯됩니다.udevadm monitor
KERNEL[249779.569894] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[249779.569949] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[249779.570075] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
KERNEL[249779.570123] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
KERNEL[249779.570245] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda6 (block)
KERNEL[249779.570296] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda7 (block)
UDEV [249779.643535] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [249779.646294] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV [249779.647536] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
UDEV [249779.647693] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda7 (block)
UDEV [249779.649616] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
UDEV [249779.651444] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda6 (block)
KERNEL[249781.213738] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
KERNEL[249781.233201] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
KERNEL[249781.233309] add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
UDEV [249781.495520] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
UDEV [249781.604649] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
UDEV [249781.712323] add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
KERNEL[249809.678044] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda (block)
KERNEL[249809.678154] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
KERNEL[249809.678211] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
KERNEL[249809.678292] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
KERNEL[249809.678410] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda6 (block)
KERNEL[249809.678455] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda7 (block)
UDEV [249809.750877] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda (block)
UDEV [249809.754139] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1 (block)
UDEV [249809.754325] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda5 (block)
UDEV [249809.756127] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2 (block)
UDEV [249809.756270] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda7 (block)
UDEV [249809.756438] change /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda6 (block)
KERNEL[249809.788887] remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
KERNEL[249809.793174] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
KERNEL[249809.793338] add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
UDEV [249809.795254] remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
UDEV [249810.274418] change /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb (block)
UDEV [249810.391165] add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1 (block)
udev conf에서 디버그 옵션을 활성화했습니다. /var/log/messages의 udev 출력이 이제 너무 큽니다. 여기에 게시하거나 신중하게 디버깅해야 합니다.
하지만 이 udev 규칙은 여러 번 "실행"됩니다.
/usr/lib/udev/rules.d/60-persistent-storage.rules
이 오류는 sda
및 에 나타납니다 sdb
. sda is not a USB device
, 이것은 내 HHD입니다. 저는 udev 전문가가 아니므로 이것이 "정상"인지는 알 수 없습니다.
2018-08-06T12:14:51.303326+02:00 SLES12RDX systemd-udevd[2977]: PROGRAM '/sbin/multipath -u -i sda' /usr/lib/udev/rules.d/56-multipath.rules:25
2018-08-06T12:14:51.303516+02:00 SLES12RDX systemd-udevd[2978]: starting '/sbin/multipath -u -i sda'
2018-08-06T12:14:51.365860+02:00 SLES12RDX systemd-udevd[2977]: '/sbin/multipath -u -i sda'(out) 'sda is not a valid multipath device path'
2018-08-06T12:14:51.366082+02:00 SLES12RDX systemd-udevd[2977]: Process '/sbin/multipath -u -i sda' failed with exit code 1.
2018-08-06T12:14:51.441033+02:00 SLES12RDX systemd-udevd[2989]: PROGRAM '/sbin/multipath -u -i sdb' /usr/lib/udev/rules.d/56-multipath.rules:25
2018-08-06T12:14:51.441168+02:00 SLES12RDX systemd-udevd[2990]: starting '/sbin/multipath -u -i sdb'
2018-08-06T12:14:51.468823+02:00 SLES12RDX systemd-udevd[2989]: '/sbin/multipath -u -i sdb'(out) 'sdb is not a valid multipath device path'
2018-08-06T12:14:51.469024+02:00 SLES12RDX systemd-udevd[2989]: Process '/sbin/multipath -u -i sdb' failed with exit code 1.