S
S
Shurik2021-05-29 17:00:38
linux
Shurik, 2021-05-29 17:00:38

How to properly install linux with two hard drives?

Good afternoon. I bought an nvme hard drive and I'm going to reinstall Ubuntu from ssd to it, and use ssd as a data storage.
Previously, with a single drive, I specified the mount point / for the system, and /home for the home directory.
The question is, what about two hard drives? Both are 500GB. If you put the system on one, then 500 is a bit much for the system only. Share it? If yes, then the question is about /home. Suppose I allocated 100 from these 500 to the system. In this case, home will be located on these 100, or better on the remaining 400. If on the remaining 400, then how will the system be reinstalled in the future so that nothing is lost in / home and everything is correct with in terms of no bugs compared to a full reinstall with a replacement of the /home directory.
In general, in short, what is the best way to design disk space in terms of the prospect of a gem-free reinstallation in the future?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
vaut, 2021-05-29
@vaut

I would put both root and home on NVME, and use the SSD for some heavy stuff.
I would implement it like this: I did not reinstall the system, but simply transferred everything to NVME. (boot from a LIVE distro, mark up partitions, copy, edit fstab)
After checking that everything worked for us on NVME, we format the SSD and mount it somewhere in /mnt/
On the SSD, create the storage directory and bind this directory to /home/user/storage /
Add these two mounts to fstab.
ALL. Now in the home we have a storage directory in which you can save any rubbish. If necessary, add more directories and mount them to other locations.
The second option is to collect them in the first raid using LVM. But, the access speed will be unpredictable and the failure of one disk will kill all the data.
The third option is to raid using btrfs or zfs. IMHO a little better than LVM, but the problems from the raid are the same.

X
xotkot, 2021-05-29
@xotkot

how people like to complicate their lives)
lvm, btrfs, zfs, raids, 100500 partitions ...
brr put one (/) partition on nvme (or two [+ /boot] if you have UEFI), without separating the hamster into a separate partition
but it will be possible to transfer heavy files to ssd - movies, music, virtual machines, etc., as well as backup important data with nvme

As for the root and Home on nvme - it's a lot for the system and cofigs. 90% will be empty on this disk.

it's not scary, firstly, the hamster grows over time, and secondly, the more free space the longer your nvme will last, since the data is not overwritten immediately in place like in hdd, but is "evenly appended" to the free space.
In general, in short, what is the best way to design disk space in terms of the prospect of a gem-free reinstallation in the future?

easy, copy the folder with your user (which is in the hamster) to ssd, roll a new system onto nvme according to the same principle, copy the user folder back, create the user by specifying this folder as his hom along the way, if necessary, recursively change the rights (chown -R .. .) in this folder to the desired ones.
well, like everything.
ps
together with the disk I bought another memory bar

since you have an excess of RAM, in order to torment the disk less, you can add the commit = 60 parameter to fstab, which will allow the system to write to the disk once a minute, keeping this data in memory, in principle, you can do more, for example, brought it to two minutes and like still alright.

K
ky0, 2021-05-29
@ky0

From the point of view of a gemless reinstallation - one disk under one partition, the second - under another. But personally, I would roll LVM on them.

S
SOTVM, 2021-05-29
@sotvm

nvme divided by 3 partitions
±100 (but I think that this is too much) under /
±100 under / home
the rest can be mounted wherever you like.
The second SSD drive is the same.
Why <100??? - Yes, they are easier to back up.
In the hamster, you only need to store configs, well, that is. the essentials.
and the rest of the garbage on a separate partition / disk and mount where you need.
I have a system i.e. under / 25gb and under / home 30gb
On the remaining ≈60gb (I have only 120gb ssd), a partition has been created that I mount in my hamster,
I have virtual machines and other crap there))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question