[ale] Oops - Want to rearrange two partitions
Randal Jarrett
rsj at radio.org
Thu Oct 19 14:26:16 EDT 2006
What I like to do on my systems is to make 3 fixed primary partitions
for swap, boot and /.
I then make the 4th primary partition LVM from which I create my other
partitions just a little more than the minimum size needed
for /usr, /var, /opt, /tmp, /usr/local and /home.
By using LVM I get the flexibility to grow the partitions as needed.
Another major benefit is if I need additional space I can add another
drive to the volume group and use it to add additional space to the
existing LVM partitions. This allows you to use some of the smaller
disk drives that are sitting around. If necessary you can add another
disk controller such as a Promise card for even more drives.
LVM is very easy to work with both from the command line and most
distributions admin GUIs.
Randy
On Thu, 2006-10-19 at 14:10 -0400, Danny Cox wrote:
> 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.
>
--
Randy Jarrett K4RSJ
Randy's Ham Shack
<rsj at radio.org>
FWD# 654871
More information about the Ale
mailing list