Changes between Initial Version and Version 1 of User Guide/Storage Space


Ignore:
Timestamp:
Nov 20, 2023, 9:15:30 PM (12 months ago)
Author:
cz2678
Comment:

Adding storage info

Legend:

Unmodified
Added
Removed
Modified
  • User Guide/Storage Space

    v1 v1  
     1= Storage
     2
     3== Local Disks
     4
     5By default, each server node is attached with a fixed amount of local disk space under '''"/dev/sda"'''. You can check the total amount of disk space by running:
     6
     7{{{#!shell-session
     8root@NODE:~# lsblk
     9NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
     10sda      8:0    0 446.6G  0 disk
     11|-sda1   8:1    0   150G  0 part /
     12`-sda2   8:2    0   250G  0 part /mnt/sda2
     13}}}
     14
     15Per different setups of each disk image, the size of actual mounted disk space under '''"/dev/sda1"''' may vary. You can mount extra disk space (if available) to any mount points under the file system of your server node using '''fdisk''' command:
     16
     17{{{#!shell-session
     18root@NODE:~# fdisk /dev/sda
     19
     20Welcome to fdisk (util-linux 2.37.2).
     21Changes will remain in memory only, until you decide to write them.
     22Be careful before using the write command.
     23
     24Command (m for help): ...
     25}}}
     26
     27== NFS Mounting
     28
     29Since local storage space is limited, large files (e.g. datasets and trained models) are better kept remotely. This can be done efficiently with the help of '''Network File System (NFS)''', which allows you to mount remote directories and do read/write as if they are local directories.
     30
     31Below are two common use cases of NFS.
     32
     33=== COSMOS Storage
     34
     35The easiest way is to use the storage spaces provided by the COSMOS ecosystem: '''"cosmos_data"''' and '''"datasets"'''.
     36
     37To mount these,
     38
     391. Install [https://packages.ubuntu.com/focal/net/nfs-common nfs-common]:
     40{{{#!shell-session
     41apt-get update
     42apt-get install nfs-common
     43}}}
     44
     452. Open '''"/etc/fstab"''' and '''__append__''' (NOT overwrite with) the following lines:
     46{{{#!shell-session
     4710.0.0.41:/datasets     /mnt/datasets   nfs     sec=sys,nfsvers=4.1,rw,defaults      0   0
     4810.108.0.21:/cosmos_data     /mnt/cosmos_data   nfs     sec=sys,nfsvers=4.1,rw,defaults      0   0
     49}}}
     50
     513. Create mounting points under your local file system:
     52{{{#!shell-session
     53mkdir /mnt/datasets
     54mkdir /mnt/cosmos_data
     55}}}
     56
     574. Mount the NFS:
     58{{{#!shell-session
     59mount -a
     60}}}
     61
     625. Check the mounted NFS storage space using '''df -h''' command:
     63{{{#!shell-session
     64root@NODE:~# df -h
     65Filesystem                Size  Used Avail Use% Mounted on
     66/dev/sda1                 148G  108G   33G  77% /
     67/dev/sda2                 246G  246G     0 100% /mnt/sda2
     68tmpfs                      95G   65M   94G   1% /dev/shm
     6910.108.0.21:/cosmos_data  5.1T  931G  4.1T  19% /mnt/cosmos_data
     7010.0.0.41:/datasets       2.1T  284G  1.8T  14% /mnt/datasets
     71}}}
     72
     73=== Google Cloud Buckets
     74
     75Apart from native COSMOS storage, you may also mount external NFS like Google Cloud buckets.
     76
     77To do so,
     78
     791. Prepare an alive project and a GCS bucket
     802. Install Google Cloud CLI and GCSFuse
     813. In your console, login to your GCP account and configure the project
     824. Create mounting point and mount the bucket
     83
     84Find and follow detailed instructions in [https://cloud.google.com/storage/docs/gcsfuse-quickstart-mount-bucket here].
     85