1

Hi, I have 2 block devices: a 256G SSD and an 1TB HDD. I want to do:

*Use the SSD storage for actively accessed and speed demanding files/directories such as runtime files, main system resources; and the HDD for storing sparsely accessed files/directories such as images, notes, or a program that isn’t planned to be used frequently. I’m not sure but it might be done using LVM cache.

*Allocate volume and or storage when needed. I think this is done with thinly-provisioned Logical Volumes (Thin Volumes) and or a file system that supports “sparse files”, but not totally sure. My main point is to be all of this operate automatically when needed caused in case one of my actions.

*Take snapshots of dotfiles and system related vital files. The problem here is I do not know if I should use BTRFS or LVM Snapshots or both?? I think in essence they are both same that they perform CoW snapshots; though, I do not know if I am correct here %100.

How can I accomplish all of this or do they make sense? Besides, I am not sure on which filesystem to choose, so I would appreciate any suggestions on that. Additionaly, if you know any good books/materials on those kind of topics or Linux/Unix; I would like to hear that and check them.

Thx for reading to the end :)

mook765
  • 18,644
zLadin
  • 11

1 Answers1

1

I have a similar setup. I created two LVM groups, one for the SSD (actually I have a couple) and one for the HDD. I install Ubuntu on to the SSD. My system has a 100GB partition of /, and the rest as LVM. I have second SSD, all of which is the LVM. So:

SSD0: / 100GB Swap 30GB LVM PV (about 800GB)

SSD1: LVM PV (about 1GB)

These two are in the volume group: SSD-VG

I have a 6TB HDD in the volume group HDD-VG

Then in SSD-VG, I create logical volumes (LVs) for /home, /opt and /Tardis (Tardis is a rsnapshot directory, because its bigger on the inside than the outside, and I can go back in time, get it?)

In the HHD-VG I have slowly changing stuff: /data, /Pictures, /Music, /Video, /ISO, /mail, /www

I have spare space in the volume group, so I can create ad-hoc volumes when the need arises. If I get the disk space wrong when I estimate it, I can use LVM to resize the partition.

LVM has a number of commands at the command line. I do use those, but sometimes I cheat. I have webmin installed, which allows me to manage the LVM in a graphical way. Once setup I don't generally paly with LVM at the PV or VG level very much, so I forget the commands. WebMin helps with this. And it allows me to create a new VG, format the new volume, mount it, all with a couple of click.