Folgendes Problem:
Wenn ich eine SSD (SanDisk 120 GB, Modell SSD Plus) über /etc/fstab einbinde, verzögert es den Boot-Vorgang um rund 30 Sekunden. Meine fstab sieht so aus:
proc /proc proc defaults 0 0
PARTUUID=4cbc14ca-01 /boot vfat defaults 0 2
PARTUUID=4cbc14ca-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
UUID=a854d948-5199-4778-8874-c98f2202a72b /media/usbplatte/ ext4 auto,nofail,exec,sync,users,rw 0 0
dmesg bietet folgende Informationen. Dort ist die zeitliche Lücke sehr schön zu sehen:
pi@raspi4G:~ $ dmesg | grep -i sda
[ 2.575621] sd 0:0:0:0: [sda] 234455040 512-byte logical blocks: (120 GB/112 GiB)
[ 2.583160] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 2.588582] sd 0:0:0:0: [sda] Write Protect is off
[ 2.593423] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 2.593785] sd 0:0:0:0: [sda] Disabling FUA
[ 2.597986] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.607933] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[ 2.624820] sda: sda1
[ 2.629626] sd 0:0:0:0: [sda] Attached SCSI disk
[ 36.331723] sd 0:0:0:0: [sda] tag#11 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD IN
[ 36.331741] sd 0:0:0:0: [sda] tag#11 CDB: opcode=0x28 28 00 0d f9 7d b8 00 00 48 00
[ 36.331870] sd 0:0:0:0: [sda] tag#10 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[ 36.331884] sd 0:0:0:0: [sda] tag#10 CDB: opcode=0x28 28 00 0d f9 7c 78 00 00 a8 00
[ 36.332150] sd 0:0:0:0: [sda] tag#7 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
[ 36.332162] sd 0:0:0:0: [sda] tag#7 CDB: opcode=0x28 28 00 0d f9 7d 60 00 00 50 00
[ 36.332413] sd 0:0:0:0: [sda] tag#6 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD IN
[ 36.332424] sd 0:0:0:0: [sda] tag#6 CDB: opcode=0x28 28 00 0d f9 7d 28 00 00 30 00
[ 38.731705] sd 0:0:0:0: [sda] tag#13 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD IN
[ 38.731723] sd 0:0:0:0: [sda] tag#13 CDB: opcode=0x28 28 00 00 00 08 02 00 00 02 00
[ 39.308607] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Alles anzeigen
Nach den 39 Sekunden ist dann tatsächlich erst der Zugriff möglich sowohl per SSH als auch direkt am Desktop. Hat jemand eine Erklärung, warum das Einhängen der SSD so lang braucht? Sowohl an meinem Ubuntu-System als auch unter Windows 10 gibt es diese Verzögerungen nicht.
Ich habe einen Workaround, aber mit dem bin ich nicht zufrieden:
Ich setze das Mounten in der fstab auf noauto
Ich schreibe einen klassischen mount-Befehl in die /etc/rc.local
Dies führt dann immerhin zu einem unverzögerten Boot-Vorgang (ca. 12 Sekunden bis Desktop), weil ich den mount-Befehl in den Hintergrund schicke. Dennoch steht das Laufwerk erst nach weiteren rund 20 Sekunden zur Verfügung. Bin für jeden Tipp dankbar, der das "ordentliche" Einhängen per fstab ohne Bremse ermöglicht!