Re: Repositioning /var | /tmp to avoid disk full condition

From: Bob Hall (rjhalljr_at_starpower.net)
Date: 05/31/03

  • Next message: Lee Harr: "Re: Repositioning /var | /tmp to avoid disk full condition"
    Date: Sat, 31 May 2003 17:00:55 -0400
    To: FreeBSD Users <questions@freebsd.org>
    
    

    On Sat, May 31, 2003 at 11:58:23AM -0700, Joseph Maxwell wrote:
    > Hello,
    > The 3rd edition of "The Complete FreeBSD" suggest repositioning the /var
    > directory ( and even /tmp) to prevent filling up that partition. I
    > ignored it and did just that today, filled it up. So I attempted the
    > repositioning with the following recommended command steps and results:
    >
    > cd /var
    > tar cf - . | (cd /usr/var; tar xf - )
    > cd /
    > rm -rf /var
    > ln -s /usr/var /var
    >
    > However the 'rm -rf /var' returned
    >
    > rm: /var: Device busy
    >
    > After trying all known tricks to me to remove /var, I concluded that
    > since it was mounted from the /etc/fstab I should dismount it and remove
    > the directory (link point ?) and create a soft link there as
    > recommended. However, on rebooting boot was aborted, was thrown into

    I've got a note in my copy of that book about that. Apparently,
    back when I installed my first FBSD system, I tried the delete
    the /var partition. The note indicates that I discovered that
    it couldn't be done. :)

    If you were following Leahy's instructions, then you copied the
    contents of /var to /usr/var. If you haven't deleted /usr/var,
    the you can copy the contents back to var. If you have deleted
    /usr/var, but you have backup, then you can restore the contents
    from your backup. If either of the above were true, you probably
    wouldn't be posting here asking how to restore. Since you are
    asking, you probably can't restore the contents.

    However, you can still restore the directories (without any files
    that might have been in them).

    If you installed from a CD set, the second CD should contain a
    live file system. Copy the contents of /cdrom/var to /var. If
    you installed from downloaded sources, I'm guessing that the
    freebsd.org site has a similar live file system somewhere, so if
    you can find it, you should be able to copy it to /var. I've
    never looked for it, so I don't know where it would be. Even if
    you can restore from /usr/var or backup, you should check a live
    file system to ensure that the restored directories in /var have
    the correct flags and you haven't made some other error.

    When you create /var and /temp in the disklable editor during
    installation, you are creating partitions in your slice. Unlike
    directories, which are only listings of addresses for files and
    other directories, a partition is a persistent part of your hard
    disk. The tools that delete directories have no effect on it.
    You could probably muck up your system in a way that makes a
    partition unavailable, but it is still occupying space on your
    hard disk, and that space will be wasted. If you want to delete
    the /var and /tmp partitions, you should do a 0-level dump of
    your system, remove /var and /tmp in the disklabel editor during
    reinstallation, and the restore your files from the dump archive.
    Unless your have a tiny hard drive and are desperate for space,
    I don't think it's worth the effort.

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Lee Harr: "Re: Repositioning /var | /tmp to avoid disk full condition"

    Relevant Pages

    • RE: partition magic with windows xp hlep!!!!!!!!!!!!!!
      ... You should have a set of rescue floppy disks, ... installation, or can be done simply by inserting the PM CD in any PC and ... You may then be able to copy Partition from the 'bakcup' drive to new drive. ... > i open magic up but nothing is worded similar to restore a drive ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: [opensuse] Upgrade doesnt recognize filesystem
      ... tried telling the install program my file system is: ... When you say "the installation program doesn't recognize the file system ... evaluating root partition ...
      (SuSE)
    • Re: General instructions to re-install Windows XP
      ... are the programs which can be executed but didn't need installation ... I've never had to look for those but during a restore it would be nice to ... That System Restore partition contains the image of the hard drive ...
      (microsoft.public.windowsxp.general)
    • Re: [SLE] moving my current installation
      ... transfer this installation to a new 160Gb harddrive. ... root partition is /dev/hda5 (1. ... the new disk is already formated and the file system is installed on it ...
      (SuSE)
    • Re: NTFS and FAT32 on same drive?
      ... FAT16, FAT32, CDFS (the file system used on most CDs), and NTFS with ... would be to partition your driveroughly as follows: ... disk support (FAT32). ... installation data during the first uninstall action. ...
      (microsoft.public.windowsxp.help_and_support)