Originally Posted by
syn0ptic
Hey!
I wonder if there's a way to add persistent partition to the full Ubuntu installation?
So all the changes I made should be saved on persistent partition even if I reinstall the whole system.
Sorry if there's such topic but I couldn't google it.
We call these things "backups".
You can, and should, split your install areas up. OS, settings, temporary data, personal configs, data, etc. For most desktop users, all the data and personal configs are stored in their HOME directory. That's part of the Unix design going back to the 1960s. On most Linux systems, this is in /home/{username}.
If you learn about where the different parts of linux files and directories are kept, then what seems like a mystery isn't anymore. There are standards for where stuff goes and they aren't hard. There's a 1 pg table here: https://en.wikipedia.org/wiki/Filesy...archy_Standard Takes about 2 minutes to skim, the table.
At a minimum, split your /home into a different partition. Let everything else go to / - another partition.
Of you want to more control or protection, you can split the OS into finer control areas. I do this:
Code:
NAME TYPE FSTYPE SIZE FSAVAIL FSUSE% LABEL
nvme0n1 disk 931.5G
├─nvme0n1p1 part ext2 1M
├─nvme0n1p2 part vfat 50M 43.8M 12% /boot/efi
├─nvme0n1p3 part ext4 700M 313.8M 46% /boot
└─nvme0n1p4 part LVM2_member 930.8G
├─vg01-swap01 lvm swap 4.1G [SWAP]
├─vg01-root01 lvm ext4 35G 24.7G 23% /
├─vg01-var01 lvm ext4 20G 13.1G 28% /var
├─vg01-tmp01 lvm ext4 4G 3.6G 0% tmp01 /tmp
├─vg01-home01 lvm ext4 20G 4.6G 72% home01 /home
└─vg01-libvirt--01 lvm ext4 137G 2.8G 98% libvirt--01 /var/lib/libvirt
I use LVM rather than partitions. Much more flexible for many needs. You can see I'm using less than 50% of the SSD's 1TB storage. That's because LVM's power and flexibility is mostly useful when it isn't fully allocated. Adding more storage when and where it is needed is 5 seconds of effort with LVM. Zero downtime.
The extra partitioning (logical volumes) are so I can mount each storage chunk with different mount options to gain more security than the defaults. I've posted detailed descriptions about each and why they are sized the way they are a few times. Search these forums for that.
That's just the OS storage. This specific system has plenty of storage:
Code:
$ inxi -D
Drives: Local Storage: total: 15.46 TiB used: 3.28 TiB (21.2%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 1TB size: 931.51 GiB
ID-2: /dev/sda vendor: Western Digital model: WD8002FZWX-00BKUA0 size: 7.28 TiB
ID-3: /dev/sdb vendor: Western Digital model: WD8002FZWX-00BKUA0 size: 7.28 TiB
I just pulled 4x2TB HDDs from it to be retired after moving the data to sda. I added 100G to an LV under sda yesterday to allow for some video processing space. Did that expansion while the same file system was active and busy. HQ video files eat lots of storage during processing. Usually over 30GB/hr of video. 3 hours is about 100GB and that's at 1080p, not even 4K resolution.