hi, folks. I’m doing an experiment in a few weeks, the relevant hardware and intended function I’ve got is this:
SSD1 250 Gb - for tumbleweed
HDD1 2Tb - for tumbleweed
SSd2 240 Gb - for windows (VM)
HDD2 1 Tb - also for windows (same VM)
for a long time, I just install with KISS partitions: \ in the hardrive + swap along with it. I’ve read a few posts around, mostly centered on ubuntu, and I know the different distros don’t always handle all the system directories in the same way - the questions:
so what else should go inside the HDD besides the \home partition?
Is there a consensus now on the size of the swap file for systems with 16+Gb of RAM? and where should it go (SSD or HDD)?
I should refrain from mounting (not speaking of formatting) the windows disks if I intend to use them for a virtual machine, right?
The only real reason to put /home on the HDD is because the cost per byte on a HDD is so much lower than on an SSD. So, YMMV and you can make your decision accordingly. On a default openSUSE layout there are only 3 partitions to make a decision… swap, root and /home. But, someone who isn’t afraid of complexity can deploy more partitions for any reason…
Short list of reasons to create additional partitions…
Performance, isolating data with different activity so that “old” data doesn’t have to be defragmented as often and “often modified” data can be defragmented without unnecessarily working on files that doesn’t need defragmentation
Security. Place your most valued files in the same partition so they are affected as little as possible by unnecessary activity.
Maintenance - See above
VM storage -You don’t necessarily need to place your Windows VMs on their own disks, that would make your disk usage inefficient. But you’ll likely want to put your virtual disk images in their own partition for security and reliability.
AFAIK swap file sizing has not changed for more than a decade except for that every machine should have <some> swap. At one time people were saying that swap should be eliminated altogether but nowadays all OS will perform better with at least a little swap (see my Free tool Wiki article to know why https://en.opensuse.org/User:Tsu2/free_tool)
Virtual machines can point to several different types of file storage. Although it’s possible to point to ordinary files on a files system (often described as a raw file system), it’s far better to deploy the vm’s file system in a file (aka virtual disk). You can prepare a disk or partition for virtual disks storage by simply creating a partition and formatting with something the OS recognizes(I recommend BTRFS without snapshots). Your virtualization technology can then point to this location when a virtual disk is created for your vm. If you’re not familiar with virtual disks, I’d recommend you read the Wiki article I wrote about loop devices… but only for the concepts. Your virtualization will create, maintain your virtual disks in a way that shields you from knowing how to create and manage loop devices (https://en.opensuse.org/User:Tsu2/loop_devices)
Further to user Tsu’s comments, I use KVM and always create a separate partition on rotating rust format xfs for vm’s, not sure it’s worth a vm on a SSD, perhaps look at using part of the SSD as a disk caching device to speed up the rust… I personally only allocate 40GB for the OS (incl /home) on btrfs, any other space for a /data partition. I don’t suspend my machines, so for me swap on my TW setup is 4GB (on the SSD) and swappiness wound down.
TW with winX dual boot;
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 260M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 40G 0 part /
├─sda4 8:4 0 35G 0 part /data
├─sda5 8:5 0 4G 0 part [SWAP]
├─sda6 8:6 0 31.8G 0 part
└─sda7 8:7 0 789M 0 part
sure, or in the case of having too many files or files that are too large to fit inside the mentioned harddrive with the system, which is my case. I’m tempted to move a few more partitions out of the SSD, but I’ll decide that later since I’m a bit of a program hoarder.
there’s not much I’ll need to access from TW to what I’ll be doing inside the windows VM, but I’ll see to that later.
I do suspend relatively often, so I need a sizable swap then?
Suspending a virtual machine is highly, highly discouraged. Exposes the machine to corruption.
Suspending the HostOS is less risky, but should be done only with great care. Can also lead to corruption of any running virtual machines.
To support hibernation which is different than suspending, your swap file must be at least the size of your installed physical RAM so that the contents of your RAM can be written to disk.
hibernation = Save state of your machine before you shutdown. When the machine restarts, the contents are read back into memory.
suspend = Machine is not shut down, the machine is placed in a barely running state but still powered on. Everything in volatile RAM is still subject to loss should the machine be powered off unexpectedly.