From owner-freebsd-questions@FreeBSD.ORG Fri Jan 10 15:27:15 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F1E092E for ; Fri, 10 Jan 2014 15:27:15 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C086514F2 for ; Fri, 10 Jan 2014 15:27:14 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W1dzF-0006GA-Th for freebsd-questions@freebsd.org; Fri, 10 Jan 2014 16:27:05 +0100 Received: from pool-173-79-82-127.washdc.fios.verizon.net ([173.79.82.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jan 2014 16:27:05 +0100 Received: from nightrecon by pool-173-79-82-127.washdc.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jan 2014 16:27:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Subject: Re: Server hang : fsck Date: Fri, 10 Jan 2014 10:26:52 -0500 Lines: 71 Message-ID: References: <20140109131515.fdf53ef6.freebsd@edvax.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-173-79-82-127.washdc.fios.verizon.net User-Agent: KNode/4.12 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: nightrecon@hotmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 15:27:15 -0000 eras mus wrote: [...] > > As advice by Polytropon burnt alive CD And ran fsck manually. > # fsck -yfv /dev/ad4s1a > # fsck -yfv /dev/ad4s1d > > are successful. > But when ran > # fsck -yfv /dev/ad4s1e > > It was messages as in > > http://picpaste.com/img3-It4JOaph.jpg > I suspect what you may be experiencing is magnetic media failure on your drive, which means it will need to be replaced with a new one. This can be verified by using the drive manufacturers diagnostic utility. The bulk of my experience around IDE/Sata drives is largely centered on Western Digital. They have a utility called WD Diags, which can be found in a bootable .iso form which I have on an old CD-RW disk. When run there is a 'Quick' test and a more thorough in-depth longer one. The 'Quick' test is non-destructive, but will show you an error if there is a problem with the drive. The long test can sometimes repair a disk, but this depends on the drive's remap area being not full. Even though once I have observed a long test fix a drive and not destroy data, it is expected that the long test will wipe the drive. The remap zone is a space on the drive that it uses to map out bad sectors as they develop over time. When this space fills bad sectors cannot be mapped out any longer and it is time to buy a new drive. I would hesitate to simply use dump to backup this drive with the idea of using restore to copy everything over to a new drive. Should you try it and there is defective media you will find dump will stop when it hits the bad spot(s). Your bits are probably already in a damaged state. No amount of softwares like fsck can fix the underlying problem which is that the hardware needs to be replaced. If this is truly the case, the manufacturers utility can/will confirm. If this is a case of bad media and the drive is up for replacement I would concentrate on preserving copies of all configuration information. This will enable you to put in a new drive and manually configure everything in the new install the same way as the old. Much of this is /etc, and /usr/local/etc, where /etc will have the base OS's config while /usr/local/etc has all configs for installed third-party applications. There is also /var/db/pkg which contains pkg info for installed apps, and /var/db/ports which holds build config options for ports you have installed. If the system is very old and you are making a jump from let's say version 6.2 to something like 9.2 release you would only refer to the options for hints on how to proceed; the ports have changed so much that you can't just simply copy the /var/db/ports directory over. If the system was the same, e.g. if the old machine had 9.2 and you were just putting it back to a new drive you could just copy. In a case where the magnetic media in the drive has, or is failing, I would look towards starting over with a fresh install with the new drive. If you had _known_ good backups from the drive which were not so old as to be extremely out of date I would just restore these to the new drive. If you do not, and you have bad spots on the drive you'll find it's too late for that - dump will error out when it hits the bad spots. A fresh install is a lot of keyboard time but at the end you get back what you had if you have preserved all the old configuration details. Confirm the problem is media going bad, or already has gone bad using the mfr's diagnostic utility. This will point you in the direction you need to go if such is actually the case. (Bad media simply cannot be fixed with things like fsck) -Mike