Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initiator mode percentage complete calculation #404

Closed
aperezbios opened this issue Mar 20, 2024 · 0 comments · Fixed by #456
Closed

Fix initiator mode percentage complete calculation #404

aperezbios opened this issue Mar 20, 2024 · 0 comments · Fixed by #456
Assignees
Labels
bug Something isn't working

Comments

@aperezbios
Copy link
Collaborator

aperezbios commented Mar 20, 2024

In issue #393, @lausvi wrote:

Borrowed another 64GB SD card and repeated the dump. This time no problems, so I presume the issue on the first attempt was indeed the failing SD card. 

The log file was 12.6MB after the 4 hour dump. The two dump files are identical in size, but the md5 hashes differ, I am going to presume the first dump is bad due the errors writing on the SD card. (There were couple of retries during the dump on both times, but they all seemed to resolve at first retry).

This time I also plugged in the USB cable and had a peek there from time to time to see the progress, very handy!

I noticed a little glitch during the dump and it shows in the log as well: after 59% the counter reset back to 0% (and the dump finished at 40%).

Here's the beginning of the log:
> [12ms] Platform: ZuluSCSI RP2040
> [12ms] FW Version: 24.03.07-release Mar  7 2024 20:03:17
> [13ms] DIP switch settings: debug log 0, termination 1
> [13ms] SCSI termination is enabled
> [14ms] Flash chip size: 2048 kB
> [14ms] SCSI initiator mode selected by DIP switch, expecting SCSI disks on the bus
> [32ms] SD card detected, FAT64 volume size: 60874 MB
> [33ms] SD MID: 0x03, OID: 0x53 0x44
> [33ms] SD Name: SR64G
> [33ms] SD Date: 8/2023
> [33ms] SD Serial: 0x867BCB84
> [360ms] InitiatorID set to ID 0x07
> [863ms] Initialization complete!
> [113984ms] SCSI ID 1 capacity 71687372 sectors x 512 bytes
> [113985ms] Drive total size is 35003 MiB
> [113985ms] SCSI Version 3
> [113985ms] [SCSI1]
> [113986ms]   Vendor = "SEAGATE "
> [113986ms]   Product = "ST336607LW      "
> [113986ms]   Version = "0004"
> [113987ms]   Type = 0
> [114045ms] Preallocating image file
> [114299ms] Starting to copy drive data to HD10_imaged.hda
> [114405ms] SCSI read succeeded, sectors done: 512 / 71687372 speed 2545 kB/s - 0%
> [114507ms] SCSI read succeeded, sectors done: 1024 / 71687372 speed 2595 kB/s - 0%

... then hours later:

> [8341931ms] SCSI read succeeded, sectors done: 42949120 / 71687372 speed 2702 kB/s - 59%
> [8342028ms] SCSI read succeeded, sectors done: 42949632 / 71687372 speed 2730 kB/s - 59%
> [8342124ms] SCSI read succeeded, sectors done: 42950144 / 71687372 speed 2759 kB/s - 0%
> [8342223ms] SCSI read succeeded, sectors done: 42950656 / 71687372 speed 2674 kB/s - 0%

and at the end:

> [13839086ms] SCSI read succeeded, sectors done: 71687168 / 71687372 speed 2674 kB/s - 40%
> [13839126ms] SCSI read succeeded, sectors done: 71687372 / 71687372 speed 2678 kB/s - 40%
> [13839128ms] Finished imaging drive with id 1
> [13839128ms] Marking SCSI ID, 1, as imaged, wont ask it again.

Originally posted by @lausvi in #393 (comment)

@aperezbios aperezbios changed the title Borrowed another 64GB SD card and repeated the dump. This time no problems, so I presume the issue on the first attempt was indeed the failing SD card. Fix initiator mode percentage complete calculation Mar 20, 2024
@aperezbios aperezbios added the bug Something isn't working label Mar 20, 2024
PetteriAimonen added a commit that referenced this issue Sep 5, 2024
When drive size was larger than 8 GB, LED indicator and logged percentage
would reset to 0 midway through the transfer.
aperezbios added a commit that referenced this issue Sep 5, 2024
initiator: Fix overflow in percentage calculation (#404)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants