Mount and detach linux mount Hard Disks

Source: Internet
Author: User

Mount and detach linux mount Hard Disks

Linux mounting

[root@whp6 ~]# mount /dev/sdb5 /mnt/[root@whp6 ~]# df -hFilesystem      Size  Used Avail Use% Mounted on/dev/sda3        16G  2.1G   13G  14% /tmpfs           931M     0  931M   0% /dev/shm/dev/sda1       194M   28M  157M  16% /boot/dev/sdb5       2.0G   68M  1.9G   4% /mnt[root@whp6 ~]# df -TFilesystem     Type  1K-blocks    Used Available Use% Mounted on/dev/sda3      ext4   16311208 2134352  13348288  14% /tmpfs          tmpfs    953276       0    953276   0% /dev/shm/dev/sda1      ext4     198337   28320    159777  16% /boot/dev/sdb5      ext4    2071384   68632   1897528   4% /mnt[root@whp6 ~]#

NOTE: If it is mounted to a directory with files, it will block the hard disk that must be detached from the original file for display.

[root@whp6 ~]# ls /home/1.txt  2  22  wanghaipeng  whp[root@whp6 ~]# mount /dev/sdb1 /home/[root@whp6 ~]# ls /homelost+found[root@whp6 ~]# umount /home[root@whp6 ~]# ls /home1.txt  2  22  wanghaipeng  whp[root@whp6 ~]#

Unmount Linux umount

[root@whp6 /]# mount LABEL=wanghaipeng /home/whp/[root@whp6 /]# df -hFilesystem      Size  Used Avail Use% Mounted on/dev/sda3        16G  2.1G   13G  14% /tmpfs           931M     0  931M   0% /dev/shm/dev/sda1       194M   28M  157M  16% /boot/dev/sdb5       2.0G   68M  1.9G   4% /mnt/dev/sdb1       2.0G   74M  1.9G   4% /home/whp[root@whp6 /]# umount -l /home/whp/[root@whp6 /]# df -hFilesystem      Size  Used Avail Use% Mounted on/dev/sda3        16G  2.1G   13G  14% /tmpfs           931M     0  931M   0% /dev/shm/dev/sda1       194M   28M  157M  16% /boot/dev/sdb5       2.0G   68M  1.9G   4% /mnt[root@whp6 /]#

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.