Expanding LUKS container's Logical Volume on btrfs Filesystem after cloning to larger drive:

Hello, I have a Lenovo M57-p desktop. I recently acquired a 1 TB Western Digital blue label SSD drive. I have attached the drive as secondary (in place of cd/dvd) then performed an extended test (with GSmartControl), the test completed without error. Then I tested the 160 GB drive hosting openSUSE TW (with GSmartControl), the test completed without error. Then I used the latest stable Clonezilla 3.1.1-27 to duplicate the original 160 GB platter drive to the newer 1 TB drive (drive to drive duplicate with existing partitions). I am now able to successfully boot and load into KDE with the 1 TB drive (desktop is much faster now).

The issue I am having is with expanding the LUKS containers btrfs filesystem, system-root (/sda2) LV. I am able to extend the /dev/sda2 partition with Gparted seemingly with no issue except that the Titlebar > Partition > Check button is greyed out. The output of lsblk -f

NAME                                        FSTYPE      FSVER    LABEL      UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
fd0                                                                                                                               
sda                                                                                                                               
├─sda1                                                                                                                            
└─sda2                                      crypto_LUKS 1                   d095bece-13e0-47ca-b2a9-f6119d3989fc                  
  └─Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062
                                            LVM2_member LVM2 001            1yV15y-4YP2-Nekm-EWX2-eiId-uhEi-zxTcvc                
    ├─system-swap                           swap        1                   e736498b-60e5-4f99-99c2-8a6850a78ca9                  [SWAP]
    └─system-root                           btrfs                           605560ad-fe93-4d09-8760-df0725b43ee1     75.6G    45% /var
                                                                                                                                  /usr/local
                                                                                                                                  /srv
                                                                                                                                  /root
                                                                                                                                  /opt
                                                                                                                                  /home
                                                                                                                                  /boot/grub2/x86_64-efi
                                                                                                                                  /boot/grub2/i386-pc
                                                                                                                                  /.snapshots
                                                                                                                                  /

The output of df -Th is as follows:

Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/system-root btrfs     143G   65G   76G  47% /
devtmpfs                devtmpfs  4.0M  8.0K  4.0M   1% /dev
tmpfs                   tmpfs     3.8G  1.3M  3.8G   1% /dev/shm
tmpfs                   tmpfs     1.6G  1.7M  1.6G   1% /run
tmpfs                   tmpfs     3.8G  224K  3.8G   1% /tmp
/dev/mapper/system-root btrfs     143G   65G   76G  47% /.snapshots
/dev/mapper/system-root btrfs     143G   65G   76G  47% /boot/grub2/i386-pc
/dev/mapper/system-root btrfs     143G   65G   76G  47% /boot/grub2/x86_64-efi
/dev/mapper/system-root btrfs     143G   65G   76G  47% /home
/dev/mapper/system-root btrfs     143G   65G   76G  47% /opt
/dev/mapper/system-root btrfs     143G   65G   76G  47% /root
/dev/mapper/system-root btrfs     143G   65G   76G  47% /srv
/dev/mapper/system-root btrfs     143G   65G   76G  47% /usr/local
/dev/mapper/system-root btrfs     143G   65G   76G  47% /var
tmpfs                   tmpfs     770M   80K  770M   1% /run/user/1000
/dev/dm-3               vfat      2.0G  962M 1006M  49% /run/media/paul/WORLDWIDE1

passing vgs gives:
VG #PV #LV #SN Attr VSize VFree
system 1 2 0 wz–n- 931.50g 782.46g

passing sudo fdisk -l gives:
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WDS100T2B0A
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 67AAD724-4E3B-4DBB-B4BB-176D1E16FE72

Device Start End Sectors Size Type
/dev/sda1 2048 18431 16384 8M BIOS boot
/dev/sda2 18432 1953523711 1953505280 931.5G Linux LVM

Disk /dev/sdb: 1.94 GiB, 2079850496 bytes, 4062208 sectors
Disk model: Flash Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062: 931.5 GiB, 1000192606208 bytes, 1953501184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/system-swap: 6.52 GiB, 6996099072 bytes, 13664256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/system-root: 142.52 GiB, 153029181440 bytes, 298885120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/luks-fd28e551-c765-461e-aab0-a2c49bb786b9: 1.92 GiB, 2063073280 bytes, 4029440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

As you can see I was able to rename the LUKS container but I have not modified anything that I am aware of regarding the UUID:
cat /etc/crypttab
Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062 UUID=d095bece-13e0-47ca-b2a9-f6119d3989fc none x-initrd.attach

cat /etc/fstab

/dev/system/root  /                       btrfs  defaults                      0  0
/dev/system/root  /var                    btrfs  subvol=/@/var                 0  0
/dev/system/root  /usr/local              btrfs  subvol=/@/usr/local           0  0
/dev/system/root  /srv                    btrfs  subvol=/@/srv                 0  0
/dev/system/root  /root                   btrfs  subvol=/@/root                0  0
/dev/system/root  /opt                    btrfs  subvol=/@/opt                 0  0
/dev/system/root  /home                   btrfs  subvol=/@/home                0  0
/dev/system/root  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
/dev/system/root  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
/dev/system/swap  swap                    swap   defaults                      0  0
/dev/system/root  /.snapshots             btrfs  subvol=/@/.snapshots          0  0

