H
H
HoneyMoney2017-05-14 12:36:34
linux
HoneyMoney, 2017-05-14 12:36:34

What is the best way to merge several hard drives into one?

Good day. There is a dedicated server, the dedicated server has two hard drives sda and sdb. VESTA CP installed. There is no important data on the disks. The first one is divided into three sections: sda1(boot), sda2("/"), sda3(swap). The second disk is not marked. What is the best way to combine two disks? Will RAID-0 work for me to combine sda2 and sdb1. I can’t fully understand, marked out sdb, created raid-0 sba2 + sdb1, but raid-0 needs to be “mounted” to some folder, for what? It turns out that if I create an "asd" folder on sda2, mount a raid-0 array to this folder, will my sites then use this array? Or it is better to mount raid-0 on / home and then they will definitely be.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Fedoseev, 2017-05-14
@HoneyMoney

can be combined in several ways.
raid. It is most convenient at the stage of system installation.
lvm. It is also more convenient at the stage of system installation.
unionfs. Can be on the fly.
In principle, both raid and lvl can be assembled on the fly.
For the raid, we duplicate the partition table from the first one on the second disk (man sfdisk),
then we create raid0 from the partition on the second disk, with the second disk missing. We copy data from the first disk to the second. We edit the loader - we indicate that the root is now on the raid. We are overloaded. We add the first disk to the raid, we wait for synchronization. We recheck the bootloader config, reboot to check.
The operation is not very complicated in fact, but requires care - otherwise you can get a non-booting system. In that case, livecd will save you ;)
lvm is assembled according to the same principle.
There is another option - do not transfer the root of the system to a raid or lvm, but transfer only home there, or wherever your files are. It's faster.

N
Nazar Mokrinsky, 2017-05-14
@nazarpc

I would recommend btrfs. And you can assemble and disassemble on the fly with a live system running from the same disk, I have been using it for a very long time, the transition to new disks is easy and fast + a bunch of other pluses provided by the file system (snapshots, compression, etc.).

P
pfg21, 2017-05-14
@pfg21

raid0 is not designed for this :)
use LVM
or a file system that supports multiple physical partitions - btrfs zfs...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question