Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2007 14:03:08 +0100
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-questions@freebsd.org
Cc:        Jerry McAllister <jerrymc@msu.edu>, Marty Landman <martster@gmail.com>
Subject:   Re: recovery after power outage
Message-ID:  <200702071403.08184.pieter@degoeje.nl>
In-Reply-To: <70063950702061806s281130c4labc112a018c2a19e@mail.gmail.com>
References:  <70063950702061806s281130c4labc112a018c2a19e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 07 February 2007 03:06, Marty Landman wrote:
>  Jerry McAllister wrote:
> > Well, do as it says - choose a shell and run fsck manually.
>
> Heh, for starters I assumed (always a bad thing) that fsck wasn't available
> because I did a 'which fsck' and got 'which not found' as a response. But
> fsck itself is there.
>
> > Just run /sbin/fsck /dev/ad1s1c.   Actually that would be a somewhat
> > unusual address - what they call a 'dangerously dedicated' disk.
ad1s1c is a partition that contains the entire disk or slice in this case. 
Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c etc. You 
should _only_ fsck the individual partitions (ad0s1a), never the complete 
disk (ad0) or individual slices (ad0s1). You may risk destroying your 
filesystem(s) if you do so. Unless ofcourse you know what you're doing and 
you have placed a filesystem directly on either the disk or the slice it 
self.
>
> Can you explain or point me to more info on why that was a poor choice on
> my part? To explain more this is a 250 GB hard drive which is the primary
> slave and is mostly used as a data repository and shared via samba on my
> home office lan.
Your filesystem layout seems perfectly fine.
>
> > But I think fsck should be able to work through it.
>
> snip
>
> > It the manual fscks don't work, then you may have to try some
> > extreme tactics to recover things on that partition or abandon
>
> snip
>
> > If you end up rebuilding the drive, then the next time make a
> > FreeBSD slice and then make a partition within that slice to
> > avoid that 'dangerously dedicated' config.
>
> I am not getting past this error with fsck. Get 16 lines saying:
>
> ad1: FAILURE - READ_DMA status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE>
> LBA=xxx
This is not an error of fsck but an error of the ata subsystem. It says that 
something went wrong while doing disk I/O.
>
> for xxx in [191..206]
>
> then  a msg listing disk sectors that can't be read 128 through 143 and
> finally:
>
> /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused)
Yes, ad1s1c is normally not used as a filesystem, so you would better not fsck 
it.
>
> If I can recover the disk which has about 60GB's used out of 250GB and lose
> a few sectors it's really not a bad deal probably, but how do I go about
> trying at this point?
>
> Also it won't reboot now, although I've run fsck complete including on
> ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good
> boot? Unfortunately /usr isn't getting mounted and I have not editor
> available afaik.
It should not be necessary to edit /etc/fstab. However after what you've 
described above it might be necessary to restore the partition table, mbr and 
slice table to get your system booting again.
>
> Marty
If you have any more questions about the FreeBSD filesystem, please don't 
hesitate to ask.

Regards,
Pieter de Goeje



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702071403.08184.pieter>