Article Title: TMP partition in mobile Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
During Server Management, you may encounter insufficient partition space or need to adjust the partition size. If you are a common user, you may have to back up data and reinstall the system. However, in the operating linux server system, this is unrealistic. We must learn to dynamically adjust linux partitions. linux provides us with an lvm logical drive volume solution, in addition, there is another method. This article will show you one by one:
In fact, linux provides a more convenient way for our management. We know that the various statuses in the linux system are represented at the corresponding running level, for example, the shutdown process is run level 0. Single User management is run level 1. Our commonly used graphical user interface is defined as run level 5 in a system, and restart is run level 6, for the running level in linux, I will introduce you in detail in future articles. Today, I will introduce you to how to move the tmp partition in linux!
During normal system initialization, the/etc/fstab file will be loaded at startup to mount the file system. When we normally access the system and perform maintenance management, all file systems are not allowed to be detached. So what can we do to let us unload the file system? The answer is "run level". In runlevel 1, the system enters the single-user management mode. Only the root user can log on to the system. When the system runs completely in the memory, we can perform full operations on the hard disk, next we will go to runlevel 1
# Init 1 after executing this command as the root user, the system will shut down all running services and switch to single-user mode. At this time, only the root user can log on. After logging on, for example, we can move/tmp to/var/tmp. We can use:
# Mv/tmp/var/tmp
In this way, the content in/tmp is moved to the/var/tmp directory. Next we will delete the/tmp directory:
# Rm-rf/tmp
Next, create a symbolic link to/var/tmp:
Ln-s/var/tmp
In this case,/tmp is actually changed to a symbolic link pointing to/var/tmp. Then we press ctrl + D to return to the graphic interface. After logging on, the/tmp directory has been removed.
In the same way, you can move/var partition to the new hard disk, but the/var partition is no better than/tmp partition. The important data for system operation is saved here, make sure to back up the data before moving it and check it carefully.