Linux replacement hard disk has been mounted directory skills

  

Linux system hard disk after mounting the directory, usually will not modify it, but sometimes because of work or personal needs, to modify the hard disk mounted directory, how to What about the operation? The following example shows how Linux can change the mounted directory of the hard disk. Friends who need it may wish to learn.

many domestic IDC will be divided into two hard disk, the system disk and data disk, in particular, some businesses using cloud technology. This type of disk usually reads and writes faster than the data disk. If you don't care about the size of the hard disk, you can ignore the data disk. It is not bad to use the data disk as a backup. However, if the website is completely static, then you need a large hard disk. In fact, it is very simple to modify the hard disk to mount the partition.

For example, if you want to mount a hard disk that has been mounted in the home directory to the data directory, do the following:

#df -h(View partition status and data disk name)

# mkdir /data (create if there is no data directory, otherwise skip this step)

# umount /home (unmount the home directory where the hard disk is mounted)

# mount /dev /sdb1 /data (mounted to the data directory)

# vi /etc/fstab (Edit the fstab file to modify or add it so that it can be mounted automatically after reboot)

/dev/sdb1 /Data ext3 auto 0 0

Data disk new mount directory

Edit /etc/fstab inside /home to /data, or create a system to automatically mount to /data< Br>

Linux to modify the hard disk has been mounted directory method is introduced here, this article does not explain too much theoretical knowledge, but through examples to let users master the steps to modify the hard disk mounted directory of Linux, more intuitive and practical .

Copyright © Windows knowledge All Rights Reserved