You are here

Enswitch Maintenance

This is the procedure to move /var/lib/enswitch to a new partition ( /dev/sdb??? ) :

  1. # partition = /deb/sdb1
  2. reboot
  3. # fix dns
  4. mkfs.ext3 /dev/sdb1
  5. cfdisk
    # check everything that was done above
  6. cd /
  7. mkdir /var/lib/enswitch2
  8. mount -t ext3 /dev/sdb1 /var/lib/enswitch2
  9. time rsync -avx --hard-links /var/lib/enswitch/ /var/lib/enswitch2/
  10. diff /var/lib/enswitch /var/lib/enswitch2
  11. time rsync -avx --hard-links /var/lib/enswitch/ /var/lib/enswitch2/
  12. System unattainable starting here!
  13. /etc/init.d/enswitch_sipd stop
  14. /etc/init.d/openser stop
  15. /etc/init.d/apache2 stop
  16. /etc/init.d/mysql stop
  17. time rsync -avx --hard-links /var/lib/enswitch/ /var/lib/enswitch2/
  18. mv /var/lib/enswitch /var/lib/enswitch.old
  19. umount /dev/sdb1
  20. mkdir /var/lib/enswitch
  21. mount -t ext3 /dev/sdb1 /var/lib/enswitch
  22. vi /etc/fstab
  23. reboot
  24. System back to normal!
  25. # fix dns
  26. # check
  27. ll /var/lib/enswitch2
  28. rmdir /var/lib/enswitch2
  29. ll /var/lib/enswitch.old
  30. df -h;rm -rf /var/lib/enswitch.old
  31. reboot
  32. # fix dns
  33. # check

User login