百度智能云

All Product Document

          Object Storage

          Configuration

          Parameter Setting

          Bosfs supports to set parameters to configure the user permission, storage class and cache, etc. Execute bosfs -h to access the detailed description of bosfs parameter setting:

          1.-o -o bos.fs.cache.base=<your_cache_dir>: specify the location of cache, and such location cannot be located within the mounting point, and must be an absolute path. 2.bosfs ... -o allow_other -o mount_umask: allow other users to access the mounting point, and disable certain permission via mount_umask. By default, bosfs only mounts the user's read, write and execution permission, namely S_IRWXU. 3.-Vo bos.fs.meta.expires=<seconds>: Specify the expiration time of meta cache. 4.-Vo bos.fs.meta.capacity=<integer number>: Specify the meta cache capacity in memory, the expired cache exceeding the capacity is cleared. 5.-Vo bos.fs.storage_class=<standard or standard_ia>: Specify the storage class of object, including standard storage and infrequent storage. 6.-o bos.fs.tmpdir=<your_tmp_dir>: Specify the location of temporary files, which cannot be located in the mounting point, and must be an absolute path, and the temporary files are not saved in the disk for a long term, and are cleared after close files. 7.-o bos.sdk.multipart_size=<number smaller than 5GB>: Specify the file size for multi-part transmission, with the unit of KB or MB. 8.-o bos.sdk.multipart_threshhold=< number smaller than 5GB>: Indicate that the three-step upload can be used if such threshold value is exceeded, with the unit of KB or MB. 9.-o bos.sdk.multipart_parallel=< max parallel number>: Limit the concurrency of large files upload.

          Troubleshooting

          1. During the use of bosfs, suddenly show "unable to access MOUNTPOINT/path/to/mountpoint: Transport endpoint is not connected", and it is no longer accessible? You can use the command ps ax| grep bosfs to see if the bosfs process exists or not, and if the bosfs process is suspended due to a misoperation, you can execute the following command to remount it:

            umount -l /path/to/mnt_dir 
            bosfs bucket /mnt/bosfs xxxx 
            • If the bosfs process is not suspended due to misoperation, check if the fuse version on the machine is lower than 2.9.4 as the bosfs process exists unexpectedly if the libfuse is lower than the version 2.9.4.At this point, you are recommended to compile and install the bosfs section, update fuse version or install the latest version of bosfs.
            • Bosfs occupies the disk to write a great deal of temp cache during the read and write, similar to nginx, which can lead to insufficient available disk space and frequent clean-up.
            • The possible reason is that, the listbucket and listobject apply for much memory, which triggers the system oom.
            • Use boscmd to replace bosfs , and non-online sensitive services can use bosfs , and bcecmd is recommended for those requiring reliability and stability.
          2. If you get stuck for a long time during the use, you are recommended to reduce the concurrency and specify -o multipart_parallel=5 (10 by default) during the mounting.
          3. If bosfs is used to mount to different machine, the use of cache may result in inconsistent metadata (length, mod, etc.) for different machines, so you are recommended to specify -o meta_epires=0 during the mounting to avoid reading data from cache.

          Log

          The log is output to stderr by default, and use -o logfile=xxxx/xxxx.log to specify name. When the command -d is used to open debug mode, you can redirect to a local file.

          Note:

          • Do not direct the file path of logfile or direct the redirected file path to mountpoint, which may cause unnecessary overhead by continuously brushing the log into BOS.
          • If -d or -f is not used to specify the operating mode of foreground, bosfs process turns to daemon after launching; meanwhile, it switches the working directory to/; therefore, an absolute path is required for logfile. The log file of bosfs is not split automatically, but needs to be managed by user with script.
          • After BOS FS is mounted, if the rsync function is used, you are recommended to set -o loglevel=ERROR and --partitial-dir=local path, as resync generates temporary files, which are saved at such location where the destination files are located by default (bosfs), resulting unnecessary uploading overhead in bosfs.

          Read

          Use the option -o ro to set the read only mode, which is used to protect buckets from being written to, and this option is a standard option for fuse.

          Previous
          Installation
          Next
          Operation