You are not logged in.

#1 2023-02-07 21:49:50

ramwoolf
Member
From: Utrecht, Netherlands
Registered: 2012-05-17
Posts: 5

USB stick shows totally different size in lsblk and fdisk output

I have USB stick 16Gb.
lsblk shows that:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
...
sdb       8:16          1      14.6G  0 disk 

But fdisk shows, that only 3.8 Gb are available for partition creation
There are any partitions now.
Before there were two ones - EFI and Ubuntu. I tried to erase them by dd from /dev/zero - but it have written 3.8Gb as well (of=/dev/sdb, no mounted partition was)

I suspect - the previous partitions erased bad and new table created not in the begin of disk space
So, how can I retrieve all disk space for usage?

Offline

#2 2023-02-07 22:59:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: USB stick shows totally different size in lsblk and fdisk output

But fdisk shows

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

I suspect - the previous partitions erased bad and new table created not in the begin of disk space

does not fit

erase them by dd from /dev/zero - but it have written 3.8Gb as well (of=/dev/sdb, no mounted partition was)

Unplug the usb key, run "dmesg -w", re-plug it and post the dmesg tail.
Also the entire fdisk output on it.

Brace yourself for the key to have died.

Offline

#3 2023-02-07 23:29:42

ramwoolf
Member
From: Utrecht, Netherlands
Registered: 2012-05-17
Posts: 5

Re: USB stick shows totally different size in lsblk and fdisk output

dmesg output:

[108022.255406] usb 1-2: new high-speed USB device number 38 using xhci_hcd
[108022.403477] usb 1-2: New USB device found, idVendor=8564, idProduct=1000, bcdDevice= 1.00
[108022.403495] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[108022.403503] usb 1-2: Product: Mass Storage Device
[108022.403509] usb 1-2: Manufacturer: JetFlash
[108022.403515] usb 1-2: SerialNumber: HBF0V2LH
[108022.406248] usb-storage 1-2:1.0: USB Mass Storage device detected
[108022.407115] scsi host2: usb-storage 1-2:1.0
[108023.427822] scsi 2:0:0:0: Direct-Access     JetFlash Transcend 16GB   8.07 PQ: 0 ANSI: 4
[108023.430106] sd 2:0:0:0: [sdb] 30523392 512-byte logical blocks: (15.6 GB/14.6 GiB)
[108023.430926] sd 2:0:0:0: [sdb] Write Protect is off
[108023.430947] sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
[108023.431997] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[108023.436969]  sdb:
[108023.437077] sd 2:0:0:0: [sdb] Attached SCSI removable disk

fdisk output. I have created one partition, but total size still wrong

# fdisk -l /dev/sdb
Disk /dev/sdb: 3.81 GiB, 4087939072 bytes, 7984256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 048F0033-6262-4F8A-A016-933E0925939B

Device     Start     End Sectors  Size Type
/dev/sdb1   2048 2097151 2095104 1023M Microsoft basic data

Offline

#4 2023-02-08 07:26:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: USB stick shows totally different size in lsblk and fdisk output

[108023.430106] sd 2:0:0:0: [sdb] 30523392 512-byte logical blocks: (15.6 GB/14.6 GiB)

There isn't any more output, esp. not when trying to run fdisk or dd onto it?

Offline

#5 2023-02-08 09:15:54

ramwoolf
Member
From: Utrecht, Netherlands
Registered: 2012-05-17
Posts: 5

Re: USB stick shows totally different size in lsblk and fdisk output

No, for fdisk that's it.

There is that output when I try to record zeroes

$ sudo dd if=/dev/zero of=/dev/sdb status=progress conv=fdatasync
3897565184 bytes (3.9 GB, 3.6 GiB) copied, 14 s, 278 MB/s
dd: writing to '/dev/sdb': No space left on device
7984257+0 records in
7984256+0 records out
4087939072 bytes (4.1 GB, 3.8 GiB) copied, 14.7088 s, 278 MB/s

Offline

#6 2023-02-08 15:47:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: USB stick shows totally different size in lsblk and fdisk output

No, for fdisk that's it.

No, whether running fdisk or dd triggers more dmesg output.

However:

seth wrote:

Brace yourself for the key to have died.

There probably 4 4GB chips inside, the 2nd (or indeed 3 of them) no longer responds.
This is now a 4GB usb key and I'd not trust it beyond carrying movies that you illegally downloaded from the internet onto your computer to your Tv.

Offline

#7 2023-02-12 12:43:13

ramwoolf
Member
From: Utrecht, Netherlands
Registered: 2012-05-17
Posts: 5

Re: USB stick shows totally different size in lsblk and fdisk output

So, finally the problem is resolved just by reboot of laptop. After that fdisk had shown correct info
Anyway, thanks for helping

Offline

#8 2023-02-12 14:53:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: USB stick shows totally different size in lsblk and fdisk output

Did you update the kernel and not reboot before this happened?
Is there a parallel windows installation?

Unless you can explain this behavior, I'd be weary to trust the device.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB