Cloning a Drive in Linux via Commands: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 17: | Line 17: | ||
│ └─VG.NVMe.P4-LV.Storage 253:1 0 60G 0 lvm /mnt/NVMEx1 | │ └─VG.NVMe.P4-LV.Storage 253:1 0 60G 0 lvm /mnt/NVMEx1 | ||
└─nvme1n1p5 259:7 0 20G 0 part [SWAP]</syntaxhighlight>And just for the below examples, /dev/sdc will be the Destination Drive. Be really careful to identify the drive you want as the source, because all the restoration stuff is destructive to what's on the drive. | └─nvme1n1p5 259:7 0 20G 0 part [SWAP]</syntaxhighlight>And just for the below examples, /dev/sdc will be the Destination Drive. Be really careful to identify the drive you want as the source, because all the restoration stuff is destructive to what's on the drive. | ||
=== Before === | |||
Again, this assumes the same size or larger drive. See the Extra Section at the end for information on expanding LVs and File Systems AND the appropriate time to do those resizings. | |||
=== The Steps === | === The Steps === | ||
| Line 69: | Line 72: | ||
=== Scripting === | === Scripting === | ||
Of course all this will be scripted in the future. So basically Acronis for Linux. | Of course all this will be scripted in the future. So basically Acronis for Linux. | ||
=== Extra === | |||
Use CFDISK to resize a Partition | |||
Use the lvextend -l +100%FREE /dev/VG.NVMe.P4/LV.Storage or lvreduce -L 300G /dev/VG.NVMe.P4/LV.Storage, to enlarge or reduce the size of an LV | |||
Use resize2fs /dev/VG.NVMe.P4/LV.Storage to expand a File System | |||
=== And for the Critics === | === And for the Critics === | ||