PositiveVPS client move to quicker hard disk
Preface
There are two hard disks on the PositiveVPS node, sda and sdb. Users are set up on sda by default and this is the more busy of the disks. If customers complain about slow disk speeds, we move them across to sdb. This does have done drawbacks though, in that the customer cannot reinstall their OS without there being more downtime.
How to do it
- Find out the VPS number (VEID) of this client. This should be available in HostBill, but check that you've got the right one by typing vzlist -a and match on the hostname.
- Shut down the VPS by typing vzctl stop <VEID>.
- Ensure that any left-behind mounts are unmounted by typing umount /vz/private/<VEID> as many times as required until you get an error message saying that it is not mounted. This can be dozens of times.
- Ensure that /disk1/vz/private/<VEID> exists. Use mkdir if it doesn't.
- Ensure that there is no data in the new partition by typing rm -vr /disk1/vz/private/<VEID>.
- Move all data across by typing mv -v /vz/private/<VEID>/* /disk1/vz/private/<VEID>.
- Move to the OpenVZ configuration directory by typing cd /etc/vz/conf/
- Copy two scritps to custom mount and umount the new drive for this VPS by typing cp .... Note that we do not unmount the private directory because OpenVZ quotas stop working otherwise.
- Test that the VPS works by typing vzctl start <VEID>.
Client contact
Do feel free to offer this service to clients if they complain that their VPS is slow. Check that they are not already on the new hard disk first by seeing if the .conf files for their VEID exist in /etc/vz/conf.
Please also ensure that you warn the client that reinstall capability will no longer be possible without significant downtime and us getting involved. Tell the client that they must be sure they will not need to reinstal again (although we will still move them across, as long as they don't continuously reinstall).