LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 03-11-2004, 11:09 PM   #1
hypodermic
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Rep: Reputation: 0
Change disk label sizes?


Okay, so in the last couple of days I've been in a rush to put together my new machines, install FreeBSD on both of them for the first time in my life, and get them down to my colo place.. Well, one is entirely for my database, meaning I should have a large /var space set.. It totally slipped my mind even though I completely intended on making it large.

Now my machines are down at the colo, and I can't switch the database over to the new machine because it says my space on /var is filled up.. Is there anyway to switch it so that /var has a ton of space instead of /usr remotely? Or am I completely screwed all the way around and will have to make a trip down to the colo and perhaps even reinstall everything?

(I'm on FreeBSD 5.0)

Last edited by hypodermic; 03-11-2004 at 11:24 PM.
 
Old 03-11-2004, 11:28 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well, if you have enough free space on another partition you could cp -Rp the contents of /usr/* to that 3rd partition (maybe /home/usr ?), then umount /usr and newfs it (make sure you verify the contents copied successfully to the new partition first!). Next remount the original /usr partition as something else (maybe /mnt/var ?) and cp -Rp the contents of /var/* over to it (probably have to stop syslogd first, as well as any daemons running in /var, like named). Verify that it cp'd OK, then umount and newfs the old /var partition. Now umount /mnt/var and remount the same partition on /var. Last, mount the old /var partition on /usr and cp -Rp /home/usr/* to the new /usr.

Obviously, the above only works if you have enough space on another partition to hold the conents of /usr (or you could swap the contents of /var first, since it'll be smaller). As long as the current /var has enough space for the current /usr, you'll be OK.

The only commands you need *should* be in /bin and /sbin.
 
Old 03-11-2004, 11:46 PM   #3
hypodermic
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Wow, mind dumbing that down at all? (I'd hate to say 'a step by step command run down', but that might be what I need, heh.)

When I go back into sysinstall remotely and then go to the disk label editor this is how it shows:

Disk: ad1 Partition name: ad1s1 Free: 0 blocks (0MB)

Part Mount Size Newfs Part Mount Size Newfs
---- ----- ---- ----- ---- ----- ---- -----
ad1s1a <none> 256MB *
ad1s1b swap 1963MB SWAP
ad1s1d <none> 256MB *
ad1s1e <none> 256MB *
ad1s1f <none> 73585MB *


To match that up, here's df:

Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad1s1a 257838 125602 111610 53% /
devfs 1 1 0 100% /dev
/dev/ad1s1e 257838 2 237210 0% /tmp
/dev/ad1s1f 74157736 2830846 65394272 4% /usr
/dev/ad1s1d 257838 237212 0 100% /var
 
Old 03-11-2004, 11:54 PM   #4
hypodermic
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
The way it sounds is I have to keep the sizes the same still? Just physically move what is where? I'd love to have 10GB on /usr and 60GB on /var.. Too bad when I installed it all I didn't know enough about FreeBSD or what exactly I'd need to plan for it.. I'd just run downtown to the colo and reinstall everything tomorrow but I don't have my car anymore.

I really hate my sites at this point, anyone want to buy a PR 5 and a PR 6 site. :-p haha. I'm only half way kidding.
 
Old 03-12-2004, 04:20 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
That only looks like 11GB, unless my math is totally wrong. What happened to all your other space? If you still have diskspace left, you can use fdisk to create a new slice (ad1s2).
 
Old 03-12-2004, 06:44 PM   #6
hypodermic
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
/dev/ad1s1f 74157736 2830846 65394272 4% /usr

aka 74GB.

I might be just getting around it now.. It's really p'ing me off though.. Now I'm trying to get mySQL to work and run out of /usr instead of /var.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the label of a disk dtournas Red Hat 0 08-17-2004 08:02 AM
I don't like the LILO label - How to change it? vijayaramanl Linux - Newbie 5 10-22-2003 06:00 PM
Disk label problem Juniper34 *BSD 2 08-21-2003 06:01 AM
Disk label strangeness? MadCactus Linux - General 2 08-13-2003 12:24 PM
Disk Label Editor Philo *BSD 13 07-06-2003 08:27 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration