PDA

View Full Version : How To Migrate your VPS to another filesystem


adkap
07-05-2005, 02:31 AM
This is a fairly simple How-to, intended for the less experienced admins here.

First, edit /etc/fstab. On the line that reads:
/dev/sda1 / ext3 defaults 0 1
change ext3 to the new filesystem of your choice. Do not edit any of the other settings at this time. If you specify an invalid option instead of or in addition to "defaults," your root partition will not mount properly. Verify your changes.

Now create a backup of your server. In the unixshell# VPS control panel, create a snapshot of "/" so that your entire machine state is preserved. You may want to download this snapshot for safe keeping.

Next, shutdown your VPS, go to the unixshell# control panel and select your new filesystem. Hit the okay button. Finally just wait for the reload to complete, and then restore your saved snapshot.

If for some reason your filesystem will not mount, go to single-user mode and hit return when the system ask if you want to go into maintance mode. Your disk may be mounted in readonly mode... unmount it (umount /). Then properly mount your disk by doing something like mount -t xfs -o rw /dev/sda1 / and fix it :-)