Date: Fri, 25 Oct 2002 01:48:15 -0700 From: "Drew Tomlinson" <drew@mykitchentable.net> To: "Drew Tomlinson" <drew@mykitchentable.net>, <questions@freebsd.org>, "Greg 'groggy' Lehey" <grog@FreeBSD.org>, "Kirk Strauser" <kirk@strauser.com>, "Joan Picanyol" <lists-freebsd-questions@biaix.org>, "Jerry McAllister" <jerrymc@clunix.cl.msu.edu>, "Pietralla, Siegfried P" <siegfried.pietralla@eds.com> Subject: Re: Vinum - A Way to Create Without Losing Data - SOLVED Message-ID: <00b901c27c03$420057a0$0301a8c0@bigdaddy> References: <009801c2789c$2f9ee910$0301a8c0@bigdaddy> <003a01c27916$1efeed60$6e2a6ba5@TAGALONG>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Drew Tomlinson" <drew@mykitchentable.net> Sent: Monday, October 21, 2002 7:39 AM > ----- Original Message ----- > From: "Drew Tomlinson" <drew@mykitchentable.net> > Sent: Sunday, October 20, 2002 5:52 PM > > > >From what I've read, it appears that if I create a concatenated > volume > > using vinum or ccd, I will destroy whatever data I already have on > the > > disks. Is this correct? Is there anyway to do it without > destroying > > the data? I have one 80G archive drive and have filled it. I added > > another and would like to have both drives seen by the system as one > > 160G drive. > > > Thanks for all of your responses. The (almost) full 80G archive drive > does not contain any system files (just mp3s, video clips, etc.) and > my additional 80G drive is new with no data. Thus, I've concluded that > creating a vinum volume on the empty disk, copying the contents of the > old to the new, and then adding the old disk to the vinum volume is > the best way to go. I'm happy to report that I have accomplished the above successfully with a little help from the list. I documented the steps I took and thought others might benefit as well. So here is my "10 Step Method to Expand a Filesystem Using Vinum". Please feel free to point out any unnecessary steps or more efficient ways complete this task. Step 1: I used /stand/sysinstall to fdisk ad1 (the new disk). Because I do not intend to use this disk for anything else, I created one slice in "dangerously dedicated" mode. In other words, I answered "No" to the true partition entry question. Step 2: I used "disklabel -e ad1" and created a partition for vinum. I just copied the c: entry and appended it. Then I edited the new line like so: # size offset fstype [fsize bsize bps/cpg] c: 156301488 0 unused 0 0 # (Cyl. 0 - 9729*) h: 156301488 0 vinum # (Cyl. 0 - 9729*) Step 3: I created a vinum config file to create a volume using ad1. Here's the config file: drive ftp1 device /dev/ad1s1h volume ftp plex org concat sd length 0 drive ftp1 Note that "sd length 0" means to use all available space on the drive. Step 4: Create the vinum volume by using "vinum create /your/config/file": 1 drives: D ftp1 State: up Device /dev/ad1s1h Avail: 0/76319 MB (0%) 1 volumes: V ftp State: up Plexes: 1 Size: 74 GB 1 plexes: P ftp.p0 C State: up Subdisks: 2 Size: 74 GB 1 subdisks: S ftp.p0.s0 State: up PO: 0 B Size: 74 GB Step 5: Create the new filesystem by using "newfs /dev/vinum/ftp" Mount the file system after it's created (I mounted to /mnt). Step 6: Copy the contents of ad0 (the original drive mounted at /ftp) to /dev/vinum/ftp using "cp -Rp /ftp /mnt". Wait long time. :) Step 7: Once I was sure the data was copied, I used "disklabel -e ad0" create a vinum partition on ad0. WARNING!!! Once you write the new disklabel, all data is destroyed on the partition! Be sure you are satisfied with your copy in step 6. Step 8: Create vinum config file to add ad0 drive and additional subdisk to existing plex. Here is my config: drive ftp0 device /dev/ad0s1h subdisk length 0 plex ftp.p0 drive ftp0 Step 9: Add the above config to vinum using the create command. 2 drives: D ftp1 State: up Device /dev/ad1s1h Avail: 0/76319 MB (0%) D ftp0 State: up Device /dev/ad0s1h Avail: 0/76319 MB (0%) 1 volumes: V ftp State: up Plexes: 1 Size: 74 GB 1 plexes: P ftp.p0 C State: corrupt Subdisks: 2 Size: 74 GB 2 subdisks: S ftp.p0.s0 State: up PO: 0 B Size: 74 GB S ftp.p0.s1 State: empty PO: 74 GB Size: 74 GB Notice the plex state "corrupt" and the new subdisk state "empty". I didn't know exactly what to do so I tried just stopping the subdisk with "vinum stop ftp.p0.s1". It's state changed to "down" and the plex state changed to "up". Next I started the down subdisk and everything came together. 2 drives: D ftp1 State: up Device /dev/ad1s1h Avail: 0/76319 MB (0%) D ftp0 State: up Device /dev/ad0s1h Avail: 0/76319 MB (0%) 1 volumes: V ftp State: up Plexes: 1 Size: 149 GB 1 plexes: P ftp.p0 C State: up Subdisks: 2 Size: 149 GB 2 subdisks: S ftp.p0.s0 State: up PO: 0 B Size: 74 GB S ftp.p0.s1 State: up PO: 74 GB Size: 74 GB Step 10: Use growfs to extend the filesystem by issuing "growfs /dev/vinum/ftp". When complete, I verified the filesystem with fsck and everything was OK. Mount your new filesystem and voila! 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?00b901c27c03$420057a0$0301a8c0>