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

问题描述 投票:19回答:3

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

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

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

linux fuse
3个回答
17
投票

您需要确保由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

6
投票

只需在命令行中添加-o nonempty,如下所示:

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

2
投票

显然没有任何反应,它以非破坏性方式失败并给你一个警告。 我最近也发生了这种情况。解决此问题的一种方法是将非空挂载点中的所有文件移动到其他位置,例如:

mv /nonEmptyMountPoint/* ~/Desktop/mountPointDump/

这样你的挂载点现在是空的,你的mount命令就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.