From owner-freebsd-fs@FreeBSD.ORG Mon Apr 26 03:09:36 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4BB816A4CE for ; Mon, 26 Apr 2004 03:09:36 -0700 (PDT) Received: from mk-smarthost-3.mail.uk.tiscali.com (mk-smarthost-3.mail.uk.tiscali.com [212.74.114.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6360543D4C for ; Mon, 26 Apr 2004 03:09:36 -0700 (PDT) (envelope-from adam@otterycomputers.com) Received: from [80.43.166.27] (port=63921 helo=postman.oocltd.dom) by mk-smarthost-3.mail.uk.tiscali.com with esmtp (Exim 4.30) id 1BI33O-000Kms-N2 for freebsd-fs@freebsd.org; Mon, 26 Apr 2004 11:09:34 +0100 Received: from localhost (localhost [127.0.0.1]) by postman.oocltd.dom (Postfix) with ESMTP id D49D05F9 for ; Mon, 26 Apr 2004 11:07:21 +0100 (BST) Received: from postman.oocltd.dom ([127.0.0.1]) by localhost (postman.oocltd.dom [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 55928-01 for ; Mon, 26 Apr 2004 11:07:20 +0100 (BST) Received: from [192.168.0.250] (unknown [192.168.0.250]) by postman.oocltd.dom (Postfix) with ESMTP id 577795EB for ; Mon, 26 Apr 2004 11:07:20 +0100 (BST) From: Adam Retter To: freebsd-fs@freebsd.org Content-Type: text/plain Organization: Ottery Office and Computer Ltd. Message-Id: <1082974173.233.13.camel@wokshopbsd.oocltd.dom> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 26 Apr 2004 11:09:33 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at otterycomputers.com Subject: How to Resize FreeBSD Partition? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2004 10:09:36 -0000 I could do with some help learning how to resize my freebsd partition. Ive looked on the web and been to #freebsdhelp of EfNet but so far havent found anything usefull. My workstation has a 20GB IDE Drive (ad0) which is split like this - Partition 1 (ad0s1) = Win98-SE (FAT32) 4GB / sysid=11 Partition 2 (ad0s2) = FreeBSD 6.471 GB / sysid=165 Partition 3 (ad0s3) = WinXP-Pro (NTFS) 6GB Unpartitioned Space = 2GB My FreeBSD partition has the following labels - ad0s2a = / (126MB) ad0s2f = /tmp (252MB) ad0s2g = /usr (4.6GB) ad0s2e = /var (252MB) procfs = /proc (4.0KB) Now my question is this - 1) How can I resize the FreeBSD partition ad0s2 to incorporate the 2GB of currently unpartitioned space? 2) How can I then resize my /usr label (ad0s2g) from 4.6GB to 4.6GB+2GB=6.6GB, i.e. to use this new 2GB of space? BTW - My System is FreeBSD 4.9-RELEASE on i386. Thanks very much - Adam Retter -- Adam Retter Ottery Office and Computer Ltd. Tel: +44(0)1404 814946 Fax: +44(0)1404 811786 From owner-freebsd-fs@FreeBSD.ORG Wed Apr 28 18:23:16 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 095E416A4CE for ; Wed, 28 Apr 2004 18:23:16 -0700 (PDT) Received: from nickel.nocdirect.com (nickel.nocdirect.com [69.73.151.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E89B43D39 for ; Wed, 28 Apr 2004 18:23:15 -0700 (PDT) (envelope-from rick@lgarchitecture.com) Received: from 66-215-127-98.slo-cbi.charterpipeline.net ([66.215.127.98] helo=lga2) by nickel.nocdirect.com with asmtp (Exim 4.24) id 1BJ0GT-00066q-AP for freebsd-fs@freebsd.org; Wed, 28 Apr 2004 20:23:01 -0500 From: "Rick Richard" To: Date: Wed, 28 Apr 2004 18:23:06 -0700 Message-ID: <001701c42d88$88094e90$020aa8c0@lgarchitecture.com> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - nickel.nocdirect.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lgarchitecture.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: freebsd 5.2.1 and vinum X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2004 01:23:16 -0000 I'm having issues with FBSD 5.2.1 and vinum. =20 I have a three disks striped. Vinum crashes/panicks at startup if = allowed to automatically start. The "vinum start" command doesn't seem to read the config info off the = third disk, and it says that disk is crashed. However, if I invoke vinum with no arguments and then issue the start command, the information will be read from the third disk and It will start up fine =20 =20 Can anybody help?? =20 -Rick From owner-freebsd-fs@FreeBSD.ORG Wed Apr 28 19:03:06 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B7AC16A4CF for ; Wed, 28 Apr 2004 19:03:06 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id C175243D2F for ; Wed, 28 Apr 2004 19:03:05 -0700 (PDT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id F1D5C2BD42 for ; Thu, 29 Apr 2004 12:03:02 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 6D13651246; Thu, 29 Apr 2004 11:33:00 +0930 (CST) Date: Thu, 29 Apr 2004 11:33:00 +0930 From: Greg 'groggy' Lehey To: Rick Richard Message-ID: <20040429020300.GD80134@wantadilla.lemis.com> References: <001701c42d88$88094e90$020aa8c0@lgarchitecture.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bc2iwAtkAaXP8cWF" Content-Disposition: inline In-Reply-To: <001701c42d88$88094e90$020aa8c0@lgarchitecture.com> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-fs@freebsd.org Subject: Re: freebsd 5.2.1 and vinum X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2004 02:03:06 -0000 --bc2iwAtkAaXP8cWF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 28 April 2004 at 18:23:06 -0700, Rick Richard wrote: > I'm having issues with FBSD 5.2.1 and vinum. > > I have a three disks striped. Vinum crashes/panicks at startup if allowed > to automatically start. > > The "vinum start" command doesn't seem to read the config info off the third > disk, and it says that disk is crashed. > > However, if I invoke vinum with no arguments and then issue the start > command, the information will be read from the third disk and > > It will start up fine > > Can anybody help?? You, maybe? http://www.vinumvm.org/vinum/how-to-debug.html. Greg -- Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --bc2iwAtkAaXP8cWF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFAkGJUIubykFB6QiMRAs+kAKCopwrtUDNplDwEhrivpoYNvqT9xwCghDjW SS9y+U0kdaIiSek9xLc5BUM= =Fypx -----END PGP SIGNATURE----- --bc2iwAtkAaXP8cWF-- From owner-freebsd-fs@FreeBSD.ORG Sat May 1 23:42:01 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B557516A4CE for ; Sat, 1 May 2004 23:42:01 -0700 (PDT) Received: from mail-svr1.cs.utah.edu (mail-svr1.cs.utah.edu [155.99.198.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5842543D2D for ; Sat, 1 May 2004 23:41:59 -0700 (PDT) (envelope-from saggarwa@cs.utah.edu) Received: from faith.cs.utah.edu (faith.cs.utah.edu [155.99.198.108]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id 313B9346EB for ; Sun, 2 May 2004 00:42:00 -0600 (MDT) Received: by faith.cs.utah.edu (Postfix, from userid 4973) id 620802EC21; Sun, 2 May 2004 00:41:56 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by faith.cs.utah.edu (Postfix) with ESMTP id DB3B934406 for ; Sun, 2 May 2004 06:41:56 +0000 (UTC) Date: Sun, 2 May 2004 00:41:56 -0600 (MDT) From: Siddharth Aggarwal To: freebsd-fs@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Debugging pseudo-disk driver on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2004 06:42:01 -0000 Hi, I am working on a Copy on Write disk driver on FreeBSD where I try to save the state of a filesystem (/dev/ad0s3) to another device (/dev/ad0s4) by making a virtual device that sits on top of these two (/dev/shd0). 1. So in the strategy routine, I get the block read/write calls to (/dev/shd0) . 2. For a write operation, I copy the previous contents of the block (number corresponding to /dev/ad0s3) on to a free block on /dev/ad0s4 3. To restore previous contents of disk, I read the allocated free block from /dev/ad0s4 and write it back to original block number /dev/ad0s3. The virtual device /dev/shd0 is mounted on /mnt So to test it out, my /dev/ad0s3 originally had a file "old1" of 13685 bytes containing repeating string pattern (OLDOLD) I then copied a file "new1" of 8211 bytes having the repeating pattern (NEWNEW) to overwrite the old one i.e. cp new1 /mnt/old1 A hexdump shows that a block of 8192 bytes containing "OLDOLD" was copied over to /dev/ad0s4 and its place being taken be "NEWNEW" in /dev/ad0s3. Also remaining bytes (beyond the 8192 bytes) still remain in /dev/ad0s3. So this shows that the copy on write was done correctly. And I correctly see 8211 bytes of "NEWNEW" in /mnt/old1 (ls -l /mnt/old1) I then send an IOCTL to my driver to restore to the previous state (expecting it to give me 13685 bytes of "OLDOLD" back in /mnt/old1) After unmounting and remounting, I see that the contents of /mnt/old1 have become OLDOLD, but there are only 8211 bytes instead of 13685. A hexdump of /dev/ad0s3 however, shows that there are indeed 13685 consecutive bytes of OLDOLD lying there. This has lead me to believe that the Inode of /mnt/old1 is not being refereshed (or it was never saved off to the /dev/ad0s4 in the first place). Do Inode read/writes go through the strategy routine in the first place? Any idea what could be going wrong? Thanks. From owner-freebsd-fs@FreeBSD.ORG Sat May 1 23:50:34 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C11016A4CE for ; Sat, 1 May 2004 23:50:34 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9217343D2F for ; Sat, 1 May 2004 23:50:33 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i426oI9Y030552; Sun, 2 May 2004 08:50:19 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Siddharth Aggarwal From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 02 May 2004 00:41:56 MDT." Date: Sun, 02 May 2004 08:50:18 +0200 Message-ID: <30551.1083480618@critter.freebsd.dk> cc: freebsd-fs@freebsd.org Subject: Re: Debugging pseudo-disk driver on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2004 06:50:34 -0000 In message , Siddharth Aggarwal writes: > >Hi, > >I am working on a Copy on Write disk driver on FreeBSD where I try to save >the state of a filesystem (/dev/ad0s3) to another device (/dev/ad0s4) by >making a virtual device that sits on top of these two (/dev/shd0). Are you doing this using GEOM under FreeBSD 5 ? If not you should start doing that now. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.