Date: Sun, 2 May 1999 12:08:22 +0930 From: Greg Lehey <grog@lemis.com> To: Jacques Vidrine <n@nectar.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: vinum-- resizing disks Message-ID: <19990502120821.W80561@freebie.lemis.com> In-Reply-To: <19990501210026.357911DC5@spawn.nectar.com>; from Jacques Vidrine on Sat, May 01, 1999 at 04:00:25PM -0500 References: <19990501210026.357911DC5@spawn.nectar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, 1 May 1999 at 16:00:25 -0500, Jacques Vidrine wrote: > Hi, > > After running for a couple of months with about half of my storage > space under vinum, I am happy enough with the results to wish to move > all my storage to vinum volumes. (Great work Greg!) In order to do > so, I'll need to resize the vinum disk objects, and I wonder if that > is possible. > > Each drive on my system is partitioned into a-f (for on which I have > swap and UFS filesystems), and h (which I use for vinum). e.g. > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 128520 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 7) > b: 128520 128520 swap # (Cyl. 8 - 15) > c: 17912412 0 unused 0 0 # (Cyl. 0 - 1114*) > e: 4112640 257040 4.2BSD 1024 8192 8192 # (Cyl. 16 - 271) > f: 4112640 4369680 4.2BSD 1024 8192 8192 # (Cyl. 272 - 527) > h: 9430092 8482320 vinum # (Cyl. 528 - 1114*) > > Now, I wonder can I backup partions e and f, delete them, and then resize > h to allocate the storage to vinum? e.g. I want to wind up with: > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 128520 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 7) > b: 128520 128520 swap # (Cyl. 8 - 15) > c: 17912412 0 unused 0 0 # (Cyl. 0 - 1114*) > h: 17655372 257040 vinum 1024 8192 8192 # (Cyl. 16 - 1114*) > > I imagine that I'm just going to have to back everything up and > start over, but I thought I'd ask first. Well, I can think of a way, but I can't guarantee it'll work, so it's best to do a backup first anyway. You could move the data on disk. Once you've done your backups, create the following disk label: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 128520 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 7) > b: 128520 128520 swap # (Cyl. 8 - 15) > c: 17912412 0 unused 0 0 # (Cyl. 0 - 1114*) > e: 17655372 257040 vinum # (Cyl. 16 - 1114*) > h: 9430092 8482320 vinum # (Cyl. 528 - 1114*) Then do dd if=/dev/rda1h of=/dev/rda1e to move the data. After that, you can delete partition h (and rename e to h if you want), restart Vinum, and you *may* find that you still have your information. From what I see in the code, it should automatically adapt to the bigger drive. Whatever you do, though, don't leave the overlapping Vinum partition at offset 8482320 there; Vinum will open both of them, updating the config information, and you'll end up with data corruption in the partition starting at 257040. If you try this, please let me know the outcome. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990502120821.W80561>