Where am I hitting the invisible SD card cache?2019 Community Moderator ElectionOptimal Linux Distro to Install to SD card to use as USB-Bootloader for PC?Linux support for new Sony Vaio Z external graphics card?Udev triggers are not firing on insert of CF card into USB card reader (anymore)Mount an SD card over USB?Set PERM_WRITE_PROTECT on an SD cardReduce cache size of flash storage deviceswhat's the difference between page cache and buffer cache?How to know which user agent is hitting my server?Where to set kernelns buffer/cache sizeWhere does kernel define the SD card naming index?
When is "ei" a diphthong?
What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?
Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?
Would a primitive species be able to learn English from reading books alone?
What does "tick" mean in this sentence?
How were servants to the Kaiser of Imperial Germany treated and where may I find more information on them
Why does a 97 / 92 key piano exist by Bösendorfer?
Echo with obfuscation
Why do Radio Buttons not fill the entire outer circle?
How can I safely use "Thalidomide" in my novel while respecting the trademark?
Do I have to know the General Relativity theory to understand the concept of inertial frame?
Why is the Sun approximated as a black body at ~ 5800 K?
Personal or impersonal in a technical resume
Integral Notations in Quantum Mechanics
What is this high flying aircraft over Pennsylvania?
Should I warn new/prospective PhD Student that supervisor is terrible?
Deciphering cause of death?
In One Punch Man, is King actually weak?
Do I have to take mana from my deck or hand when tapping a dual land?
Should I assume I have passed probation?
Pre-Employment Background Check With Consent For Future Checks
How would a solely written language work mechanically
How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?
Is there anyway, I can have two passwords for my wi-fi
Where am I hitting the invisible SD card cache?
2019 Community Moderator ElectionOptimal Linux Distro to Install to SD card to use as USB-Bootloader for PC?Linux support for new Sony Vaio Z external graphics card?Udev triggers are not firing on insert of CF card into USB card reader (anymore)Mount an SD card over USB?Set PERM_WRITE_PROTECT on an SD cardReduce cache size of flash storage deviceswhat's the difference between page cache and buffer cache?How to know which user agent is hitting my server?Where to set kernelns buffer/cache sizeWhere does kernel define the SD card naming index?
I'm trying to clear an SD card connected via a USB dongle.
Here's what I do:
# dd if=/dev/zero of=/dev/sdb bs=$((1024*4))
dd: error writing '/dev/sdb': No space left on device
1002267+0 records in
1002266+0 records out
4105281536 bytes (4.1 GB, 3.8 GiB) copied, 2.10549 s, 1.9 GB/s
The weird things I see are: This is an SD HC I card, so the transfer should never reach 1.9GB/s. The card is 16GB and correctly reports as such in dmesg
.
Ok, let's check it's written:
# head -c 4105281536 /dev/zero | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
(reverse-i-search)`': ^C
# head -c 4105281536 /dev/sdb | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
Seems ok. But when I plug is out and in again, it magically has the same filesystem available as before.
When I mount them and change the files, the modification is also persisted, even though the sha1sum
still shows it as zeros.
The device is definitely /dev/sdb
:
[ 9895.437518] scsi 4:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0 CCS
[ 9895.439248] sd 4:0:0:0: [sdb] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 9895.439398] sd 4:0:0:0: [sdb] Write Protect is off
[ 9895.439404] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 9895.439557] sd 4:0:0:0: [sdb] No Caching mode page found
[ 9895.439564] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 9895.441922] sdb: sdb1 sdb2
[ 9895.443517] sd 4:0:0:0: [sdb] Attached SCSI removable disk
What's happening here?
Running on kernel 4.20.3
.
linux usb removable-storage
add a comment |
I'm trying to clear an SD card connected via a USB dongle.
Here's what I do:
# dd if=/dev/zero of=/dev/sdb bs=$((1024*4))
dd: error writing '/dev/sdb': No space left on device
1002267+0 records in
1002266+0 records out
4105281536 bytes (4.1 GB, 3.8 GiB) copied, 2.10549 s, 1.9 GB/s
The weird things I see are: This is an SD HC I card, so the transfer should never reach 1.9GB/s. The card is 16GB and correctly reports as such in dmesg
.
Ok, let's check it's written:
# head -c 4105281536 /dev/zero | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
(reverse-i-search)`': ^C
# head -c 4105281536 /dev/sdb | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
Seems ok. But when I plug is out and in again, it magically has the same filesystem available as before.
When I mount them and change the files, the modification is also persisted, even though the sha1sum
still shows it as zeros.
The device is definitely /dev/sdb
:
[ 9895.437518] scsi 4:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0 CCS
[ 9895.439248] sd 4:0:0:0: [sdb] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 9895.439398] sd 4:0:0:0: [sdb] Write Protect is off
[ 9895.439404] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 9895.439557] sd 4:0:0:0: [sdb] No Caching mode page found
[ 9895.439564] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 9895.441922] sdb: sdb1 sdb2
[ 9895.443517] sd 4:0:0:0: [sdb] Attached SCSI removable disk
What's happening here?
Running on kernel 4.20.3
.
linux usb removable-storage
add a comment |
I'm trying to clear an SD card connected via a USB dongle.
Here's what I do:
# dd if=/dev/zero of=/dev/sdb bs=$((1024*4))
dd: error writing '/dev/sdb': No space left on device
1002267+0 records in
1002266+0 records out
4105281536 bytes (4.1 GB, 3.8 GiB) copied, 2.10549 s, 1.9 GB/s
The weird things I see are: This is an SD HC I card, so the transfer should never reach 1.9GB/s. The card is 16GB and correctly reports as such in dmesg
.
Ok, let's check it's written:
# head -c 4105281536 /dev/zero | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
(reverse-i-search)`': ^C
# head -c 4105281536 /dev/sdb | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
Seems ok. But when I plug is out and in again, it magically has the same filesystem available as before.
When I mount them and change the files, the modification is also persisted, even though the sha1sum
still shows it as zeros.
The device is definitely /dev/sdb
:
[ 9895.437518] scsi 4:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0 CCS
[ 9895.439248] sd 4:0:0:0: [sdb] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 9895.439398] sd 4:0:0:0: [sdb] Write Protect is off
[ 9895.439404] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 9895.439557] sd 4:0:0:0: [sdb] No Caching mode page found
[ 9895.439564] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 9895.441922] sdb: sdb1 sdb2
[ 9895.443517] sd 4:0:0:0: [sdb] Attached SCSI removable disk
What's happening here?
Running on kernel 4.20.3
.
linux usb removable-storage
I'm trying to clear an SD card connected via a USB dongle.
Here's what I do:
# dd if=/dev/zero of=/dev/sdb bs=$((1024*4))
dd: error writing '/dev/sdb': No space left on device
1002267+0 records in
1002266+0 records out
4105281536 bytes (4.1 GB, 3.8 GiB) copied, 2.10549 s, 1.9 GB/s
The weird things I see are: This is an SD HC I card, so the transfer should never reach 1.9GB/s. The card is 16GB and correctly reports as such in dmesg
.
Ok, let's check it's written:
# head -c 4105281536 /dev/zero | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
(reverse-i-search)`': ^C
# head -c 4105281536 /dev/sdb | sha1sum
a1750724bfbf0ada57d986f16b26e789a6c61a1d -
Seems ok. But when I plug is out and in again, it magically has the same filesystem available as before.
When I mount them and change the files, the modification is also persisted, even though the sha1sum
still shows it as zeros.
The device is definitely /dev/sdb
:
[ 9895.437518] scsi 4:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0 CCS
[ 9895.439248] sd 4:0:0:0: [sdb] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 9895.439398] sd 4:0:0:0: [sdb] Write Protect is off
[ 9895.439404] sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 9895.439557] sd 4:0:0:0: [sdb] No Caching mode page found
[ 9895.439564] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 9895.441922] sdb: sdb1 sdb2
[ 9895.443517] sd 4:0:0:0: [sdb] Attached SCSI removable disk
What's happening here?
Running on kernel 4.20.3
.
linux usb removable-storage
linux usb removable-storage
asked 20 hours ago
viraptorviraptor
1927
1927
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I notice dd
it only copies 3.8 GiB when the drive is 14.5 GiB. So what you're writing to is most likely not the sd card. Unplug the SD card and then check ls -lh /dev/sdb
.
I suspect you have accidentally created a regular file on /dev
called /dev/sdb
. Since /dev
is a ram disk it explains why you can write to it at 2GBps
When you've finished your dd
command, remember to sync
just in case. This will tell the kernel to flush any cache it has.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507388%2fwhere-am-i-hitting-the-invisible-sd-card-cache%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I notice dd
it only copies 3.8 GiB when the drive is 14.5 GiB. So what you're writing to is most likely not the sd card. Unplug the SD card and then check ls -lh /dev/sdb
.
I suspect you have accidentally created a regular file on /dev
called /dev/sdb
. Since /dev
is a ram disk it explains why you can write to it at 2GBps
When you've finished your dd
command, remember to sync
just in case. This will tell the kernel to flush any cache it has.
add a comment |
I notice dd
it only copies 3.8 GiB when the drive is 14.5 GiB. So what you're writing to is most likely not the sd card. Unplug the SD card and then check ls -lh /dev/sdb
.
I suspect you have accidentally created a regular file on /dev
called /dev/sdb
. Since /dev
is a ram disk it explains why you can write to it at 2GBps
When you've finished your dd
command, remember to sync
just in case. This will tell the kernel to flush any cache it has.
add a comment |
I notice dd
it only copies 3.8 GiB when the drive is 14.5 GiB. So what you're writing to is most likely not the sd card. Unplug the SD card and then check ls -lh /dev/sdb
.
I suspect you have accidentally created a regular file on /dev
called /dev/sdb
. Since /dev
is a ram disk it explains why you can write to it at 2GBps
When you've finished your dd
command, remember to sync
just in case. This will tell the kernel to flush any cache it has.
I notice dd
it only copies 3.8 GiB when the drive is 14.5 GiB. So what you're writing to is most likely not the sd card. Unplug the SD card and then check ls -lh /dev/sdb
.
I suspect you have accidentally created a regular file on /dev
called /dev/sdb
. Since /dev
is a ram disk it explains why you can write to it at 2GBps
When you've finished your dd
command, remember to sync
just in case. This will tell the kernel to flush any cache it has.
answered 16 hours ago
Philip CoulingPhilip Couling
1,964920
1,964920
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507388%2fwhere-am-i-hitting-the-invisible-sd-card-cache%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown