From owner-freebsd-arch@FreeBSD.ORG Mon Jun 26 13:11:30 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A06D16A47C; Mon, 26 Jun 2006 13:11:30 +0000 (UTC) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29B5D447DC; Mon, 26 Jun 2006 12:51:11 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k5QCok8l089008; Mon, 26 Jun 2006 15:50:46 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Date: Mon, 26 Jun 2006 15:50:46 +0300 (EEST) From: Dmitry Pryanishnikov To: Pawel Jakub Dawidek In-Reply-To: <20060626113705.GC12511@garage.freebsd.pl> Message-ID: <20060626154144.D47547@atlantis.atlantis.dp.ua> References: <20060626095250.GB12511@garage.freebsd.pl> <46189.1151320862@critter.freebsd.dk> <20060626113705.GC12511@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Poul-Henning Kamp , John-Mark Gurney , freebsd-arch@freebsd.org Subject: Re: Accessing disks via their serial numbers. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 13:11:30 -0000 Hello! On Mon, 26 Jun 2006, Pawel Jakub Dawidek wrote: >>>> When is it not acceptable ? >>> >>> When last sector is already occupied. >> >> And what is last sector occupied by ? > > This is simlar situation to the most common problem with gmirror(8). > When people decide to put their file system onto a mirror, it will eat > partition's last sector, which isn't always safe. > When disk is already partitioned and file systems are there, you cannot > just take the last sector. I'm repeating my recent post to -current, just for the record... Actually, there IS the way to tell whether the last sector is in use on UFS, and reserve it from futher use by FS. It's badsect(8). Just declare the last sector as bad, and then (if badsect has succeeded == sector isn't in FS's critical area) fsck will tell you whether this sector is free or is it used by another file. In the last case, fsck will tell you what file uses this sector (== multiple allocation in this file and in the just created BAD/xxx file) so you can just copy it's contents to another place and then remove it while keeping BAD/xxx. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE