- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Mounting a disk with bad sectors
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 10:48 PM
09-13-2001 10:48 PM
if have the problem, that i have a disk with one bad sector. fsck does not set the disk state to clean because of this bad sector. But an unchecked disk may not be mounted, even not read only. What's to do, to preserve the data on that disk?
Cheers
Rainer
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 11:07 PM
09-13-2001 11:07 PM
Re: Mounting a disk with bad sectors
You can try pvmove command.
pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d0
/dev/dsk/c2t0d0
See man pages pg pvmove for more details
Best of luck
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 11:16 PM
09-13-2001 11:16 PM
Solutionpvmove wont work either, it will fail with an I/O error. Same for dd. Im afraid there is no way to recover the data easily. The only way around a bad block is to mediainit the disk, newfs it and reload your data.
Saying that however, you may be able to recover some of the data. Try a dd if=/dev/vgXX/rlvolYY to a new lvol youve created and see how many blocks copy before the dd errors.
eg.
dd if=/dev/vgXX/rlvolYY of=/dev/vgNEW/rlvolNEW bs=1024k
Lets say dd reports;
I/O error
100+blocks in
So, in this example it copied 100 blocks (x1MB=100MB) before it errored. So if you recreate your new lvol to 100MB and only dd the 100MB before you get the error you may be able to salvage 100MB of data, eg;
dd if=/dev/vgXX/rlvolYY of=/dev/vgNEW/rlvolNEW bs=1024k count=100
Then you should be able to fsck and mount the new lvol. You can then try the same for the blocks after the error. Eg. error at 100MB, your lvol is 200MB, now copy blocks 101-200 (dd if=/dev/vgXX/rlvolYY of=/dev/vgNEW/rlvolNEW2 bs=1024k count=99 skip=101)
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2001 03:31 AM
09-14-2001 03:31 AM
Re: Mounting a disk with bad sectors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2001 01:12 PM
09-14-2001 01:12 PM
Re: Mounting a disk with bad sectors
you will have to block-copy that file-system's LVOL
to a working, "sane" one of at least the same size,
to be able to do the "fsck" there.
"dd" usually breaks upon the first bad block, but you
can tell it to continue starting one block "later" on
source and on target LVOLs:
dd if=/dev/vgXX/lvBAD of=/dev/vgYY/lvGOOD skip=xxx seek=xxx bs=1k # bs=1k for JFS,bs=8k for HFS
where "xxx" would be "0" on the first attempt, then,
after aborting, "xxx" has to be ONE BIGGER than the
number where it stopped!
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2001 02:24 PM
09-14-2001 02:24 PM
Re: Mounting a disk with bad sectors
The bad spot is going to cause a lot of problems and getting the data off successfully may require a professional service like OnTrack. Be prepared to weigh the value of your data (sounds like it was never backed up) versus the cost of a data recovery service. The cost could be as much as an entire computer.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2001 07:28 AM
09-17-2001 07:28 AM
Re: Mounting a disk with bad sectors
Under Solaris you can use the format command to mark disk sectors as bad. Afterwards you must use fsck to bring the filesystem in clean state. Is there anything similar for HP-UX?
Rainer