Linux LVM question related to upgrading my laptop's 1 TB disk to a 2 TB one

My HP Omen (2018) laptop has the following hardware specs:

256 GB NVME SSD drive (But only 238 GB available)
1TB Mechanical SATA drive (2.5 inch internal HDD)
RAM: 32 GB

I configured dual boot in this laptop. The laptop originally came with Windows 10 Home OEM installed, and later I installed Fedora, and currently I have Fedora 38.

I purchased a Sandisk 2TB SSD (2.5 inch) and I want to upgrade my current 1 TB mechanical drive to the Sandisk’s 2TB one.
After physically replacing my current 1 TB mechanical drive with Sandisk’s 2TB, I will copy all the data from the 1 TB disk to the newly attached 2 TB disk. I bought a SATA to USB enclosure (SABRENT) for this copy.

I have few questions on this upgrade.

I use Logical Volume Mananagement for my Fedora Linux.

For faster performance, Windows OS came installed in the NVME drive. So, I installed Fedora OS in the same NVME drive too.

Fedora assigned the name /dev/sda for the 1 TB SATA mechanical disk.

For my personal data, I created a VG named fedora_homevg out of my 1TB disk's partition (/dev/sda3) as shown below in the disk info section.

And LV /dev/mapper/fedora_homevg-home is mounted on mount point /home .

/home/sysadmin/Ddrive is where I keep all my important data (Movies, Pictures, music files, documents, …etc)

Question1. Should the new 2 TB disk be partitioned by Windows first ?

When I detach the current 1TB disk and attach the 2 TB disk, should I boot into Windows 10 first and create the NTFS partitions first ? Or it does not matter ?

Question2. When I detach the current 1TB disk and attach the 2 TB disk, won’t Fedora complain about the missing the VG fedora_homevg which was made using PV /dev/sda3 from the old 1 TB disk ? After all, /home is mounted on this filesystem.

Question3. So, I need to create a new VG in the new 2TB disk and mount /home from there. Right ? i.e. Since there is already a VG named fedora_homevg

Any other important things I should be mindful about while I am doing this disk upgrade ? Any suggestions are highly appreciated.

Disk info from Fedora and Windows shown below :point_down:

----- In Fedora

[sysadmin@localhost:/home/sysadmin]$ df -PTh
Filesystem                     Type      Size  Used Avail Use% Mounted on
devtmpfs                       devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                          tmpfs      16G   73M   16G   1% /dev/shm
tmpfs                          tmpfs     6.3G  2.2M  6.3G   1% /run
/dev/mapper/fedora_rootvg-root ext4      100G   39G   57G  41% /
/dev/nvme0n1p6                 ext4      974M  281M  626M  31% /boot
/dev/nvme0n1p5                 vfat      511M   18M  494M   4% /boot/efi
/dev/mapper/fedora_homevg-tmp  ext4      7.8G   81M  7.3G   2% /tmp
/dev/mapper/fedora_homevg-home ext4      649G  553G   63G  90% /home
tmpfs                          tmpfs     3.2G  3.8M  3.2G   1% /run/user/1000
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ sudo pvs
[sudo] password for sysadmin: 
  PV             VG            Fmt  Attr PSize   PFree
  /dev/nvme0n1p7 fedora_rootvg lvm2 a--  102.00g 4.00m
  /dev/sda3      fedora_homevg lvm2 a--  668.00g 4.00m
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ 

