Cloning a Drive in Linux via Commands: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 19: | Line 19: | ||
=== Before === | === Before === | ||
Again, this assumes the same size or larger drive. See the | Again, this assumes the same size or larger drive. See the Resizing Drives 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 73: | Line 73: | ||
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. | ||
=== | === Resizing Drives === | ||
Use CFDISK to resize a Partition | Use CFDISK to resize a Partition | ||
| Line 91: | Line 91: | ||
PARTUUID: sfdisk --disk-id /dev/sda 0x40dae42c (remember, the 0x is sort of a static thing that has to preceed whatever ever value is to be changed, plus the partition number will be tacked onto the end. IE, if one has a PARTUUID Number as 55fa144a-01 and wants to change a PARTUUID number to this, 40dae42c, add 0x, that's a zero, in front of 40dae42c, and the -01 will be tacked onto the end of it when viewing with blkid) | PARTUUID: sfdisk --disk-id /dev/sda 0x40dae42c (remember, the 0x is sort of a static thing that has to preceed whatever ever value is to be changed, plus the partition number will be tacked onto the end. IE, if one has a PARTUUID Number as 55fa144a-01 and wants to change a PARTUUID number to this, 40dae42c, add 0x, that's a zero, in front of 40dae42c, and the -01 will be tacked onto the end of it when viewing with blkid) | ||
=== Drive Creation and LVMs (Logical Volume Management SYSTEMs) === | |||
cfdisk | |||
pvcreate /dev/nvme2n1p1 | |||
vgcreate VG.NVMEx1.P1 /dev/nvme2n1p1 | |||
lvcreate -L 460G -n LV.Storage VG.NVMEx1.P1 | |||
mkfs.ext4 -L Storage_NVMEx1 -v /dev/VG.NVMEx1.P1/LV.Storage | |||
pvs, vgs, lvs AND pvdisplay, vgdisplay, lvdisplay | |||
=== And for the Critics === | === And for the Critics === | ||