How to register FUSE filesystem type with mount(8) and fstab?

后端 未结 5 1068
醉酒成梦
醉酒成梦 2021-01-31 03:08

I\'ve written a small FUSE-based filesystem and now the only part\'s missing is that I want to register it with fstab(5) to auto-mount it on system startup and/or manually mount

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 03:41

    After researching a lot found this solution to mount fuse filesystem suing fstab entry. I was using fuse for s3bucket to mount on local linux machine.

    • .passwd-s3fs : Is containing credentials to access your aws account 1] Secret key and 2] Access Key .
    • uid : User Id. You can type linux command id and you can get uid

    Syntax:

    s3fs#  fuse _netdev,allow_other,passwd_file=/home/ubuntu/.passwd-s3fs,use_cache=/tmp,umask=002,uid= 0 0
    

    Example:

    s3fs#myawsbucket /home/ubuntu/s3bucket/mys3bucket fuse _netdev,allow_other,passwd_file=/home/ubuntu/.passwd-s3fs,use_cache=/tmp,umask=002,uid=1000 0 0
    

    To mount you need run following command.

    mount -a
    

    To check your bucket is mounted properly or not use following command to check which shows all mounted points.

    df -h
    

提交回复
热议问题