[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ sudo vgs
  VG            #PV #LV #SN Attr   VSize   VFree
  fedora_homevg   1   2   0 wz--n- 668.00g 4.00m
  fedora_rootvg   1   1   0 wz--n- 102.00g 4.00m
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ sudo lvs
  LV   VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home fedora_homevg -wi-ao---- 660.00g                                                    
  tmp  fedora_homevg -wi-ao----   8.00g                                                    
  root fedora_rootvg -wi-ao---- 102.00g                                                    
[sysadmin@localhost:/home/sysadmin]$ 

[sysadmin@localhost:/home/sysadmin]$ lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                      8:0    0 931.5G  0 disk 
├─sda1                   8:1    0 248.8G  0 part 
├─sda2                   8:2    0  12.7G  0 part 
└─sda3                   8:3    0   668G  0 part 
  ├─fedora_homevg-home 253:1    0   660G  0 lvm  /home
  └─fedora_homevg-tmp  253:2    0     8G  0 lvm  /tmp
zram0                  252:0    0     8G  0 disk [SWAP]
nvme0n1                259:0    0 238.5G  0 disk 
├─nvme0n1p1            259:1    0   260M  0 part 
├─nvme0n1p2            259:2    0    16M  0 part 
├─nvme0n1p3            259:3    0 132.2G  0 part 
├─nvme0n1p4            259:4    0   980M  0 part 
├─nvme0n1p5            259:5    0   512M  0 part /boot/efi
├─nvme0n1p6            259:6    0     1G  0 part /boot
└─nvme0n1p7            259:7    0   102G  0 part 
  └─fedora_rootvg-root 253:0    0   102G  0 lvm  /
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ 
[sysadmin@localhost:/home/sysadmin]$ lsblk -f
NAME                   FSTYPE      FSVER    LABEL            UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                                                
├─sda1                 ntfs                 DATA             7064634064630864                                      
├─sda2                 ntfs                 RECOVERY         827464BC7464B497                                      
└─sda3                 LVM2_member LVM2 001                  wHNz2E-c0od-5U1F-VtsV-we1F-KQZG-FVUTHD                
  ├─fedora_homevg-home ext4        1.0                       bc38b4bc-2776-4903-8b7c-8752678a8b77     62.8G    85% /home
  └─fedora_homevg-tmp  ext4        1.0                       215a3cd6-f958-464b-9349-0b8d54c6bc2e      7.3G     1% /tmp
zram0                                                                                                              [SWAP]
nvme0n1                                                                                                            
├─nvme0n1p1            vfat        FAT32                     DE2A-9102                                             
├─nvme0n1p2                                                                                                        
├─nvme0n1p3            ntfs                 Windows          267A39187A38E5E9                                      
├─nvme0n1p4            ntfs                 Windows RE tools 08AEE9C7AEE9ACFE                                      
├─nvme0n1p5            vfat        FAT32                     C3E4-C3A7                               493.6M     3% /boot/efi
├─nvme0n1p6            ext4        1.0                       203287c4-c9d1-4d72-ba6a-98acb1adc9eb    625.3M    29% /boot
└─nvme0n1p7            LVM2_member LVM2 001                  RF3oiO-mM3O-AD2Z-lXEd-PNnN-MKuu-bhbkn7                
  └─fedora_rootvg-root ext4        1.0                       4f403c4a-fc50-46dd-aa47-176fecb7acab     56.3G    39% /
[sysadmin@localhost:/home/sysadmin]$

—---- Windows 10 disk info.
DATA (D:) drive is made from the partitions of 1 TB SATA mechanical drive.

I have no experience with Windows/Linux on one computer, and little experience with Windows. Since nobody responded yet, I share my ideas.
I would make the partitions on Windows and copy the Windows data from D: to the new F:
On Linux it might show up as /dev/sdb3, set its type to "Linux", create a PV on it (pvcreate), add it to the VG (vgextend).
You can lvcreate a new LV, mkfs a file system on it, mount it to a temporary location, and copy the data, then change it in /etc/fstab for next boot. As last action lvremove the old LV, remove the PV from the VG (vgreduce).
There is the alternative to add the new device as a mirror to the LV, detach the old device from it, extend the LV, extend the file system. The advantage: everything can be done without a reboot. I have never done it though.

2 Likes

In addition to what @MadeInGermany said I would briefly add......

I would say yes because usually the Microsoft Windows install routine thinks it's the only show in town and will grab all spare disk space and install its own bootloader thereby overwriting some of a pre-existing operating system. Most, if not all, Unix/Linux install routines have more respect for pre-existing operating systems.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.