Partitions for SDD + HDD and VM on the side

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:

  1. so what else should go inside the HDD besides the \home partition?
  2. 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)?
  3. I should refrain from mounting (not speaking of formatting) the windows disks if I intend to use them for a virtual machine, right?

thanks in advance

IMO

  1. 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.
  1. 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 User:Tsu2/free tool - openSUSE Wiki)

  2. 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 (User:Tsu2/loop devices - openSUSE Wiki)

HTH,
TSU

Hi
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;
 lsblk
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

thanks for the reply Tsu2 and malcolmlewis.

  1. 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.

  2. 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?

From journal:

Jul 26 14:53:55 erlangen kernel: PM: hibernation entry
Jul 26 14:53:55 erlangen kernel: PM: Syncing filesystems …
Jul 26 14:55:41 erlangen kernel: PM: done.
Jul 26 14:55:41 erlangen kernel: Freezing user space processes … (elapsed 0.002 seconds) done.
Jul 26 14:55:41 erlangen kernel: OOM killer disabled.
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x00058000-0x00058fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x0009e000-0x000fffff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x57bf0000-0x57bf0fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x57c01000-0x57c02fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x57c12000-0x57c12fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x58b37000-0x58b81fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x58bd4000-0x592d6fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x592e4000-0x592e4fff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x592eb000-0x592ebfff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x76e2b000-0x77ffefff]
Jul 26 14:55:41 erlangen kernel: PM: Marking nosave pages: [mem 0x78000000-0xffffffff]
Jul 26 14:55:41 erlangen kernel: PM: Basic memory bitmaps created
Jul 26 14:55:41 erlangen kernel: PM: Preallocating image memory… done (allocated 1563828 pages)
Jul 26 14:55:41 erlangen kernel: PM: Allocated 6255312 kbytes in 3.71 seconds (1686.06 MB/s)
Jul 26 14:55:41 erlangen kernel: Freezing remaining freezable tasks … (elapsed 0.001 seconds) done.
Jul 26 14:55:41 erlangen kernel: Suspending console(s) (use no_console_suspend to debug)
Jul 26 14:55:41 erlangen kernel: wlp3s0: deauthenticating from 08:96:d7:e2:d6:d3 by local choice (Reason: 3=DEAUTH_LEAVING)
Jul 26 14:55:41 erlangen kernel: serial 00:01: disabled
Jul 26 14:55:41 erlangen kernel: ACPI: Preparing to enter system sleep state S4
Jul 26 14:55:41 erlangen kernel: PM: Saving platform NVS memory
Jul 26 14:55:41 erlangen kernel: Disabling non-boot CPUs …

Partitions are:

erlangen:~ # inxi -P
Partition: ID-1: / size: 31.37 GiB used: 16.26 GiB (51.8%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /home size: 406.34 GiB used: 176.85 GiB (43.5%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-3: swap-1 size: 31.90 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p1 
erlangen:~ # 

/home is relatively small with media files moved to HDD:

erlangen:~ # df -h /home-HDD/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda4       3.6T  1.7T  1.9T  47% /home-HDD
erlangen:~ # 

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.

TSU