Passing: btrfs filesystem resize max /mnt as root does not seem to work, it reports as follows.
Resize device id 1 (/dev/mapper/system-root) from 142.52GiB to max

Is this because system-swap is in the way of system-root i.e. (254:1 above 254:2)? I’ve been trying to review ion this for a number of hours now and feel jammed up. How can I increase the system-root LV size most easily in this situation?

I have include a screenshot of GParted displaying /dev/sda partitions.

-Thanks

man lvresize

lvresize -L +200G system/root

or whatever size you need.

Please, post computer text as preformatted. You do know how to do it - why do you do it only for some content and not for the other?

And you also do include the command within the copy past sometimes (e.g. with the cat /etc/fstab) , but other times you say things like

Please do all the same: include the line with the command (and still better that line complete with the prompt) up to and including the line with the next prompt (which will signal the output is complete) and of course within a Preformatted text paragraph.

Thank you for your responses on this, I am not very experienced with the composer as you see. After my initial posting on this topic I was able to extend the Logical Volume. Earlier morning before reviewing and then responding here now by passing: lvextend -L +100%Free /dev/system/root I was then able to then extend the filesystem by passing:

btrfs filesystem resize max /mnt
Resize device id 1 (/dev/mapper/system-root) from 924.98GiB to max

Now

paul@paul-Thinkcentre-M91p:~> lsblk -f
NAME                                      FSTYPE      FSVER    LABEL      UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
fd0                                                                                                                             
sda                                                                                                                             
├─sda1                                                                                                                          
└─sda2                                    crypto_LUKS 1                   d095bece-13e0-47ca-b2a9-f6119d3989fc                  
  └─Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062
                                          LVM2_member LVM2 001            1yV15y-4YP2-Nekm-EWX2-eiId-uhEi-zxTcvc                
    ├─system-swap                         swap        1                   e736498b-60e5-4f99-99c2-8a6850a78ca9                  [SWAP]
    └─system-root                         btrfs                           605560ad-fe93-4d09-8760-df0725b43ee1    853.1G     8% /var
                                                                                                                                /usr/local
                                                                                                                                /srv
                                                                                                                                /root
                                                                                                                                /opt
                                                                                                                                /home
                                                                                                                                /boot/grub2/x86_64-efi
                                                                                                                                /boot/grub2/i386-pc
                                                                                                                                /.snapshots
                                                                                                                                /
sdb                                                                                                                             
├─sdb1                                                                                                                          
└─sdb2                                    crypto_LUKS 1                   4e34a45f-4613-47a2-b6a7-467c85400d45                  
sdc                                       crypto_LUKS 2                   fd28e551-c765-461e-aab0-a2c49bb786b9                  
└─luks-fd28e551-c765-461e-aab0-a2c49bb786b9
                                          vfat        FAT16    WORLDWIDE1 E371-0A4A                              1005.8M    49% /run/media/paul/WORLDWIDE1
paul@paul-Thinkcentre-M91p:~>

Now

paul@paul-Thinkcentre-M91p:~> lsblk
NAME                                                                       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
fd0                                                                          2:0    1     4K  0 disk  
sda                                                                          8:0    0 931.5G  0 disk  
├─sda1                                                                       8:1    0     8M  0 part  
└─sda2                                                                       8:2    0 931.5G  0 part  
  └─Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062 254:0    0 931.5G  0 crypt 
    ├─system-swap                                                          254:1    0   6.5G  0 lvm   [SWAP]
    └─system-root                                                          254:2    0   925G  0 lvm   /var
                                                                                                      /usr/local
                                                                                                      /srv
                                                                                                      /root
                                                                                                      /opt
                                                                                                      /home
                                                                                                      /boot/grub2/x86_64-efi
                                                                                                      /boot/grub2/i386-pc
                                                                                                      /.snapshots
                                                                                                      /
sdb                                                                          8:16   0 111.8G  0 disk  
├─sdb1                                                                       8:17   0     8M  0 part  
└─sdb2                                                                       8:18   0 111.8G  0 part  
sdc                                                                          8:32   1   1.9G  0 disk  
└─luks-fd28e551-c765-461e-aab0-a2c49bb786b9                                254:3    0   1.9G  0 crypt /run/media/paul/WORLDWIDE1
paul@paul-Thinkcentre-M91p:~>
paul@paul-Thinkcentre-M91p:~> df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/system-root btrfs     925G   70G  854G   8% /
devtmpfs                devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                   tmpfs     3.8G  1.3M  3.8G   1% /dev/shm
tmpfs                   tmpfs     1.6G  1.8M  1.6G   1% /run
tmpfs                   tmpfs     3.8G  104K  3.8G   1% /tmp
/dev/mapper/system-root btrfs     925G   70G  854G   8% /.snapshots
/dev/mapper/system-root btrfs     925G   70G  854G   8% /boot/grub2/i386-pc
/dev/mapper/system-root btrfs     925G   70G  854G   8% /boot/grub2/x86_64-efi
/dev/mapper/system-root btrfs     925G   70G  854G   8% /home
/dev/mapper/system-root btrfs     925G   70G  854G   8% /opt
/dev/mapper/system-root btrfs     925G   70G  854G   8% /root
/dev/mapper/system-root btrfs     925G   70G  854G   8% /srv
/dev/mapper/system-root btrfs     925G   70G  854G   8% /usr/local
/dev/mapper/system-root btrfs     925G   70G  854G   8% /var
tmpfs                   tmpfs     770M   84K  770M   1% /run/user/1000
/dev/dm-3               vfat      2.0G  962M 1006M  49% /run/media/paul/WORLDWIDE1
paul@paul-Thinkcentre-M91p:~>

