I bought a while ago a sdcard that is supposedly 32GB, but after using it for some time, I found that it only has 2GB wired in. If I write past the 2GB limit, the files I read are composed of zero bytes.
I know the first 2GB are valid, but I don't know exactly at which sector the valid area stops. Do you know how on Linux I could easily find the last usable sector. So I could create a filesystem that is limited to this valid area