From 7252f8f0c2f9e87ef0ac4a868961ba2828da7525 Mon Sep 17 00:00:00 2001 From: Fulvio Galeazzi <fulvio.galeazzi@garr.it> Date: Mon, 16 Oct 2023 14:09:28 +0200 Subject: [PATCH] 2023-10-16: FG; Added info on retrieving object-store quota. --- .gitignore | 4 ++ web/support/kb/objstore/objstore_quota.rst | 24 +++++++ .../kb/objstore/s3fs_quick_tutorial.rst~ | 63 ------------------- 3 files changed, 28 insertions(+), 63 deletions(-) create mode 100644 .gitignore create mode 100644 web/support/kb/objstore/objstore_quota.rst delete mode 100644 web/support/kb/objstore/s3fs_quick_tutorial.rst~ diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..7f63c8ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +*.swp +*.swo +*~ diff --git a/web/support/kb/objstore/objstore_quota.rst b/web/support/kb/objstore/objstore_quota.rst new file mode 100644 index 00000000..188f7d43 --- /dev/null +++ b/web/support/kb/objstore/objstore_quota.rst @@ -0,0 +1,24 @@ +Quota usage and OpenStack object-store +====================================== + +Getting quota information +------------------------- + +The OpenStack dashboard is capable of showing object-store usage, both in terms of +bytes and number of objects, for each container under the "Project -> Object Store -> +Containers" tab. + +However, to date the dashboard seems to be lacking the integration required to show +overall usage (namely, the sum over containers) and quota information. + +These can be retrieved using the CLI, with the command:: + + $ swift stat | grep Bytes: + +displaying an output similar to:: + + $ swift stat | grep Bytes: + Bytes: 410365371827 + Meta Quota-Bytes: 1000000000000 + + diff --git a/web/support/kb/objstore/s3fs_quick_tutorial.rst~ b/web/support/kb/objstore/s3fs_quick_tutorial.rst~ deleted file mode 100644 index f0f24d3e..00000000 --- a/web/support/kb/objstore/s3fs_quick_tutorial.rst~ +++ /dev/null @@ -1,63 +0,0 @@ -S3fs: mount a container as a filesystem -================================================= - -Instead of `Rclone <https://cloud.garr.it/support/kb/openstack/rclone_quick_tutorial/>`_, we can use s3 APIs to connect to object storage and mount containers as filesystems. We may do this by using `s3fs <https://github.com/s3fs-fuse/s3fs-fuse>`_ - -Install s3fs -*************** -On Ubuntu machine, you can install the packaged version with the following commands:: - - $ sudo apt update - $ sudo apt install s3fs - -Check the version:: - - $ s3fs --version - -N.B. These instructions refer to version 1.86 available on Ubuntu 20.04. Different versions may require different configuration. - -Uncomment *user_allow_other* option by removing the *#*:: - - $ nano /etc/fuse.conf - -Create application credential -***************************** - -Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard as *app-credentials.sh*. - -You need to install the Openstack cli as described here in the `cli tutorial <https://cloud.garr.it/compute/install-cli/>`. - -Then execute the content of the file:: - - $ source app-credentials.sh - -And create the ec2 credentials:: - - $ openstack ec2 credentials create -c access -c secret -f value | paste -sd: > ${HOME}/.passwd-s3fs - $ chmod 600 .passwd-s3fs - -Mount a container -******************** -First, you need to create the container on your openstack project. Then you can mount your container on your local directory. -Assume that you have a container named *test_container* and a local directory named *test_dir*:: - - $ s3fs test_container test_dir -o allow_other -o host=https://swift.cloud.garr.it -o use_path_request_style -o umask=000 - -Now your container has been mounted on *test_dir* directory. You can access it and every change you make inside the directory is istantly made inside the container. - -Debug -***** - -If you need to debug, add the following options at the mounting command:: - - -o dbglevel=info -f -o curldbg - -*Note that -f option cause the command to run in foreground, so CTRL+C will kill the command.* - - -Unmount -******* -:: - - $ umount test_dir - -- GitLab