如果使用保险丝安装到非空的安装点会发生什么?

 phper 发布于 2023-02-14 01:33

融合我是新手.当我尝试运行FUSE客户端程序时,我收到此错误:

fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

我知道mountpoint是逻辑上附加FUSE文件系统的目录.如果我登上这个地方会发生什么?有什么危险?只是该目录将被覆盖?基本上:如果挂载到非空目录会发生什么?

2 个回答
  • 您需要确保由fuse挂载的设备上的文件与非空挂载点中已存在的文件具有相同的路径和文件名.否则这会导致混淆.如果您确定,请传递-o nonempty给mount命令.

    您可以使用以下命令尝试正在发生的事情..(Linux摇滚!)..而不会破坏任何东西..

    // create 10 MB file 
    dd if=/dev/zero of=partition bs=1024 count=10240
    
    // create loopdevice from that file
    sudo losetup /dev/loop0 ./partition
    
    // create  filesystem on it
    sudo e2mkfs.ext3 /dev/loop0
    
    // mount the partition to temporary folder and create a file
    mkdir test
    sudo mount -o loop /dev/loop0 test
    echo "bar" | sudo tee test/foo
    
    # unmount the device
    sudo umount /dev/loop0
    
    # create the file again
    echo "bar2" > test/foo
    
    # now mount the device (having file with same name on it) 
    # and see what happens
    sudo mount -o loop /dev/loop0 test
    

    2023-02-14 01:48 回答
  • 只需添加-o nonempty命令行,如下所示:

    s3fs -o nonempty  <bucket-name> </mount/point/>
    

    2023-02-14 01:51 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有