Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-12-2007, 05:10 PM   #1
LQ Newbie
Registered: Apr 2007
Posts: 2

Rep: Reputation: 0
how to map a physical disk block to a file

IHAC who has a system running RHEL 4 with a direct attached raid array. Recently a disk failed in the array. I replaced the drive, but the rebuild failed halfway through. The reason the rebuild failed was because another drive in the lun has some bad blocks. I've identified the bad blocks, but need a way to map these blocks to a particular file(s) so I can remove it/them and rebuild the array without any corruption and minimal data loss. Is there an easy way to map a physical disk block to a file? The file system is EXT3 and the luns are mounted using the device path (/dev/sde1). There are no LVMs.
Old 04-12-2007, 06:30 PM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
I would probably take the approach of taking the computer off line, making a fresh backup, destroy the RAID configuration and recreate it with the new disk, then restore from the backup. I know that a hot swap and RAID rebuild is nice but if I ran into any problems using that approach I would do what I said above. Sometimes it's quicker to take the long road right away.
Old 04-12-2007, 09:06 PM   #3
LQ Newbie
Registered: Apr 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Yea that was another option. Doing a back up of the file system. Any files contained in the bad blocks will break the back up, but we can work around those files and then start over from scratch with that lun. Thanks for the tip :-)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any threat from hard disk having physical bad sectors ??? b0nd Linux - Hardware 3 06-23-2006 12:08 AM
Linking a file on disk to a fake block device? fyhuang Linux - Software 2 10-31-2005 07:23 AM
SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db? singying304 Linux - Networking 4 02-28-2005 06:49 AM
Determine physical disk size Kristijan Linux - General 4 01-23-2005 05:56 PM
Installing on more than one physical disk Squiddy Slackware 5 11-02-2003 11:50 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration