[ale] Oops - Want to rearrange two partitions

Danny Cox DCox at icc.net
Thu Oct 19 14:10:10 EDT 2006


John,

On Thu, 2006-10-19 at 12:46 -0500, John Mills wrote:
> I just installed SuSE-10.1 and set up a 1GB partition for /var. From the
> first login I see that /var is about 35% full, which seems much too close
> for comfort down the road.
> 
> My reason for fixing size of /var was to ensure that it not grow and lock
> the file system.
> 
> The next-lower partition is /home at /dev/hdb7, with 10GB. 
> The next-higher partition is /opt at /dev/hdb9, with 10GB. 
> 
> I would like to give up 1GB of /home or /var and add it to /var at
> /dev/hdb8. (All three are logical partitions within the same extended
> partition.)
> 
<snip>
> How might I resize partitions to move an extra GB from into /var without 
> trashing my installation, else move it and recover its space?
<snip>

	If you have room to copy the contents, either in /opt or over the
network, or even onto a DVD, you're in luck.

	Reboot, and at the GRUB prompt, enter "linux single" (without the
quotes).  This will bring you up on the console in single user mode, and
all local disks mounted.

	Make a copy of /home and /var somewhere.

	Unmount /home and /var.

	Fiddle with the partitions using fdisk, sfdisk, or your favorite tool
to get hdb7 and hdb8 to the sizes you want.

	You may need to reboot here.  Fdisk tries very hard to inform the
kernel of new partitions, but sometimes, it fails.  Remember to boot
into single user mode.

	Create your preferred filesystem on hdb7 and hdb8.

	If you change the filesystem type, edit /etc/fstab to reflect the
change.

	Remount them, and copy them back.

	Stand well back, and it should come up fine.

-- 
Daniel S. Cox
Internet Commerce Corporation





More information about the Ale mailing list