Fremantle
For my own future reference:
- Create new volume.
- Mount it:
sudo mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_data2 /mnt/data2
- Stop Apache:
sudo apache2ctl stop
- Copy everything from old to new with rsync (note trailing slashes):
rsync -av /mnt/data/ /mnt/data2/
- Unmount the old volume:
sudo umount /mnt/data
- Mount new to old place:
sudo mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_data2 /mnt/data
- Restart Apache:
sudo apache2ctl start
- Edit the entry in fstab to use the new volume ID:
/dev/disk/by-id/scsi-0DO_Volume_data2 /mnt/data2 ext4 defaults,nofail,discard 0 0
- Remove the temporary mount point:
sudo rmdir data2/
- Restart to make sure everything comes back up as it should (this isn't really a good way to do this, but I'm lazy and not many people use this server).
sudo shutdown -r now