How to lay-out drive partitioning?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
111MilesToGo
Level 2
Level 2
Posts: 90
Joined: Fri Oct 14, 2016 5:43 am

How to lay-out drive partitioning?

Post by 111MilesToGo »

I would like to collect recommendations on how to lay out drive partitioning for installing Linux Mint 18.1 (Cinnamon) as well as my data.

My system: Reasonable laptop (HP 8560w with 16 GB RAM, 4-core Intel-5), internal hard drive is a Samsung 850 EVO 2 TB SSD. I want to have Linux Mint as my only "physical" operating system, while I have various Windows OS's as virtual machines within VirtualBox.

On hard disk encryption (Linux Mint install option) pros and cons:
"Pro" because of safety and privacy first.
"No" because of speed; e.g. booting a Windows 10 virtual machine within Oracle VirtualBox takes 15 sec without encryption and 30 sec with encryption. All other hard disk operations take longer, too. Plus, the four processors are shared 2:2 between Linux and a virtual machine.
Question: How does the Linux Mint HD encryption work? Does it encrypt each and every file on disk, or does it just encrypt the file access tables?

My main concern and search for recommendations is on how to lay out the hard disk partitioning, if at all. I have
  • the Linux Mint system,
  • and I have VirtualBox with several virtual machines (one of them being Windows 10 with fixed 100 GB allocation, the other Windows XP with free HD space),
  • and I have tons = 800 GB or say 1 TB of music (in particular, large FLACs) and a few videos to be sitting somewhere within Linux (not within the Windows virtual machine allotment, but as a shared drive between Linux and the VB VMs.)
My questions are:
  • Given that my hard drive is an SSD and that SSD wear is a paramount consideration, should I put the 1 TB of data (music etc) on the SSD at all?
    These files will not only be accessed occasionally for replay or transfer to USB sticks, but they will also have to be mass-accessed for tagging, CD ripping, music purchases etc. This is where hard drive speed matters for my data.
    Currently, I have this 1 TB of data on several external USB ordinary magnetic hard drives, but using such a drive for working with the data is annoying since these hard drives (Seagate) fall asleep after a short time of inactivity and take quite long to wake up.
  • A proposal is to partition the SSD into at least four or five partitions,
    1. one as a separate boot partition - yes or no? My laptop has BIOS booting, not EFI,
    2. one as a BIOS-GRUB partition when having a GPT on a BIOS-booted computer,
    3. one for the Linux system,
    4. one for its swap space (ca. 1.2 times the RAM),
    5. and one for /home to hold all my data (music) as well as the virtual machines.
    Am I correct in thinking that my home partition with the data and virtual machines will remain intact when at some point in time I might do a fresh install of a newer Linux Mint? Of course, with full backups...
Thanks a lot in advance for giving recommendations.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Petermint
Level 9
Level 9
Posts: 2979
Joined: Tue Feb 16, 2016 3:12 am

Re: How to lay-out drive partitioning?

Post by Petermint »

SSDs only wear when you write, not when you read. Magnetic disks wear out all the time, read or write. Put your music on the SSD.

Partitions are best used to help create backups. If you update your software all the time and the music only one per week, put them in separate partitions then set a different backup cycle for each partition.

Hard disk encryption has other problems including recovery from backups. A backup of a partition can copy the partition including the encryption or it can copy the data decrypted and perform a separate encryption on the backup disk. You need to carefully test recovery from encrypted backups to ensure you can recover on a different machine when your current machine breaks.

I would use the standard 4 partitions as one partition for the OS, one for your home directory, one for the music, and one for swap. You can then have different backup cycles and different encryption. In my case, all my music is from my CDs and is public. There is no reason to encrypt the music or to include the music in daily backups.

The step up from there is to assign all temp files to a RAM partition instead of disk.
User avatar
ugly
Level 5
Level 5
Posts: 592
Joined: Thu Nov 24, 2016 9:17 pm

Re: How to lay-out drive partitioning?

Post by ugly »

Petermint wrote:SSDs only wear when you write, not when you read.
Actually, that's not entirely true. Read disturbs are also a factor.

That said, any concern of SSD wear is usually overblown. Wear should not be a paramount consideration. Just use the SSD any way you want. You're not going to ruin it.

And even if you did cause so much wear that the drive became unusable it will probably last longer that most hard drives.

The key point is, if the data is important to you then you'll have a backup. And more than one.
Petermint
Level 9
Level 9
Posts: 2979
Joined: Tue Feb 16, 2016 3:12 am

Re: How to lay-out drive partitioning?

Post by Petermint »

Read disturb? A read disturb might occur after 100,000 reads and cause one erase cycle. The weakest SSD can erase/write 100,000 times which means a read disturb will have an effect after 10,000,000,000 reads. If you listen to Billy Ray Cyrus sing Achy Breaky Heart 100 times per day, your SSD will last 2,739,726 years.

Reads are more likely to cause problems when you have atime switched on, making the file system write every time a file is read. Back in the days when flash memory survived on 20,000 or 10,000 erase/write cycles, there were common Linux distributions defaulting to atime on. I had to switch off atime on many a system. Something like a Web browser can read hundreds of files for every page view with them all triggering hundreds of atime writes.

Perhaps I never had problems with flash memory, apart from Crucial, because I always had atime off.
111MilesToGo
Level 2
Level 2
Posts: 90
Joined: Fri Oct 14, 2016 5:43 am

Re: How to lay-out drive partitioning?

Post by 111MilesToGo »

Thanks to all for answering. Following your advice and Pjotr's Easy Linux Tips Project, I'll use noatime for the relevant partitions.
Locked

Return to “Other topics”