D
D
DmitryKoterov2012-05-25 16:26:17
linux
DmitryKoterov, 2012-05-25 16:26:17

Is a block and a sector the same thing, or are they different things?

I noticed a repeated line in the logs:

May 25 09:28:31 host kernel: end_request: I/O error, dev sda, sector 598589956
May 25 13:58:15 host kernel: end_request: I/O error, dev sda, sector 598589956

After rebuilding the raid (which, by the way, went without errors), I ran fsck, it fixed something (visually it was like a file in which ls gave questions in the type field, and it was not readable - after fsck the file disappeared).

At the same time, there are only 478142528 blocks on the disk (as /proc/mdstat says).

So I think: the sector number (598 589 956) is greater than the total blocks on the disk (478 142 528). What would that mean? Maybe just some kind of broken file was formed on the partition that referred "outside" the disk, because of this the error arose? (Problems started after the light flickered.)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
Nickel3000, 2012-05-25
@Nickel3000

The minimum addressable area is a sector, at least 512 bytes, now more often 4096 bytes. This is a physical unit. There can be several sectors in a block, which are transmitted as one logical unit. In the first case, the address is set by the number of the head, track and sector, and in the second, the address is logical, the HDD controller handles the processing, and the transfer rate will seem to be higher.
I'm writing from memory, it used to be something like this.
Good topic for an article, by the way. I think it would be interesting for many to read, given the nuances of different methods of writing to screws, to consider flash drives, various file systems ...

B
barker, 2012-05-25
@barker

A block is one or more sectors.

T
tyderh, 2012-05-25
@tyderh

If I remember correctly, a block is the concept of a file system, and a sector is the concept of a hard disk

E
eaa, 2012-05-25
@eaa

You can learn about file system blocks (if it is ext2/3/4) like this: PS
sudo tune2fs -l /dev/sda1 | grep -i block
will tell you about sectors .
sudo fdisk -l /dev/sda
the name of the device as you podstvte.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question