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

Not unique media id #27

Closed
abertelmann opened this issue Apr 21, 2018 · 3 comments
Closed

Not unique media id #27

abertelmann opened this issue Apr 21, 2018 · 3 comments
Assignees
Labels

Comments

@abertelmann
Copy link

Hello.
I came on an issue with identical media ids yesterday when i tried to prepare 3 sd cards in a row.

Preparing for a trip i wanted to prepare the (empty, freshly formated by camera) sd cards and the backup usb stick. I followed the usual way - power up Pi, insert usb backup medium, insert sd card (with usb card reader), wait for shutdown (some 30 seconds). Repeat 3 times in about 3-5 minutes.

When checking the usb stick on another machine i found only 2 backup folders. I checked the sd cards as well and found 2 with identical id file name.

I solved the problem by deleting one card's id file and repeating the setup, about 10 minutes after the first try. I ended OK with a new id there.

I think it may be a problem when preparing more than one media in short time, on a Pi without correct system time (headless Pi zero in my case, no network connection).

This may lead to loss of data when backing up 2 different cards with identical id onto the same backup medium.

My cards where of 2 different types, the identical ids were on the cards of the same type - any issue there (i did not study the script)?

I just updated little-backup-box to the actual version (as headless backup device) after using the old version for about 8 or 10 months. I did not have any trouble there, maybe because it used random id number or i did not prepare multiple cards in a row.

Maybe you should revert to the old system, or (since a date-time based system has some advantages for book-keeping) to a combined system.

As for your work - i really like your little helpers and your ebook - highly recommended!

Greets
Andreas

@dmpop dmpop self-assigned this Apr 21, 2018
@dmpop dmpop added the bug label Apr 21, 2018
@dmpop
Copy link
Collaborator

dmpop commented Apr 21, 2018

Hi Andreas,

Thank you for reporting the issue! You are right: if the system time is not set, this can cause problems with generating unique ids. I'll work on a fix.

@dmpop
Copy link
Collaborator

dmpop commented Apr 21, 2018

Fixed in 162719b I'd be grateful if you could test it.

@dmpop dmpop closed this as completed Apr 21, 2018
@abertelmann
Copy link
Author

Works!
Thanks for the instant fix

Andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants