Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: lsbk toont een niet bestaande disk  (gelezen 1950 keer)

Offline peer

  • Lid
lsbk toont een niet bestaande disk
« Gepost op: 2023/07/12, 11:29:16 »
os: debian 12 kde

Nadat ik de update van debian 11 naar 12 had uitgevoerd bleek dat een door mij gemaakt java-programma (wrapper voor 'dd') niet goed meer werkte. Er werd een niet-bestaande usb-stick gevonden met size 0. Dit programma gebruikt het bash-command 'lsblk'. Hier is de output van het commando 'lsblk' te zien:
lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 931.5G  0 disk
├─sda1   8:1    0 683.7G  0 part /media/data
└─sda2   8:2    0 247.8G  0 part /mnt/kvm
sdb      8:16   0 119.2G  0 disk
├─sdb1   8:17   0 102.2G  0 part /
├─sdb2   8:18   0     1K  0 part
└─sdb5   8:21   0    17G  0 part [SWAP]
sdc      8:32   0 931.5G  0 disk
└─sdc1   8:33   0 931.5G  0 part /media/backup
sdd      8:48   1     0B  0 disk
sr0     11:0    1  1024M  0 rom 
Het gaat hier om disk 'sdd' Deze disk bestaat niet maar wordt wel tekens gevonden. Ergens op mijn pc staat deze disk dus geregistreerd.

Met het ']ls -l /dev/disk/by-*' commando kan ik meer vinden. Het gaat hier om de regels waarin 'sdd' te lezen is. Deze heb ik gemerkt met  **********
ls -l /dev/disk/by-*
/dev/disk/by-diskseq:
total 0
lrwxrwxrwx 1 root root 11 12 jul 10:00 10 -> ../../loop2
lrwxrwxrwx 1 root root 11 12 jul 10:00 11 -> ../../loop3
lrwxrwxrwx 1 root root 11 12 jul 10:00 12 -> ../../loop4
lrwxrwxrwx 1 root root 11 12 jul 10:00 13 -> ../../loop5
lrwxrwxrwx 1 root root 11 12 jul 10:00 14 -> ../../loop6
lrwxrwxrwx 1 root root 11 12 jul 10:00 15 -> ../../loop7
lrwxrwxrwx 1 root root  9 12 jul 10:00 2 -> ../../sda
lrwxrwxrwx 1 root root  9 12 jul 10:00 3 -> ../../sdb
lrwxrwxrwx 1 root root  9 12 jul 10:00 4 -> ../../sdc
lrwxrwxrwx 1 root root  9 12 jul 10:00 5 -> ../../sr0
lrwxrwxrwx 1 root root  9 12 jul 10:00 7 -> ../../sdd **********
lrwxrwxrwx 1 root root 11 12 jul 10:00 8 -> ../../loop0
lrwxrwxrwx 1 root root 11 12 jul 10:00 9 -> ../../loop1

/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 12 jul 10:00 ata-ATAPI_iHAS124_C_3524417_3D8151500421 -> ../../sr0
lrwxrwxrwx 1 root root  9 12 jul 10:00 ata-Crucial_CT128M550SSD1_14210C27D717 -> ../../sdb
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-Crucial_CT128M550SSD1_14210C27D717-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-Crucial_CT128M550SSD1_14210C27D717-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-Crucial_CT128M550SSD1_14210C27D717-part5 -> ../../sdb5
lrwxrwxrwx 1 root root  9 12 jul 10:00 ata-WDC_WD1002FAEX-00Z3A0_WD-WMATR0443671 -> ../../sda
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-WDC_WD1002FAEX-00Z3A0_WD-WMATR0443671-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-WDC_WD1002FAEX-00Z3A0_WD-WMATR0443671-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 12 jul 10:00 ata-WDC_WD10EZRX-00D8PB0_WD-WCC4MLZV1KCZ -> ../../sdc
lrwxrwxrwx 1 root root 10 12 jul 10:00 ata-WDC_WD10EZRX-00D8PB0_WD-WCC4MLZV1KCZ-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 12 jul 10:00 usb-Generic_STORAGE_DEVICE-0:0 -> ../../sdd **********
lrwxrwxrwx 1 root root  9 12 jul 10:00 wwn-0x50014ee206e3287a -> ../../sda
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x50014ee206e3287a-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x50014ee206e3287a-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 12 jul 10:00 wwn-0x50014ee2b5849a9d -> ../../sdc
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x50014ee2b5849a9d-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 12 jul 10:00 wwn-0x500a07510c27d717 -> ../../sdb
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x500a07510c27d717-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x500a07510c27d717-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12 jul 10:00 wwn-0x500a07510c27d717-part5 -> ../../sdb5

/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 10 12 jul 10:00 backup -> ../../sdc1
lrwxrwxrwx 1 root root 10 12 jul 10:00 data -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 debian -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 kvm -> ../../sda2

/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 10 12 jul 10:00 66fced7c-01 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 66fced7c-02 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12 jul 10:00 66fced7c-05 -> ../../sdb5
lrwxrwxrwx 1 root root 10 12 jul 10:00 85f635b1-01 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 85f635b1-02 -> ../../sda2
lrwxrwxrwx 1 root root 10 12 jul 10:00 a2b99552-01 -> ../../sdc1

/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1d.0-usb-0:1.6:1.0-scsi-0:0:0:0 -> ../../sdd **********
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-1 -> ../../sdb
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-1.0 -> ../../sdb
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1.0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1.0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1.0-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-1-part5 -> ../../sdb5
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-3 -> ../../sda
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-3.0 -> ../../sda
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-3.0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-3.0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-3-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-3-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-4 -> ../../sr0
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-4.0 -> ../../sr0
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-6 -> ../../sdc
lrwxrwxrwx 1 root root  9 12 jul 10:00 pci-0000:00:1f.2-ata-6.0 -> ../../sdc
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-6.0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 12 jul 10:00 pci-0000:00:1f.2-ata-6-part1 -> ../../sdc1

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 12 jul 10:00 353e8958-1d5f-4138-804d-32c4ce942b92 -> ../../sdb5
lrwxrwxrwx 1 root root 10 12 jul 10:00 bb7b3590-c03a-482e-8c96-22f8386c8962 -> ../../sda1
lrwxrwxrwx 1 root root 10 12 jul 10:00 ed4550ed-50ae-4a1c-9409-90304cbbe1ba -> ../../sdc1
lrwxrwxrwx 1 root root 10 12 jul 10:00 f921750a-b568-4833-8eb0-1031a211b4cf -> ../../sdb1
lrwxrwxrwx 1 root root 10 12 jul 10:00 ffc48920-6c5c-41b2-90e4-d97dfb404832 -> ../../sda2

 

Offline peer

  • Lid
