Hardware Reference
In-Depth Information
The SD card soft error rate is much lower than a magnetic disk drive. In the rare case
when errors are discovered, the last line of defense is a correcting ECC, which allows for
data recovery. These errors are corrected in the media to prevent future unrecoverable
errors. All of this activity is transparent to the host.
Raspbian Block Size
The block size used by the operating system may be a multiple of the media's sector size.
To determine the physical block size used under Raspbian, we first discover how the root
file system is mounted (the following listing has been trimmed with ellipses):
$ mount
/dev/root on/type ext4 (rw, noatime, . . . )
. . .
/dev/mmcblk0p1 on/boot type vfat (rw, relatime , . . . )
$
From this we deduce that the device used for the root file system is /dev/root . The
pathname given is a symbolic link, so we need to determine the real device pathname:
$ ls −dl /dev/root
lrwxrwxrwx 1 root root 9 Jan 12 19:33/dev/root −> mmcblk0p2
$
From this, we deduce that the actual device pathname is /dev/mmcblk0p2 . The
naming convention used tells us the following:
Component
Name
Number
Type
Prefix
/dev/mmcblk
MMC block
Device number
0
0
Partition number
p2
2
From the earlier mount command output, notice that the /boot file system was
mounted on /dev/mmcblk0p1 . (No symbolic link was used in this case.) From this we
understand that the /boot file system is from partition 1 of the same SD card device.
Using the root device information, we consult the /sys pseudo file system to find out
the physical sector size. Here we supply mmcblk0 as the third-level pathname qualifier to
query the device:
$ cat /sys/block/mmcblk0/queue/physical_block_size
512
$ cat /sys/block/mmcblk0/queue/logical_block_size
512
$
 
 
Search WWH ::




Custom Search