Friday, May 17, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 567  / 2 Years ago, fri, january 14, 2022, 4:04:24

Much to my surprise I recently found myself to lack a swap partition.



Since (as is evident from the output of df, which I hereby repost) that I am running off a single encrypted volume, I was wondering how I can safely go about resizing everything and creating an 8 GB partition for use as a swap (and enabling it's use). I seem to remember that the scheme I opted for during installation is LUKS.



user@host:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root 237978256 14144120 211722472 7% /
none 4 0 4 0% /sys/fs/cgroup
udev 3829132 4 3829128 1% /dev
tmpfs 3844736 2060 3842676 1% /tmp
tmpfs 768948 1324 767624 1% /run
none 5120 0 5120 0% /run/lock
none 3844736 32312 3812424 1% /run/shm
none 102400 28 102372 1% /run/user
tmpfs 3844736 0 3844736 0% /var/spool
tmpfs 3844736 24 3844712 1% /var/tmp
tmpfs 3844736 936 3843800 1% /var/log
/dev/sda1 240972 84550 143981 37% /boot
/home/user/.Private 237978256 14144120 211722472 7% /home/user
user@host:~$


I'm a little out of my depth and I intuit that there's ample opportunity for disaster so I'd much appreciate some assistance. (And, though I would be disappointed if I accidentally nuked the drive, this is just a personal laptop with nothing criticcal on it, so I could always start over).


More From » partitioning

 Answers
5

There is a really nice tool called system-config-lvm, which helps guide the resizing, adding, removing and other functions of pv's and lv's of your LVM. Unfortunately, you'll run into issues trying to resize or edit an active partition.



You will need to run a Live Distribution in order to modify your SSD's partitions. You can do this with Ubuntu itself, or try out the [no-longer free] partedmagic. Parted Magic does have better features and functionality dealing with SSD/HDDs.



Once you're in a Live Distro, you'll be able to find lots of information on how to resize your partitions.




[#25166] Sunday, January 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
igeonlothe

Total Points: 370
Total Questions: 121
Total Answers: 114

Location: United States Minor Outlying Island
Member since Fri, Feb 5, 2021
3 Years ago
;