My Linux server also needs to change the partition mode because of business changes. The preceding partitioning method is as follows:
Now I want to merge/oradata into the/home directory, but the original data in the/home directory cannot be affected (no data in the/oradata partition ). After constantly asking Baidu and Google, they did not find a way to merge the two shards.
As a matter of fact, if you want to expand a partition space according to Windows XP partition, you must ensure that the partition following this partition has no data. For example: if I think Windows XP system disk C is too small and want to expand the disk C space, the disk D must not have data, so that I can narrow down the disk D space, then, increase the disk C space, and the data on the disk C will not be affected. In this Linux system, from the results of df-h, the sda1-3 is the primary partition, followed by the extended partition, and now I need to give sda10 capacity to sda2, this cannot be achieved by giving the capacity of an extended partition to the primary partition. In addition, if two extended partitions, sda6 and sda7, need to be merged, fdisk can be implemented, but data cannot be guaranteed. In addition, extended partitions cannot be merged if sda6 and sad8 need to be merged.
What should I do if I cannot merge partitions in this way? Either reinstall the system, re-partition according to your own requirements, or mount the partition under the subdirectory of another partition. For example, I cannot merge partitions on this server. I can only create a new/home/bsmp directory under the/home directory, and then unmount the/oradata partition to mount umount/oradata, mount/dev/sda10/home/bsmp again.