From owner-freebsd-questions Fri Jan 8 12:06:44 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA17605 for freebsd-questions-outgoing; Fri, 8 Jan 1999 12:06:44 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from newmail.scitec.com (newmail.scitec.com [198.138.228.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA17594 for ; Fri, 8 Jan 1999 12:06:42 -0800 (PST) (envelope-from postman@newmail.scitec.com) Received: (from postman@localhost) by newmail.scitec.com (8.8.8/8.8.8) id PAA07025; Fri, 8 Jan 1999 15:07:53 -0500 (EST) (envelope-from postman) From: Postman Message-Id: <199901082007.PAA07025@newmail.scitec.com> Subject: Repartitioning To: freebsd-questions@FreeBSD.ORG Date: Fri, 8 Jan 1999 15:07:52 -0500 (EST) Cc: cjc@newmail.scitec.com Reply-To: cjc@scitec.com Organization: SciTec, Inc. X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have FreeBSD living in 1 GB. I have a root, usr, and var filesystem. Unfortunately, my clairvoyance failed me the day I installed and my partitions are not idealing dividing the available space. The usr partition is esentially full and var has lots of unused space. My plan is to split var into a 'home' and new var partition. var is small enough that I can temporarily save it in the root directory. I think I know how to do this, but I wanted to pass my plan past the mail list before I lose all my data through some small oversight. My plan is to: 1) Copy the old /var to its temporary space keeping the time where I have no /var to a minimum. root# mkdir /var_new root# cp -Rp /var /var_new root# umount /var root# rmdir /var root# mv /var_new /var 2) Rewrite the disklabel (scary part). This has to be done right! To ensure that, this is the file I will give to disklabel. Please let me know if there are mistakes. root# more newlabel # /dev/rwd0c: type: ESDI disk: wd0s2 label: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 128 sectors/cylinder: 8064 cylinders: 266 sectors/unit: 2145024 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 65536 0 4.2BSD 0 0 0 # (Cyl. 0 - 8*) b: 262144 65536 swap # (Cyl. 8*- 40*) c: 2145024 0 unused 0 0 # (Cyl. 0 - 265) # Old entry: # e: 614400 327680 4.2BSD 0 0 0 # (Cyl. 40*- 116*) f: 1202944 942080 4.2BSD 0 0 0 # (Cyl. 116*- 265*) # New entries: e: 38400 327680 4.2BSD 0 0 0 # (Cyl. 40*- ???*) g: 576000 366080 4.2BSD 0 0 0 # (Cyl. ??? - 265) root# disklabel -R -r wd0 newlabel 3) OK, now the above was scary because if it is messed up, this next step will be disasterous. Put file systems on the new partitions. root# newfs /dev/wd0s2e root# newfs /dev/wd0s2g 4) Now move back /var. root# mv /var /var_tmp root# mkdir /var root# mount /var root# cp -Rp /var_tmp /var 5) That is all of the critical stuff. I'll use the same procedure to move /home and then update /etc/fstab. OK, so what am I missing? What did I screw up? Or where am I totally off base? Thanks. PS: Since I am going to be rewriting my disklabel, is there anything else that's nice to have that's not there? Specifically, should I give the volume a label? -- Crist J. Clark postman@scitec.com SciTec, Inc E-Mail Administrator To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message