bad sector/blocks and files based on it
Hi, everyone:
I found I hard disk have bas sector, i.e. sector 129668175 is
bad,
1. I want to know, which file is based on the bad sector.
2. I want to know, a file is based on which sectors, like, .vimrc
is start from sector A to sector B.
I tried use ioctl(), but it seems too sophisticated. Thank you:)
Re: bad sector/blocks and files based on it
berlinix <berlin860@gmail.com> writes:
[color=blue]
> Hi, everyone:
> I found I hard disk have bas sector, i.e. sector 129668175 is
> bad,
> 1. I want to know, which file is based on the bad sector.
> 2. I want to know, a file is based on which sectors, like, .vimrc
> is start from sector A to sector B.
> I tried use ioctl(), but it seems too sophisticated. Thank you:)[/color]
If you run fsck on an unmounted file system (DON'T DO THIS if the file
system is mounted) files that can't be fixed are placed in the
lost+found directory - usually you have to guess the name, as it bases
the name on the inode value.
I'm not sure that will help, but it can't hurt.
(The Unix file system is not in a simple format.)
Re: bad sector/blocks and files based on it
Hello,
berlinix a écrit :[color=blue]
> Hi, everyone:
> I found I hard disk have bas sector, i.e. sector 129668175 is
> bad,
> 1. I want to know, which file is based on the bad sector.
> 2. I want to know, a file is based on which sectors, like, .vimrc
> is start from sector A to sector B.[/color]
What does this have to do with Linux networking ?
Anyway, if the filesystem is ext2/ext3, debugfs may help.