Score:0

Which top directories in Ubuntu do frequently change?

br flag

I'm using Kubuntu-20.04, and LVM2 partition.

Before installing some software, I'm afraid that the new soft get mess my system, so I often take a snapshot of the root volume. But the root volume changes very frequently, result that the snapshot would inflate much fast.

I want to separate some freq-changing dynamic data such as /var/log, /home, into another lvm volume, and let merely the sys-configuration and programs data(/etc, /usr/bin) stay in the root volume. Therefore, the snapshot of the root volume would need relative smaller space.

My question is: Which top folders of Ubuntu are such freq-changing, and which folders are relative static?

Thanks!!!

in flag
This will be a hard question to answer without knowing a great deal more about how you use your computer and what applications are run most often
Leon avatar
br flag
Haha, I know. You are right. Maybe I should learn about the meanning of the directory structure of Linux.
in flag
Having `/home` and `/var/log` in a separate volume (or pool, of you're using ZFS) would certainly reduce writes to the root volume. If you are using any sort of database like MySQL or PostgreSQL, you will probably want that split off as well. If there is a web server involved, that can also be split off. However, this is really something that only you can answer
Leon avatar
br flag
I'm using PostgreSQL. I guess that what I only need to spearate are /home and /var. Am I right ?
in flag
That'll get you started, yes. From there you can monitor your snapshot sizes and see if there is unexpected growth
Leon avatar
br flag
Thanks! @user535733 You know that it is easy to install a soft onto a clean & fresh system, and it's less faults than onto a working system with too many soft installed. Maybe there is no fault with a fresh system, but still failed with a working system.
user535733 avatar
cn flag
LVM snapshots should be used to *augment* a backup. Too many snapshots means that it's time for a backup. Also, I don't understand the real problem -- if a change or new software causes a problem, then simply revert to the last snapshot. That's a key feature of LVM: You can safely test and revert without need for a VM or container. You can safely test on your actual, complex system.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.