I am able to see that the Logical Volume and the btrfs filesystem have been expanded.

1. In looking at man lvresize and man lvextend what is the largest difference between lvresize and lvextend?
2. Passing:

paul@Thinkcentre-M91p:~ # vgs
File descriptor 48 (anon_inode:inotify) leaked on vgs invocation. Parent PID 7923: -bash
File descriptor 52 (/memfd:pulseaudio (deleted)) leaked on vgs invocation. Parent PID 7923: -bash
File descriptor 66 (/memfd:pulseaudio (deleted)) leaked on vgs invocation. Parent PID 7923: -bash
  VG     #PV #LV #SN Attr   VSize   VFree
  system   1   2   0 wz--n- 931.50g    0 
paul@Thinkcentre-M91p:~ #

3.

Passing:  paul-Thinkcentre-M91p:~ # lvs
File descriptor 48 (anon_inode:inotify) leaked on lvs invocation. Parent PID 7812: -bash
File descriptor 52 (/memfd:pulseaudio (deleted)) leaked on lvs invocation. Parent PID 7812: -bash
File descriptor 66 (/memfd:pulseaudio (deleted)) leaked on lvs invocation. Parent PID 7812: -bash
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root system -wi-ao---- 924.98g                                                    
  swap system -wi-ao----   6.52g                                                    
paul-Thinkcentre-M91p:~ #

4. How large of a concern are the “File descriptor” messages shown in 2. and 3. above?

-Thanks

lvresize can reduce the size.

You can ignore them.

Thank you once again for your input on this. I would like to note that initially while renaming the LUKS container name I did attempt to change the drives UUID in /etc/crypttab (After creating a cloned backup medium) with no success. The machine would stall while kernel loading (a start job is running)…

Now Currently

paul-Thinkcentre-M91p:~ # blkid
/dev/mapper/system-swap: UUID="e736498b-60e5-4f99-99c2-8a6850a78ca9" TYPE="swap"
/dev/sdb2: UUID="4e34a45f-4613-47a2-b6a7-467c85400d45" TYPE="crypto_LUKS" PARTUUID="2b36b12e-b55f-4583-adad-6ab0c3e9ad25"
/dev/sdb1: PARTUUID="1d3c7516-4550-4557-8daf-7c5dc66c7602"
/dev/mapper/system-root: UUID="605560ad-fe93-4d09-8760-df0725b43ee1" UUID_SUB="9f432c50-c69e-48b3-aa59-d38a3e95d117" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/mapper/Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062: UUID="1yV15y-4YP2-Nekm-EWX2-eiId-uhEi-zxTcvc" TYPE="LVM2_member"
/dev/sdc: UUID="fd28e551-c765-461e-aab0-a2c49bb786b9" TYPE="crypto_LUKS"
/dev/sda2: UUID="d095bece-13e0-47ca-b2a9-f6119d3989fc" TYPE="crypto_LUKS" PARTUUID="079f8463-1d50-4049-a58e-2f086dd48741"
/dev/sda1: PARTUUID="c387f059-6536-4b3f-9889-08cec2cbc8ce"
/dev/mapper/luks-fd28e551-c765-461e-aab0-a2c49bb786b9: SEC_TYPE="msdos" LABEL_FATBOOT="WORLDWIDE1" LABEL="WORLDWIDE1" UUID="E371-0A4A" BLOCK_SIZE="512" TYPE="vfat"
paul-Thinkcentre-M91p:~ # cat /etc/crypttab
Lenovo_M57p-openSUSE_Tumbleweed-WDC_WDS100T2B0A-00SM50-SN_1909AF805062  UUID=d095bece-13e0-47ca-b2a9-f6119d3989fc  none  x-initrd.attach
paul-Thinkcentre-M91p:~ #

1. Is there any sort of benefit to rename any of the mediums UUID’s here?
2. After renaming the mediums name, after powercycling, asked for a passphrase twice. Firstly at grub2 menu and secondly before kernel volume load. Passing: sudo update-bootloader --refresh then powercycling has returned machine state to passphrase being asked/required only once prior to grub2 able to execute boot cycle. Is this a somewhat normal occurrence are you aware? Is this as secure in your view as two separate passphrase required?
3. Do you know how to revert back to two separate passphrase required instances during machine boot cycle?

-Thanks