Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Partitioning scheme for SSD and 2x HDD

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Zeid
Posts: 4
Joined: 2020-01-29 06:59

Partitioning scheme for SSD and 2x HDD

#1 Post by Zeid »

Hello,

Sorry for the (maybe) redundant question - I did some research prior, checked the Forum posts, but still got my head jumbled due to several answers.

I'll add the resources I used at the end of this, just for reference.

As the title states I'm having trouble deciding on a proper partitioning scheme for my system.
I don't have any dual-boot on it, and will never have.

And its usage is mainly for Plex Media Server and downloading .torrent files.
I'm using it for quite some time with a specific LVM partitioning (on those HDDs) but managed to get my hands on an SSD - and I have no idea of the proper schema for these.

Here it goes:
Storage schema
1x SSD 240GB
2x HDD 1TB each

OS
Debian 10.2 - won't dual boot, ever.

My own partitioning schema suggestion
SSD: /boot /root, /var, /usr, /home (100GB for home as I plan to symlink or bind from the HDDs)
HDDs: /swap and /tmp as Standard Partitions and the rest of the space in a LVM - used for DATA storage only (Music, Videos, etc.) which I'll bind or sym to the SSD's /home

Idea is to remove the need of DATA back-up in case a re-installation is required.
Didn't reinstall/format my Server for about 3 years - but a week ago I had to do it due to it not being able to boot after a power surge.

Would you say the partitioning scheme I managed to put together is okay or I can just shove everything on the SSD and use the HDDs just for DATA as LVM?

Appreciate the help!
Take care!

Resources I used:
http://forums.debian.net/viewtopic.php?f=17&t=122099 - partition
https://help.ubuntu.com/community/PartitioningSchemes - partition example

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Partitioning scheme for SSD and 2x HDD

#2 Post by CwF »

How often do you boot, and how important is it that is configures itself without user intervention. Lots of variables.

I only partition an OS disk if it uses /swap. Otherwise use only full disk with a single 'label' partition, and use the label to mount anywhere. My Main system has 7 disk devices and I've never modified fstab. Personally I think this is the easy way. The OS will never error or not fully boot because one of those extra devices complains.

The convenience starts with a triad, that's 3 devices. Two OS's and bulk storage. Either OS can boot and image the other OS to bulk. That is a maximum durability start. Technically the 2nd OS can be simpler and on usb, ssd, spinner, whatever. You could leave it off much of the time. More than 2 disk and any could be dynamically on/off depending on your use.

That secondary OS can be used also as a VM being built and managed under the primary OS. That secondary disk can have a boot entry. I prefer the OS to be on a small disk to be easier and tidier to image. I do use full disk encryption LVM for the OS, and it's alternate.

I used 120GB SSD's when I first built this way, so backup images are 120GB. I wish I'd used 64GB, Soon, 120GB's might be rare but are now cheap, I stocked up. Once the OS lands on a huge disk, then imaging isn't as practical.

Ultimately each disk device can be made to jump systems without issue, including the OS disk. Why encumber a bulk media storage disk as being an encrypted and compressed LVM member or some other nonsense. Maybe it's own self contained member, but not part of the OS group.

Personally I don't believe a 'user' system should be built like an unattended remote server.

None of my devices were born on the current machine. When you build a replacement simply prep that secondary OS and pop it in the new machine and migrate at your convenience.

Zeid
Posts: 4
Joined: 2020-01-29 06:59

Re: Partitioning scheme for SSD and 2x HDD

#3 Post by Zeid »

CwF wrote:How often do you boot, and how important is it that is configures itself without user intervention. Lots of variables.

I only partition an OS disk if it uses /swap. Otherwise use only full disk with a single 'label' partition, and use the label to mount anywhere. My Main system has 7 disk devices and I've never modified fstab. Personally I think this is the easy way. The OS will never error or not fully boot because one of those extra devices complains.

The convenience starts with a triad, that's 3 devices. Two OS's and bulk storage. Either OS can boot and image the other OS to bulk. That is a maximum durability start. Technically the 2nd OS can be simpler and on usb, ssd, spinner, whatever. You could leave it off much of the time. More than 2 disk and any could be dynamically on/off depending on your use.

That secondary OS can be used also as a VM being built and managed under the primary OS. That secondary disk can have a boot entry. I prefer the OS to be on a small disk to be easier and tidier to image. I do use full disk encryption LVM for the OS, and it's alternate.

I used 120GB SSD's when I first built this way, so backup images are 120GB. I wish I'd used 64GB, Soon, 120GB's might be rare but are now cheap, I stocked up. Once the OS lands on a huge disk, then imaging isn't as practical.

Ultimately each disk device can be made to jump systems without issue, including the OS disk. Why encumber a bulk media storage disk as being an encrypted and compressed LVM member or some other nonsense. Maybe it's own self contained member, but not part of the OS group.

Personally I don't believe a 'user' system should be built like an unattended remote server.

None of my devices were born on the current machine. When you build a replacement simply prep that secondary OS and pop it in the new machine and migrate at your convenience.
Thanks!
I usually reboot it during the weekends in case no power outage is happening; which is extremely rare.

Reason why I built the machine as a remote unattended server is because that's what I want it to be - 10 or 15% of the "label".
In terms of I usually SSH or access specific remote URLs, via personal VPN, for it in order to have it do its job (eg: update plex, wget files into several watched folders, etc.)
But indeed - it's not really as such since I mostly have direct access to it when I'm off work.

As for the LVM - want to do a non-encrypted VG like that in order to combine both of the HDDs and don't really end up later with "I'm missing 2GB from this HDD in order to move/download/copy this file"
Have no problem to use separate HDDs as separate entities, thought it'll be more useful for having things in once place (not referring to one HDD) rather than several different folders.

