Partitions and disk space

Matthew Page MPage at ciri.com
Mon Oct 4 12:53:45 MDT 2004


I think what I would do is just 'swap' partitions.  This would save you
from having to repartition at all...  

Copy everything from /var to a temp directory using the method that was
described earlier and then move everything in /home to /var.  Then move
everything from the temp directory to /home.  Swap the partitions in
your fstab file so that the partition that WAS /home will no be mounted
as /var and what was /var will now be /home.  Reboot and cross your
fingers...

Matthew A. Page

 

> -----Original Message-----
> From: yellowdog-general-bounces at lists.terrasoftsolutions.com
> [mailto:yellowdog-general-bounces at lists.terrasoftsolutions.com] On
Behalf
> Of Steven J. Norton
> Sent: Monday, October 04, 2004 10:48 AM
> To: yellowdog-general at lists.terrasoftsolutions.com
> Subject: Re: Partitions and disk space
> 
> Thanks, Geert. I may explore the commercial option if that is not too
> expensive. Your solution sounds like it would indeed solve my problem,
> except that the other ~18 Gb is not really free. The rest of the disk
is
> taken up with a Mac OS 9 partition (since I must boot with BootX) and
an
> OS
> X partition (not really needed, but I had real problems with my first
> attempts to install YDL and the only way I could get around it was to
> format/partition the disk initially with the OS X disk utility rather
than
> OS 9's drive setup). But maybe I can do without OS X now......
> 
> Thanks again,
> 
>   Steve
> 
> on 10/4/2004 1:03 PM, Geert Janssens wrote:
> 
> > There are two options I see:
> > 1. some time ago, there was an anouncement on this list for a
commercial
> > linux partioning tool, that was capable of resizing partitions
without
> > data loss. You could search the archives to see if it suits you.
> >
> > 2. Do a "partition dance" (although this is not non-destructive!):
if I
> > read the number correctly, you have only 62Gb of your 80Gb HD in
use.
> > The partition dance would take the following steps:
> >
> > * make an additional temporary partition in the free part of your
HD,
> > large enough to hold all data currently stored in /usr. In your
case,
> > that would be, larger than 1.6Gb.
> >
> > * make a filesystem on the new partition, and mount it (eg in
> > /mnt/your-mounted-temp-partition)
> >
> > * as root, use cp -ax /usr /mnt/your-mounted-temp-partition
> > to copy over all of /usr to your temporary partition, preserving all
> > file attributes
> >
> > * IMPORTANT: modify your /etc/fstab to use the temporary partition
as
> > /usr next time you boot
> >
> > * reboot
> >
> > * if the boot process doesn't complain, you can delete the old usr
> > partition, and in this free space create a new /var  and /usr
partition.
> > If you want your final /usr partition to be 10Gb, create the new
/var
> > partition 34Gb. If this is not enough, you will first have to move
your
> > old var partition into the temporary space just as you did with the
usr
> > partition. Then you can delete the old var partition also in this
step,
> > and have 45Gb to divide into a new /var and /usr partition.
> >
> > * make a filesystem on the new partitions, and mount them (eg in
> > /mnt/your-mounted-new-var-partition and /mnt/your-mounted-new-usr-
> partition)
> >
> > * as root, use cp -ax /var /mnt/your-mounted-new-var-partition and
> > cp -ax /usr /mnt/your-mounted-new-usr-partition
> > to copy over all of /var to your new var partition and usr to the
new
> > usr partition, preserving all file attributes
> >
> > * IMPORTANT: modify your /etc/fstab to use the new var partition as
> > /var, and the new usr partition as /usr next time you boot
> >
> > * reboot
> >
> > * if all is well, you can delete the temporary /usr and /var
partitions.
> >
> > As I said, not non-destructive, but it works. I have done this more
than
> > once already. The safest thing in any case is to make a backup of
all
> > sensitive data before doing this.
> >
> > Hope that helps,
> >
> > Geert
> >
> > Steven J. Norton wrote:
> >> Hello, all --
> >>
> >> Here are some questions I've been meaning to ask for a while now:
if
> you
> >> check out the disk space report from LogWatch on my YDL web server
> >> (reprinted below), you'll note that my /usr and /home partitions
are
> quite
> >> large and only sparsely used, while the /var partition (home to the
> content
> >> files of my web server) is much smaller -- and already 17% full and
> >> climbing. I had accepted the partition scheme suggested by the YDL
> installer
> >> when this was set up.
> >>
> >> So here goes:
> >> 1) Is there a non-destructive way to change the size of existing
> partitions
> >> (i.e. can I retrieve some space from, say, /home and give it to
/var)?
> >>
> >> 2) If so, which partitions that currently have extra space can be
> safely
> >> made smaller? Since I'm not using this as my main computer, I am
> assuming
> >> that /home does not need to be this big as there will not be too
many
> user
> >> files. What about /usr -- if I'm not installing a bunch of
productivity
> >> software, will this ever grow much?
> >>
> >> [This is on an old beige G3 with a fresh 80 Gb hard drive and
running
> YDL
> >> 3.01, by the way.]
> >>
> >> I know that I can tell Apache to look elsewhere on the disk for
content
> >> files, but I'd much rather keep everything inside /var/www/ for
both
> >> security and sanity reasons. Of course, this isn't really a problem
> yet, but
> >> I've only just really started using the server and I want to head
off
> >> problems if I can. Any advice appreciated!
> >>
> >>   -- Steve
> >>
> >> ------------------ Disk Space --------------------
> >>
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/hda14            496M  120M  350M  26% /
> >> /dev/hda12             16G  146M   15G   1% /home
> >> none                  187M     0  187M   0% /dev/shm
> >> /dev/hda10             44G  1.6G   39G   4% /usr
> >> /dev/hda13           1008M  155M  802M  17% /var
> 
> 
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general at lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> HINT: to Google archives, try  '<keywords>
site:terrasoftsolutions.com'
> 
> 
> BEGIN-ANTISPAM-VOTING-LINKS
> ------------------------------------------------------
> Teach CanIt if this mail (ID 1124250) is spam:
> Spam:
> http://canit.ciri.com/canit/b.php?c=s&i=1124250&m=4fb21de8902e
> Not spam:
> http://canit.ciri.com/canit/b.php?c=n&i=1124250&m=4fb21de8902e
> Forget vote:
> http://canit.ciri.com/canit/b.php?c=f&i=1124250&m=4fb21de8902e
> ------------------------------------------------------
> END-ANTISPAM-VOTING-LINKS



More information about the yellowdog-general mailing list