Re: lsbk toont een niet bestaande disk
« Reactie #1 Gepost op: 2023/07/12, 12:04:14 »
extra specifieke info over /dev/sdd:
output van 'udevadm info /dev/sdd':
P: /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.6/4-1.6:1.0/host6/target6:0:0/6:0:0:0/block/sdd
M: sdd
U: block
T: disk
D: b 8:48
N: sdd
L: 0
S: disk/by-id/usb-Generic_STORAGE_DEVICE-0:0
S: disk/by-diskseq/7
S: disk/by-path/pci-0000:00:1d.0-usb-0:1.6:1.0-scsi-0:0:0:0
Q: 7
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.6/4-1.6:1.0/host6/target6:0:0/6:0:0:0/block/sdd
E: DEVNAME=/dev/sdd
E: DEVTYPE=disk
E: DISKSEQ=7
E: MAJOR=8
E: MINOR=48
E: SUBSYSTEM=block
E: USEC_INITIALIZED=2987690
E: ID_BUS=usb
E: ID_MODEL=STORAGE_DEVICE
E: ID_MODEL_ENC=STORAGE\x20DEVICE\x20\x20
E: ID_MODEL_ID=0723
E: ID_SERIAL=Generic_STORAGE_DEVICE-0:0
E: ID_VENDOR=Generic
E: ID_VENDOR_ENC=Generic\x20
E: ID_VENDOR_ID=05e3
E: ID_REVISION=9454
E: ID_TYPE=disk
E: ID_INSTANCE=0:0
E: ID_USB_MODEL=STORAGE_DEVICE
E: ID_USB_MODEL_ENC=STORAGE\x20DEVICE\x20\x20
E: ID_USB_MODEL_ID=0723
E: ID_USB_SERIAL=Generic_STORAGE_DEVICE-0:0
E: ID_USB_VENDOR=Generic
E: ID_USB_VENDOR_ENC=Generic\x20
E: ID_USB_VENDOR_ID=05e3
E: ID_USB_REVISION=9454
E: ID_USB_TYPE=disk
E: ID_USB_INSTANCE=0:0
E: ID_USB_INTERFACES=:080650:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usb-storage
E: ID_PATH=pci-0000:00:1d.0-usb-0:1.6:1.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_00_1d_0-usb-0_1_6_1_0-scsi-0_0_0_0
E: DEVLINKS=/dev/disk/by-id/usb-Generic_STORAGE_DEVICE-0:0 /dev/disk/by-diskseq/7 /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.6:1.0-scsi-0:0:0:0
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

Offline peer

  • Lid
Re: lsbk toont een niet bestaande disk
« Reactie #2 Gepost op: 2023/07/12, 13:01:54 »
gedeeltelijk opgelost
Ik heb en rule gemaakt die deze usb disk blacklist
file: /etc/udev/rules.d/81-ghost-usb-disk.rules
inhoud:
# disable ghost usb disk
SUBSYSTEM=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="0723", ATTR{authorized}="0"

Offline bart85

  • Lid
Re: lsbk toont een niet bestaande disk
« Reactie #3 Gepost op: 2023/07/12, 16:44:19 »
Ga je nu geen probleem krijgen als je een usb stick erin steekt en wil mounten?
Of problemen met sd card?
« Laatst bewerkt op: 2023/07/12, 17:02:26 door bart85 »
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline DeBaas

  • Lid
Re: lsbk toont een niet bestaande disk
« Reactie #4 Gepost op: 2023/07/12, 19:55:27 »
05e3 : 0723
05e3 Genesys Logic, Inc.
           : 0723  GL827L SD/MMC/MS Flash Card Reader

Er zit geen  geheugenkaartje in, dan is de grootte 0.

http://www.linux-usb.org/usb.ids
« Laatst bewerkt op: 2023/07/12, 19:57:11 door DeBaas »
Ik beantwoord GEEN hulpvragen via PB en/of MAIL

Offline peer

  • Lid
Re: lsbk toont een niet bestaande disk
« Reactie #5 Gepost op: 2023/07/13, 09:10:52 »
05e3 : 0723
05e3 Genesys Logic, Inc.
           : 0723  GL827L SD/MMC/MS Flash Card Reader

Er zit geen  geheugenkaartje in, dan is de grootte 0.

http://www.linux-usb.org/usb.ids
Inmiddels ben ik er ook achter dat het hier om een sd card reader gaat. Maar in debian 11 werd de sd card reader niet weergegeven als er geen sd kaartje in zat. In debian 12 is dat wel het geval. Dan zie ik de size 0.
Vermoedelijk is er in de kernel een aanpassing geweest.

Nu weet ik wat het is.  Grappig is dat ik hierdoor een fout in een oud programma ontdekt heb. Deze kan ik echter niet herstellen omdat ik de source van het programma niet meer heb. Is niet erg.