Penguin

A FireWall-centric LinuxDistribution with a web-based configuration interface.

How to fix the scarcity of Inodes on /var

Since having /var/log mounted is not essential for continued running, this is easy as long as you have another machine to copy everything to.

  1. rsync(1) is not included with IPCop by default, so SCP it from another machine:

    scp -P 222 /usr/bin/rsync ipcop:/usr/bin/rsync
  2. Make a temporary directory on the backup machine and change into it. Make sure it's on a Partition with enough room.
  3. On the backup machine:

    rsync -vaz -e 'ssh -p 222' ipcop:/var/log/\* .

    This recursively copies the directory contents, preserving file attributes, using compression. The -e switch tells rsync(1) how to invoke ssh(1). It is necessary because the IPCop SSH daemon runs on port 222.

  4. Now on the IPCop machine, make a new file system with approx 4 times as many Inodes as before:

    umount /var/log
    mke2fs -j -N 65536 /dev/harddisk3
    mount /var/log
  5. And now copy the whole thing back:

    rsync -avz -e 'ssh -p 222' . ipcop:/var/log
  6. Check that everything looks right on the IPCop machine and (for good measure) reboot it.

CategoryDistribution