freebsd - How to find which file is affected by fsck error? - Unix & Linux Stack Exchange
You need to fix your /etc/fstab. While it contains entries telling the OS that it should find and mount /dev/md and /dev/sde1 on boot, the OS won't be happy . have block numbers relative to the start of the device, you will have to subtract the block number of the start of the partition. The size of a. Running fsck on a freeBSD ufs file system yield some block and sector errors. How can I find the bad/broken files that fsck didn't succeed to repair? However, errors like this can be a sign of a failing disk. Drive errors/superblock problem? Is there a relationship between the words "night" and "eight"?.
Your data are much more valuable. Though robust, problems can occur. The purpose of this document is to review the recovery process when a disk is missing or damaged, and then apply that process to plausible examples.
When a disk is accidentally removed or damaged in some way that adversely affects the logical volume, the general recovery process is: A disk belonging to a logical volume group is removed from the server The LVM meta data is damaged or corrupted One disk in a multi-disk volume group has been permanently removed This article discusses how to restore the LVM meta data.
This is a risky proposition. If you restore invalid information, you can loose all the data on the LVM device. An important part of LVM recovery is having backups of the meta data to begin with, and knowing how it's supposed to look when everything is running smoothly. Backup these directories regularly, and be familiar with their contents. You should also manually backup the LVM meta data with vgcfgbackup before starting any maintenance projects on your LVM volumes.
The examples will use a volume group called "sales" with a linear logical volume called "reports".
The logical volume and it's mount point are shown below. You will need to substitute your mount points and volume names as needed to match your specific environment.
Recovery of LVM partitions
The first thing you may notice when the server boots are messages like: So the recovery is to just put the disk back. If this procedure does not work, then you may have corrupt LVM meta data. The goal is to recover the LVM volume, and then check file system integrity. Attempting to activate the volume group gives the following: Checksum error Couldn't read volume group metadata.
Volume group sales metadata is inconsistent Volume group for uuid not found: In fact, only three bytes were overwritten.
Since only a portion of the meta data was damaged, LVM can compare it's internal check sum against the meta data on the device and know it's wrong. There is enough meta data for LVM to know that the "sales" volume group and devices exit, but are unreadable. Since the disk was never removed, leave it as is. I'm not sure how to parse this output, but two things pop to my eyes: SMART overall-health self-assessment test result: And how should I proceed? Filesystem verify or repair failed Underlying error: Exec format error And fsck: So, how bad are these error messages?
fsck --> Bad Super Block: Magic Number Wrong - Hewlett Packard Enterprise Community
Is the drive toast? I played a bit more with smartctl and it seems to me but please confirm!! Mon Jan 27 Drive failure expected in less than 24 hours. See vendor-specific Attribute list for failed Attributes.
fsck reports "BAD SUPER BLOCK" when an alternate super block is specified.
Offline data collection status: Auto Offline Data Collection: Total time to complete Offline data collection: Offline data collection capabilities: Suspend Offline collection upon new command.
Offline surface scan supported. No Conveyance Self-test supported.
General Purpose Logging supported. Short self-test routine recommended polling time: Extended self-test routine recommended polling time: SCT Feature Control supported. SCT Data Table supported. So my only hope to rescue any data would be to get myself a bigger hard-disk and make a bit-for-bit copy of the failing drive using dd or ddrescueand then play with photorec on the resulting image. Any other ideas most welcome! As inquired in Recovering data from a damaged hard-drive: About a week ago I foolishly ran testdisk on the disk for a night after a couple of native Mac OS X fsck attemptsand the damage likely became worse than it had been when the owner simply had dropped it.
At the end of the testdisk session I was clearly hearing a clicking noise " click of death "?