Thanks for you assistance Chris. I wasn't expecting a reply from a Linode staff member.
I tried something similar, but i must have messed things up somewhere.
Am i on the right lines if, in rescue mode, I mount and copy as follows?
# mkdir /mount/home
# mkdir /mount/tmp
# mkdir /mount/opt
# mkdir /mount/var
# mkdir /mount/var/log
# mount /dev/xvda /mnt <-- this is the root device for the Linode OS installation
# mount /dev/xvdc /mount/home
# mount /dev/xvdd /mount/tmp
# mount /dev/xvde /mount/opt
# mount /dev/xvdf /mount/var
# mount /dev/xvdg /mount/var/log
# cp -au /mnt/home/* /mount/home/
# cp -au /mnt/tmp/* /mount/tmp/
# cp -au /mnt/opt/* /mount/opt/
# cp -au /mnt/var/log/* /mount/var/log/ <-- thanks Stever i defo messed this up on the first attempt
# cp -au /mnt/var/* /mount/var/
I'm not 100% confident about the above commands, but this bit really concerns me
# rm -rf /mnt/home/*
# rm -rf /mnt/tmp/*
# rm -rf /mnt/opt/*
# rm -rf /mnt/var/*
# rm -rf /mnt/var/log/*
# umount /mnt
# umount /mount/home
# umount /mount/tmp
# umount /mount/opt
# umount /mount/var
# umount /mount/var/log
# shutdown -h now
I tried adjusting fstab before this shutdown on my first attempt as i wasn't sure if the OS could reboot properly without knowing where all the deleted files have gone - Anyway, i will give it a go.
When i delete the home dir i think my ssh info will also go so i guess i will need to re-enable root login via ssh get back into the machine without having to use the Linode lish console
Upon restart, would I modify the mount points for the new disk images roughly as follows?
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/xvda / ext3 errors=remount-ro 0 1
/dev/xvdc /home ext3 defaults,nosuid,nodev 0 2
/dev/xvdd /tmp ext3 defaults,nosuid,nodev 0 2
/dev/xvde /opt ext3 defaults,nodev 0 2
/dev/xvdf /var ext3 defaults,nosuid,nodev 0 2
/dev/xvdg /var/log ext3 defaults,nosuid,nodev,noexec 0 2
# reboot
Any assistance/corrections from anyone would be very welcome.
jk