But I think I'll just do SSD as default OS (with all it adds) and have both of those HDDs formatted as separate ext4. Fill one in, start using the other and symlink each @/home.

I am not really set on using (or not) the /swap partition since my machine has 32GB RAM and it never reached that limit in terms of usage.
One thing I did notice though is that when I'm not logged in, let's say at reboot, it goes to hibernate in about 10 or 15 mins.
Even if I'm more than sure that @Power in the Settings panel I disabled this kind of action. But need to do proper investigations on these.
It started happening since Debian 10, on the previous 9.x never did.

Regardless, did note down your suggestions/details and plan to do proper research before I reinstall Debian.
Thank you for taking the time to reply!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Partitioning scheme for SSD and 2x HDD

#4 Post by p.H »

Zeid wrote:SSD: /boot /root, /var, /usr, /home (100GB for home as I plan to symlink or bind from the HDDs)HDDs:
/swap and /tmp as Standard Partitions and the rest of the space in a LVM - used for DATA storage only (Music, Videos, etc.) which I'll bind or sym to the SSD's /home
You should not separate /root. Or did you mean / ?
Why separate /boot and /usr ? They are not needed.
Why put swap (not /swap, it is not a filesystem and has no mount point) and /tmp in the HDD ? I would put both in the SSD, or put /tmp in tmpfs if there is enough RAM.

Zeid
Posts: 4
Joined: 2020-01-29 06:59

Re: Partitioning scheme for SSD and 2x HDD

#5 Post by Zeid »

p.H wrote:
Zeid wrote:SSD: /boot /root, /var, /usr, /home (100GB for home as I plan to symlink or bind from the HDDs)HDDs:
/swap and /tmp as Standard Partitions and the rest of the space in a LVM - used for DATA storage only (Music, Videos, etc.) which I'll bind or sym to the SSD's /home
You should not separate /root. Or did you mean / ?
Why separate /boot and /usr ? They are not needed.
Why put swap (not /swap, it is not a filesystem and has no mount point) and /tmp in the HDD ? I would put both in the SSD, or put /tmp in tmpfs if there is enough RAM.
Sorry, was referring to the / , thank you for noticing!

So, for me to understand - it's better to have them all on the SSD without bothering splitting (boot and usr) with swap also there.
I may be able to put /tmp on RAM since I have 32GB on it, but I'll check via the web how much it may eat from said RAM.

I'll stick to SSD = all, HDDs for data only and see how it fares in the long run

Think I got my answers on this topic, appreciate the immense help and clearing up my situation !

Don't know if I need to mark the topic as Solved or something - but in case I find out after this post, I'll do it.

Stay safe!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Partitioning scheme for SSD and 2x HDD

#6 Post by p.H »

Zeid wrote:So, for me to understand - it's better to have them all on the SSD without bothering splitting (boot and usr) with swap also there.
It is better to put as much as possible on the SSD because the SSD is much faster than HDDs.
There is no benefit to split /boot and /usr unless you have a good reason to do so (e.g. / using a filesystem type that GRUB cannot read, /usr mounted read-only).

If you want to use both HDDs in the same LVM VG without redundancy, keep in mind that failure of one HDD will cause the loss of any LV which has extents allocated from this drive.

Zeid
Posts: 4
Joined: 2020-01-29 06:59

Re: Partitioning scheme for SSD and 2x HDD

#7 Post by Zeid »

p.H wrote:If you want to use both HDDs in the same LVM VG without redundancy, keep in mind that failure of one HDD will cause the loss of any LV which has extents allocated from this drive.
That's what I'm afraid of honestly, been using said LVM for a while but last time I had to reinstall I got bothered by it, because I needed to first back-up all the data there, then clean it up.
Since the whole system was done under LVM.

I'll stick to default partitioning and mount the 2nd HDD when it's needed, better to be safe than sorry.
I do plan to get a bigger HDD then mirror some things on those small ones. As there is a lot of data that I don't really want to lose (random old/rare TV series), even if currently they're residing on an external HDD.

Thanks!

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Partitioning scheme for SSD and 2x HDD

#8 Post by CwF »

Zeid wrote:(random old/rare TV series)
HA! That might as well be part of the 'black ops' budget!

I've had only an TV antenna and a "convergence" computer since the original 'All-in-Wonder" video card. I never had a TV for decades, until commodity flat screen TV's replaced my SGI 16:10 monster tubes.
2 drives, 2 slots, 2 usb ports are dedicated to TV on my super system, crazy!

I'm still waiting to for an off binge day to watch:
The Avengers, and also In COLOR! gotta love Emma Peel.
Space1999, I tried but can't get through it..
Thunderbirds, I'm a kid again!
and another terabyte for the benefit of others...
Otherwise the system uses ~100GB to cache the last week of TV, I watch some, it overwrites itself..

To get back on topic concerning the mentioned swap. New for Buster is zram-tools. It works very well for both limited and abundant memory configs. I will pull this into stretch for testing soon, but it officially starts with buster. Overall things work better with some form of swap available. Zram swap can substitute and supplement swap partitions or swap files. I use 16 128MB devices on my host and 4 64MB devices in vm's with no other swap. For a bare metal machine or a hypervisor like mine in an encrypted LVM I'd recommend having a swap partition anyway, in addition to zram-swap. The zram will take priority and fill before using the partition, so you can experiment and size it to avoid the partition use but I would not eliminate the partition even if it's never used. For VM's I use a different tactic, zram-swap with no swap file or partition. If that runs out I simply balloon the vm's memory temporarily, and take note.

For motivation:

Code: Select all

$ uptime
 09:37:17 up 97 days, 18:41,  3 users,  load average: 0.85, 0.83, 0.96

Post Reply