LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to map a physical disk block to a file (http://www.linuxquestions.org/questions/linux-general-1/how-to-map-a-physical-disk-block-to-a-file-545568/)

squarecmb 04-12-2007 06:10 PM

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.

stress_junkie 04-12-2007 07:30 PM

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.

squarecmb 04-12-2007 10:06 PM

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 :-)


All times are GMT -5. The time now is 09:36 AM.