Setup below in general follows guide lines proposed in https://www.dwarmstrong.org/install-lmde-with-custom-lvm-luks/. However, we intend to remove swap LV and increase sizes of root and home LVs . Then reboot system and activate zram instead of keeping unreasonably large LV swap on /dev/vda
At the end of normal install with LVs root and swap reject reboot and open terminal session
mint@mint:~$ sudo -i
root@mint:~# lsblk -f
root@mint:~# vgs
Now we resize root LV
root@mint:~# lvresize -L 55G --resizefs lvmlmde/root
and remove swap LV due to intend activate zram after reboot
Remove swap LV
root@mint:~# swapoff /dev/ lvmlmde/swap
root@mint:~# lvremove /dev/ lvmlmde/swap
Create home LV with ext4 filesystem
root@mint:~# lvcreate -L 14G lvmlmde -n home
root@mint:~# mkfs.ext4 /dev/lvmlmde/home
Move home via mount the LVs:
root@mint:~# mkdir /mnt/{root,home}
root@mint:~# mount /dev/lvmlmde/root /mnt/root/
root@mint:~# mount /dev/lvmlmde/home /mnt/home/
Move the contents of /home from the root LV to the new home LV:
root@mint:~# mv /mnt/root/home/* /mnt/home/
Update fstab
Create an entry for home in /mnt/root/etc/fstab:
root@mint:~# echo "/dev/mapper/lvmlmde-home /home ext4 defaults 0 2" >> /mnt/root/etc/fstab
end remove swap entry from /mnt/root/etc/fstab
Activate zram
boris@Lmde7VMS:~$ sudo apt install zram-tools
Installing:
zram-tools
Summary:
Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
Download size: 6,456 B
Space needed: 29.7 kB / 46.9 GB available
Get:1 https://deb.debian.org/debian trixie/main amd64 zram-tools all 0.3.7-1 [6,456 B]
Fetched 6,456 B in 0s (18.3 kB/s)
Selecting previously unselected package zram-tools.
(Reading database ... 412256 files and directories currently installed.)
Preparing to unpack .../zram-tools_0.3.7-1_all.deb ...
Unpacking zram-tools (0.3.7-1) ...
Setting up zram-tools (0.3.7-1) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/zramswap.service' → '/usr/lib/systemd/system/zramswap.service'.
Processing triggers for man-db (2.13.1-1) ...
boris@Lmde7VMS:~$ sudo nano /etc/default/zramswap
boris@Lmde7VMS:~$ sudo zramswap start
<13>Oct 17 07:58:08 root: Starting Zram
/usr/sbin/zramswap: line 53: echo: write error: Device or resource busy
<13>Oct 17 07:58:08 root: setting compression algo to lz4
/usr/sbin/zramswap: line 54: echo: write error: Device or resource busy
<13>Oct 17 07:58:08 root: setting zram device size to 9815329996
mkswap: /dev/zram0: warning: wiping old swap signature.
Setting up swapspace version 1, size = 7.6 GiB (8179437568 bytes)
no label, UUID=0e9ce52a-c7dd-4a96-b5f5-9d7619adadfd
boris@Lmde7VMS:~$ sudo reboot
No comments:
Post a Comment