I would like some help moving the root partition from an existing hard drive across to a newly installed SSD.
The PC is an i7 (Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz) with 32GB ram and 2 x 2TB 5400rpm sata drives. It is running Fedora 29 linux.
New M.2 SSD is:- Samsung SSD 970 EVO Plus 500GB at /dev/nvme0n1.
Existing Partitions on /dev/sda
Number Start (sector) End (sector) Size Code Name
1 2048 411647 200.0 MiB EF00 EFI System Partition
2 411648 2508799 1024.0 MiB 8300 Linux filesystem
3 2508800 3907028991 1.8 TiB 8E00 Linux LVM
# /etc/fstab
UUID=486b1d3d-c426-4ce6-a5ac-0f7109e4d463 /boot ext4 defaults 1 2
UUID=ACA0-FA79 /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/fedora_localhost--live-root / ext4 defaults 1 1
/dev/mapper/fedora_localhost--live-home /home ext4 defaults 1 2
/dev/mapper/fedora_localhost--live-swap swap swap defaults 0 0
# df -h output (minus some tmpfs entries)
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/fedora_localhost--live-root 49G 16G 32G 34% /
/dev/sda2 976M 202M 708M 23% /boot
/dev/sda1 200M 18M 182M 9% /boot/efi
/dev/mapper/fedora_localhost--live-home 1.8T 88G 1.6T 6% /home
tmpfs 16G 80K 16G 1% /tmp
Proposed Setup
From my research to date, the following partition scheme seems to be the go.
ssd / 200G (New LVM volume or partition)
sda1 /boot/efi 200M (existing partition)
sda2 /boot 976M (existing partition)
LVM /home 1.8T (existing volume on hdd - may shrink this a bit)
LVM /var 49G (re-use old root LVM volume on hdd)
My Questions
Is it best to use LVM commands? If so, please suggest the commands and switches. I have never done any LVM operations before.
And seeing as I am not using all the SSD, should the LVM partition consume the entire SSD or not?
If LVM commands are not the best, then would a standard formatted partition then use cp -a??? or rsync to copy the files across be appropriate, and how to keep permissions and devices intact?
Notes
I realise that /etc/fstab will need the new entry for the root volume.
I have (and plan to use) a knoppix live system dvd to do the work while the host filesystem is offline.
If you feel that one approach is better for SSD life span, please add your comments.
Thanks