Linux partition mount problem?

in Aliyun"s esc server, 40g hard disk space is all mounted in the root directory /. I want to separate the linux system files from the stored data files. If the data is stored under / home at this time, whether the home shares 40g of the system space or not, the system will not be able to recover the data if there is a problem.
then how to separate the system from the data, separate the system 40g, take out a portion of 10g to store system files, and store the rest of the data. In addition, if you mount a new hard disk as data storage in / home, it will not separate the home and linux system files, and the data will also be safe when the system hangs up.
the description may be a little messy when I just came into contact with linux,.

Mar.31,2021

whether home shares 40g space on the system at this time

Yes, no matter how many regions you divide, you share the entire disk.

is it true that the data cannot be recovered if there is a problem with the system

depends on what the problem is. In theory, as long as there is something wrong with the physical medium in which the data is stored, the data can be recovered.
if you can't start the original operating system properly, you can start "maintenance" mode (which is equivalent to the safe mode of windows system), or use ISO to boot into rescue mode, and you can try to recover data.

in addition, if you mount a new hard disk in / home as data storage, does it separate the home and linux system files, and the data is safe when the system hangs up?

this is theoretically the same as multiple partitions on the same disk. Because the service provider is likely to put more than one of your "disks" on the same physical disk, it is also possible to map one of your "disks" to different physical disks.

when you do multiple partitions on a single hard disk, you may need to back up the partition table in case the original partition is inaccessible due to misoperation.


you need to repartition the hard drive, that is, before installing the system, and then mount the separate partition to a directory

If the

system already exists, you can try to adjust the partition, that is, shrink the current partition, create a new partition, format it, and set up automatic mount. I haven't done this on the root partition. I don't know if it's all right.


the two people upstairs are all right, but it is not based on the background of Ali Yun. Let me simply answer one point based on your actual needs:
1. Just buy another cloud disk and mount it to / data, so your system is broken and the data is in
2. You also need to turn on the automatic snapshot of ecs to back up the system disk and data disk every day, so that the system is broken and the loss can be reduced by erroneous data deletion

.
Menu