Skip to content

Instantly share code, notes, and snippets.

@hihellobolke
Created May 13, 2014 05:12
Show Gist options
  • Select an option

  • Save hihellobolke/10a71b8f7ff7249aca4b to your computer and use it in GitHub Desktop.

Select an option

Save hihellobolke/10a71b8f7ff7249aca4b to your computer and use it in GitHub Desktop.
# : Create new mount directories
# mkdir -p /mnt/new/{root,var,home/epiclulz,home/somebody}
# mkdir -p /mnt/old/root
# : Mount lvms
# mount /dev/rootvg/rootvol /mnt/new/root
# mount /dev/rootvg/varvol /mnt/new/var
# mount /dev/datavg/epiclulz /mnt/new/home/epiclulz
# mount /dev/datavg/somebody /mnt/new/home/somebody
# : Mount the old disk
# mount /dev/sda1 /mnt/new/root
# : Start actual copying
# rsync -avAX /mnt/old/root/ /mnt/new/root/
# rsync -avAX /mnt/old/root/var/ /mnt/new/var/
# rsync -avAX /mnt/old/root/home/epiclulz /mnt/new/home/epiclulz/
# rsync -avAX /mnt/old/root/home/somebody /mnt/new/home/somebody/
# umount /mnt/new/home/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment