Announcement

Collapse
No announcement yet.

What is optimal partition scheme for a new SSD NVM1tb M.2 HARD DRIVE ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is optimal partition scheme for a new SSD NVM1tb M.2 HARD DRIVE ?

    Linux Storage: Avoid These Common Mistakes When Working on Partitions https://www.youtube.com/watch?v=I7jwQrwPkyY&t=230s

    So without re-installing, but using the liveUSB with GPARTED as advised here: https://www.youtube.com/watch?v=I7jwQrwPkyY&t=230s I ended up from Left to Right on the GParted illustration of a harddrive

    GMKtec Mini PC Intel i5-12450H(Turbo 4.4 GHz) 32GB DDR4 1TB M.2 NVMe SSD
    5 PARTITIONS​


    2mb unallocated free space
    300mb fat32 boot,esp
    ~500,000 mb main kubuntu drive with only about hardly anymore than 13.5 gigabytes in the default installation
    ~ 30,000 mb SWAP
    ~441,000 MB EXTRA ext4/ with no particular label with pretty much 2mb free blank space at the start

    Can someone tell me an ideal and optimal partition scheme for this? Does it matter if I separate /home and /root partitions at all much?​

    The size and number of partitions are choices of the user installing and depend upon the use case. Hibernating, using a lot of graphics for whatever reason may require it. Kubuntu probably creates a swapfile rather than a swap partition with newer releases. You can run the command: ls / and the output will show whether you have a swapfile. You can change a swap partition after install. The link below to the ubuntu.com site discusses swap partitions/file in detail.

    https://help.ubuntu.com/community/SwapFaq
    Originally posted by lvm_
    EFI - not EFI/boot but just EFI, must be a separate partition because it's FAT, everything else doesn't. Partitioning is an artificial barrier which sooner or later you would like to move and it won't be easy, that's why modern distros install everything to root by default. There might be minor advantages in having separate partition for home, but separate swap and boot rightfully belong to the past. And there is also LVM.

    It defaulted at 300mb and it's flagged as ---"
    -boot, esp
    "​


    Member

    Registered: Nov 2003
    Location: PACIFIC TIME ZONE
    Posts: 310

    Original Poster Rep:
    "separate swap and boot rightfully belong to the past." Why? or Why Not?
    Quote:
    separate swap and boot rightfully belong to the past.
    Why? or Why Not?

    Great, right after I made a swap partition and an extra partition anyways.

    #2
    May as well disclose where this is coming from: https://www.linuxquestions.org/quest...on-4175746981/
    The size and number of partitions are choices of the user installing and depend upon the use case. Hibernating, using a lot of graphics for whatever reason may require it. Kubuntu probably creates a swapfile rather than a swap partition with newer releases. You can run the command: ls / and the output will show whether you have a swapfile. You can change a swap partition after install. The link below to the ubuntu.com site discusses swap partitions/file in detail.

    https://help.ubuntu.com/community/SwapFaq

    Comment


      #3
      Ideal and optimized is of course 100% subjective.
      There is no right or wrong way, really.

      You have to have that fat32 partition with the boot flag mounted at /boot/efi. Anything else is preference

      Having a separate /home is not a bad thing, and helpful for quick restores upon a reinstall. Good for distro hoppers who want to keep their personal data and desktop settings, or to have /home on a different drive. Simple and easy.

      Another option, a bit more advanced, is to use a btrfs file system. This allows for system snapshots and keeps / and / home separate but sharing the same space. You don't need to worry as much about partition sizes or running out of space on your root because it was too small.
      The snapshots and restores are very very useful as it can roll back to a known good state in seconds instead of reinstalling, and you can browse the files in those snapshots as well. This setup is pretty simple, if you use a tool like Timeshift, which makes setting up and restoring snapshots very very simple and easy. IMO this isn't as useful for the new distro hopper. Btrfs can be simple but also can grow as you learn more about it and maybe use its more advanced capabilities, which won't have handy GUI tools.

      Swap Basically depends on if you need to hibernate. You want a patition for this a bit larger than your ram size. Otherwise just use a small swap file. Automatic drive setups will include this ootb. Any manual partitioning probably needs this done manually post-install. 2Gb is enough.

      Comment


        #4
        Thank you for responding claydoh


        Originally posted by claydoh View Post
        Ideal and optimized is of course 100% subjective.
        There is no right or wrong way, really.

        You have to have that fat32 partition with the boot flag mounted at /boot/efi. Anything else is preference


        Having a separate /home is not a bad thing, and helpful for quick restores upon a reinstall. Good for distro hoppers who want to keep their personal data and desktop settings, or to have /home on a different drive. Simple and easy.
        By "distro hopper" you mean someone who re-installs the whole system with different distros, yet retaining home folder settings?
        I really don't expect to altogether do "distro hopping" with the same so called "desktop settings" and the same disk drive unless it's a clean install with the drive utterly erased first. I've always had important data in important set of folders and subfolders that I altogether duplicate and backup all the time, if not altogether keep in an external drive.


        If the whole operating system is becoming problematic, that's usually when I altogether do a clean install after all the important data is backed up. And sometimes that "clean install is with another drive altogether and the unreliable drive is filed away as an external data can or disposed of altogether, especially my old magnetic mechanical drives now that SSD is affordable.

        It makes no difference whether that source bunch of data is in any particular drive as long as the drive isn't damaged.​

        Another option, a bit more advanced, is to use a btrfs file system. This allows for system snapshots and keeps / and / home separate but sharing the same space. You don't need to worry as much about partition sizes or running out of space on your root because it was too small.
        The snapshots and restores are very very useful as it can roll back to a known good state in seconds instead of reinstalling, and you can browse the files in those snapshots as well. This setup is pretty simple, if you use a tool like Timeshift, which makes setting up and restoring snapshots very very simple and easy. IMO this isn't as useful for the new distro hopper. Btrfs can be simple but also can grow as you learn more about it and maybe use its more advanced capabilities, which won't have handy GUI tools.
        I don't see the point of having an absolute identical "snapshot". I feel like if the operating system can't be cleaned up and maintained very well, I tend to do clean installs and start from scratch. I just am not appreciative of the whole "restore point" fiddling because I'd rather just routinely backup & duplicate important data.

        I'm not a video gamer, not a big movie maker, not a fancy nor elaborate cgi 3d print crafter, I just do digital 2d crude graphics artwork blog and sometimes collect important videos and other digital books and pdfs.

        Swap Basically depends on if you need to hibernate.
        Hibernate is absolutely minimum power without being powered off and needing to reboot it? Where as sleep mode is more than absolute minimum? I'll look into it more.


        You want a partition for this a bit larger than your ram size. Otherwise just use a small swap file. Automatic drive setups will include this ootb. Any manual partitioning probably needs this done manually post-install. 2Gb is enough.
        https://www.maketecheasier.com/what-is-btrfs/


        THANK YOU

        Comment


          #5
          No these snapshots are essentially diffs, not full copies at all. Barely any disk space is used even when keeping a large number if snapshots.

          If you mess up or have a breakage you can restore the snapshot to its a previously saved state in moments plus a reboot.
          Last edited by claydoh; Feb 02, 2025, 02:24 AM.

          Comment


            #6
            Originally posted by antarctictaco020125 View Post
            absolutely
            Hibernate is suspend-to-disk. Contents of your RAM are written to the swap and the computer completely shut down. This is disabled in Ubuntu because many systems are buggy with it, though many do enable and use it after testing that it works properly for them. This needs large swap space big enough to fold the contents of your RAM on its own partition

            Normal suspend, or sleep, is the low power state with your RAM kept alive to save your state. This is what most people use. You don't use swap here.
            Last edited by claydoh; Feb 02, 2025, 06:22 PM.

            Comment


              #7
              Originally posted by claydoh View Post
              No these snapshots are essentially diffs, not full copies at all. Barely any disk space is used even when keeping a large number if snapshots.

              If you mess up or have a breakage you can restore the snapshot to its a previously saved state in moments plus a reboot.
              Article of interest:
              Win 10 - System Restore Point vs VSS snapshot
              https://www.reddit.com/r/sysadmin/co..._vss_snapshot/

              Comment


                #8
                Completely unrelated.
                It's the sort of thing an AI chatbot finds when discussing Linux with it lol.

                Comment


                  #9
                  The "optimal" partitioning scheme is the one required EFI partition and one BTRFS partition and that's it. Anything else is just a waste of space.

                  Using BTRFS eliminates any reason to divide the drive space at all, less the mandatory EFI partition. The use of BTRFS subvolumes creates segregated sections (root, home, etc.) of the file system but does not fix the position of free space. In other words; a single partition with subvolumes allows all the subvolumes to expand and contract as needed sharing the free space as needed.

                  Use a SWAP file (in the case of BTRFS, with a SWAP subvolume) instead of a SWAP partition for the reason stated above plus to gain the additional flexibility of changing the amount of swap space if your needs change without having to re-partition.


                  Also, IMO, if you don't understand the extreme value of having the ability to use snapshots, you likely don't understand what they are or how they can be used. For example, 5 second recovery from a failed package install or otherwise damaged system is exceedingly less time consuming and lower workload than re-installing from scratch or restoring from a backup. Also, you gain the ability to instantly recover mistakenly deleted files. I consider snapshot capability to be the single largest and most important advancement in file systems in many decades and possibly my entire lifetime of using computers - since 1977.

                  Please Read Me

                  Comment


                    #10
                    Originally posted by claydoh View Post
                    ...This needs large swap space on its own partition...
                    I do not believe this to be a true statement.

                    https://wiki.archlinux.org/title/Pow..._and_hibernate

                    Please Read Me

                    Comment


                      #11
                      Probably not any more. I neglected to double check.

                      Comment


                        #12
                        The use of a swap file or dedicated swap partition is purely a personal choice. For my Linux, I choose a separate swap partition - just because
                        The next brick house on the left
                        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                        Comment


                          #13
                          I still have a swap partition because I multiple-boot and having one swap partition is smaller the 4-5 swap files.

                          Please Read Me

                          Comment

                          Working...
                          X