V
V
vlarkanov2018-12-18 13:15:12
Debian
vlarkanov, 2018-12-18 13:15:12

Debian 9 (Proxmox 5.2): how to prevent mounting a bad flash drive?

Hello! Immediately after installing the OS, the console (and log) is constantly clogged with messages like this:

[Tue Dec 18 13:12:45 2018] sd 1:0:0:0: [sdc] Attached SCSI disk
[Tue Dec 18 13:12:47 2018] usb 1-1.3: USB disconnect, device number 123
[Tue Dec 18 13:12:47 2018] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[Tue Dec 18 13:12:47 2018] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 72 2f 00 00 00 08 00
[Tue Dec 18 13:12:47 2018] print_req_error: I/O error, dev sdc, sector 7483136
[Tue Dec 18 13:12:47 2018] usb 1-1.3: new high-speed USB device number 124 using ehci-pci
[Tue Dec 18 13:12:47 2018] usb 1-1.3: New USB device found, idVendor=413c, idProduct=a101
[Tue Dec 18 13:12:47 2018] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Dec 18 13:12:47 2018] usb 1-1.3: Product: Internal Dual SD
[Tue Dec 18 13:12:47 2018] usb 1-1.3: Manufacturer: Dell Computer Corp.
[Tue Dec 18 13:12:47 2018] usb 1-1.3: SerialNumber: 0123456789AB
[Tue Dec 18 13:12:47 2018] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[Tue Dec 18 13:12:47 2018] scsi host1: usb-storage 1-1.3:1.0
[Tue Dec 18 13:12:48 2018] scsi 1:0:0:0: Direct-Access     Dell     Internal Dual SD 1.:  PQ: 0 ANSI: 5
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: Attached scsi generic sg2 type 0
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] 7483392 512-byte logical blocks: (3.83 GB/3.57 GiB)
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] Write Protect is off
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] Mode Sense: 0b 00 00 08
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] No Caching mode page found
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] Assuming drive cache: write through
[Tue Dec 18 13:12:48 2018]  sdc: sdc1
[Tue Dec 18 13:12:48 2018] sd 1:0:0:0: [sdc] Attached SCSI disk
[Tue Dec 18 13:12:49 2018] usb 1-1.3: USB disconnect, device number 124
[Tue Dec 18 13:12:49 2018] scsi 1:0:0:0: rejecting I/O to offline device
[Tue Dec 18 13:12:49 2018] scsi 1:0:0:0: [sdc] killing request
[Tue Dec 18 13:12:49 2018] scsi 1:0:0:0: [sdc] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[Tue Dec 18 13:12:49 2018] scsi 1:0:0:0: [sdc] CDB: Read(10) 28 00 00 72 2f 00 00 00 08 00
[Tue Dec 18 13:12:49 2018] print_req_error: I/O error, dev sdc, sector 7483136
[Tue Dec 18 13:12:49 2018] Buffer I/O error on dev sdc, logical block 935392, async page read
[Tue Dec 18 13:12:49 2018] usb 1-1.3: new high-speed USB device number 125 using ehci-pci
[Tue Dec 18 13:12:50 2018] usb 1-1.3: New USB device found, idVendor=413c, idProduct=a101
[Tue Dec 18 13:12:50 2018] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Dec 18 13:12:50 2018] usb 1-1.3: Product: Internal Dual SD
[Tue Dec 18 13:12:50 2018] usb 1-1.3: Manufacturer: Dell Computer Corp.
[Tue Dec 18 13:12:50 2018] usb 1-1.3: SerialNumber: 0123456789AB
[Tue Dec 18 13:12:50 2018] usb-storage 1-1.3:1.0: USB Mass Storage device detected

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 278.9G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 256M 0 part
└─sda3 8:3 0 278.6G 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 69.5G 0 lvm /
├─pve-data_tmeta 253:2 0 1.9G 0 lvm
│ └─pve-data 253: 4 0 181.4G 0 lvm
└─pve-data_tdata 253:3 0 181.4G 0 lvm
└─pve-data 253:4 0 181.4G 0 lvm
sdb 8:16 0 2.2T 0 disk
sdc 8:32 0 3.6G 0 disk
└─sdc1 8:33 0 3.6G 0 part

Those. a flash drive appears, then disappears. The server is now physically removed, there is no way to pull out the insidious device. Is it possible to somehow "prohibit" its use at the OS level?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Softer, 2018-12-18
@Softer

You can turn off the power on the desired USB port
https://stackoverflow.com/questions/4702216/control...

P
Puma Thailand, 2018-12-18
@opium

just ask someone to pull the thread, usually it is easy to do even for a cleaning lady))) via video link

P
pfg21, 2018-12-18
@pfg21

Based on the comments, the issue has been resolved.
but somehow did such rule
BUS=="usb", ATTR{idProduct}=="1607", ATTR{idVendor}=="0951", OPTIONS+="ignore_device"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question