linux挂载目录已存在可以么,将盘mount到已存在路径,路径下文件显示不了
~~~添加盘:Disk /dev/sdb: 1073 MB, 1073741824 bytes255 heads, 63 sectors/track, 130 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (
~~~
添加盘:
Disk /dev/sdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@single1 test]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 38G 14G 22G 40% /
tmpfs 495M 202M 293M 41% /dev/shm
/dev/sda1 388M 384M 0 100% /boot
[root@single1 test]# pwd
/test
[root@single1 test]# ls
video.avi
挂载:
[root@single1 ~]# mount /dev/sdb /test
[root@single1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 38G 14G 22G 40% /
tmpfs 495M 202M 293M 41% /dev/shm
/dev/sda1 388M 384M 0 100% /boot
/dev/sdb 1008M 34M 924M 4% /test
[root@single1 ~]# cd /test
[root@single1 test]# ll
total 16
drwx------ 2 root root 16384 Jan 18 18:23 lost+found
我的video.avi 不见了!!
[root@single1 ~]# umount /test
[root@single1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 38G 14G 22G 40% /
tmpfs 495M 202M 293M 41% /dev/shm
/dev/sda1 388M 384M 0 100% /boot
[root@single1 ~]# cd /test
[root@single1 test]# ll
total 4
-rw-r--r-- 1 root root 16 Jan 18 18:20 video.avi
OK,它又回来了!
所以,mount磁盘之前,最好检查下路径下的文件。有用的mv,没用的rm。
~~~
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)