Ask Your Question

Revision history [back]

To use your discontiguous partitions /dev/sda5 and /dev/sda13 to back a single filesystem, do:

(resizing the ntfs partition is left as an exercise for the reader)

systemctl isolate multi-user.target #get out of graphical mode so you aren't using /home - log in as root

rsync -vrpP /home/ /path/to/ext4_usb_backup/ #this will preserve permissions

umount /home #we are destroying the data here

pvcreate /dev/sda5 #format for lvm use

pvcreate /dev/sda13 #format for lvm use

vgcreate hello_vg /dev/sda5 /dev/sda13 #create volume group

lvcreate hello_vg/hello-home --size 500G #create logical volume

mkfs.ext4 /dev/hello_vg/hello-home #create a filesystem

mount /dev/hello_vg/hello-home /home #mount the filesystem

rsync -vrpP /path/to/ext4_usb_backup/ /home/ #restore backup

blkid /dev/hello_vg/hello-home #Get the filesystem uuid

nano /etc/fstab #put your new UUID in for the /home mountpoint

systemctl isolate graphical.target #resume your clicky operations (adding

To use your discontiguous partitions /dev/sda5/dev/sdaN and /dev/sda13 to back a single filesystem, do:

(resizing the ntfs partition and creating a new one in the empty space is left as an exercise for the reader)

systemctl isolate multi-user.target #get out of graphical mode so you aren't using /home - log in as root

rsync -vrpP /home/ /path/to/ext4_usb_backup/ #this will preserve #copies files, preserves permissions

umount /home #we are destroying the data here

pvcreate /dev/sda5/dev/sdaN #format for lvm use

pvcreate /dev/sda13 #format for lvm use

vgcreate hello_vg /dev/sda5 /dev/sdaN /dev/sda13 #create volume group

lvcreate hello_vg/hello-home --size 500G #create logical volume

mkfs.ext4 /dev/hello_vg/hello-home #create a filesystem

mount /dev/hello_vg/hello-home /home #mount the filesystem

rsync -vrpP /path/to/ext4_usb_backup/ /home/ #restore backup

blkid /dev/hello_vg/hello-home #Get the filesystem uuid

nano /etc/fstab #put your new UUID in for the /home mountpoint

systemctl isolate graphical.target #resume your clicky operations (adding

To use your discontiguous partitions /dev/sdaN and /dev/sda13 to back a single filesystem, do:

(resizing the ntfs partition and creating a new one in the empty space is left as an exercise for the reader)

systemctl isolate multi-user.target #get out of graphical mode so you aren't using /home - log in as root

rsync -vrpP -vrpPX /home/ /path/to/ext4_usb_backup/ #copies files, preserves permissions

umount /home #we are destroying the data here

pvcreate /dev/sdaN #format for lvm use

pvcreate /dev/sda13 #format for lvm use

vgcreate hello_vg /dev/sdaN /dev/sda13 #create volume group

lvcreate hello_vg/hello-home --size 500G #create logical volume

mkfs.ext4 /dev/hello_vg/hello-home #create a filesystem

mount /dev/hello_vg/hello-home /home #mount the filesystem

rsync -vrpP /path/to/ext4_usb_backup/ /home/ #restore backup

blkid /dev/hello_vg/hello-home #Get the filesystem uuid

nano /etc/fstab #put your new UUID in for the /home mountpoint

systemctl isolate graphical.target #resume your clicky operations (adding