Quantcast
Channel: Active questions tagged partition - Server Fault
Viewing all articles
Browse latest Browse all 65

Resize /var partition on a remote system (Linux Debian Lenny)

$
0
0

At a server that I only have access via ssh and vnc to (which means no booting from a "live" CD/DVD is possible), I would like to shrink the partition assigned to /var (in order to free some space for an additional partition). What would a good and safe way to do it?

Solution (based on David Spillet answer, provided that you have enough space on / to accommodate a copy of /var):

  1. stop anything that is using /var where possible
  2. remount /var readonly for good measure mount -f -oremount,ro /var (didn't seem to have any effect for me)
  3. copy /var to / under a different name with mkdir /vartmp; cp -av /var/* /vartmp/
  4. comment out the entry for /var in /etc/fstab
  5. reboot
  6. move things around with mv /var /varmount; mv /vartmp /var
  7. reboot, partition
  8. uncomment the entry for /var in /etc/fstap
  9. reboot

Viewing all articles
Browse latest Browse all 65

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>