cern-eos / eos

EOS Storage
Other
211 stars 39 forks source link

groups and spaces #23

Closed mhpopescu closed 5 years ago

mhpopescu commented 5 years ago

I have a small test setup for playing around.

From documentation[1]:

EOS uses a space and scheduling group concept
spaces = made by groups
groups = made by group of filesystems
filesystems = mount point
The default space name is default. Groups in the default space are numbered default.0 .. default.<n>. Each group can contain an arbitrary number of filesystems.

My setup looks like this:

$ eos fs ls
┌────────────────────────┬────┬──────┬────────────────────────────────┬────────────────┬────────────────┬────────────┬──────────────┬────────────┬────────┬────────────────┐
│host                    │port│    id│                            path│      schedgroup│          geotag│        boot│  configstatus│ drainstatus│  active│          health│
└────────────────────────┴────┴──────┴────────────────────────────────┴────────────────┴────────────────┴────────────┴──────────────┴────────────┴────────┴────────────────┘
 hiccup8.lbl.gov          1095      1                /mnt/datab/eosfs/        default.0          hiccup8       booted             rw      nodrain  offline      no smartctl 
 hiccup17.lbl.gov         1095      7                       /mnt/data2        default.0         hiccup17       booted             rw      nodrain  offline      no smartctl 
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
 hiccup8.lbl.gov          1095      2                /mnt/datac/eosfs/       default1.0          hiccup8       booted             rw      nodrain  offline      no smartctl 
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
 hiccup17.lbl.gov         1095      6                       /mnt/data1             g1.0         hiccup17       booted             rw      nodrain  offline      no smartctl 

From eos fs --help[2]:

    <schedgroup> : scheduling group in which to insert filesystem, if nothing 
                   is specified then "default" scheduling group is used

Considering [1] and [2], I have:

This is correct, verifying with group ls and space ls:

$ eos group ls
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0          off      2         0.00         0.00         0.00       idle          0          0 
 groupview        default1.0          off      1         0.00         0.00         0.00       idle          0          0 
 groupview              g1.0          off      1         0.00         0.00         0.00       idle          0          0 
$ eos space ls
┌──────────┬────────────────┬────────────┬────────────┬──────┬─────────┬───────────────┬──────────────┬─────────────┬─────────────┬──────┬──────────┬───────────┬───────────┬──────┬────────┬───────────┬──────┬────────┬───────────┐
│type      │            name│   groupsize│    groupmod│ N(fs)│ N(fs-rw)│ sum(usedbytes)│ sum(capacity)│ capacity(rw)│ nom.capacity│ quota│ balancing│  threshold│  converter│   ntx│  active│        wfe│   ntx│  active│ intergroup│
└──────────┴────────────────┴────────────┴────────────┴──────┴─────────┴───────────────┴──────────────┴─────────────┴─────────────┴──────┴──────────┴───────────┴───────────┴──────┴────────┴───────────┴──────┴────────┴───────────┘
 spaceview           default            0           24      2         0       352.53 MB        3.83 TB           0 B           0 B    off        off          20         off      2        0         off      1        0         off 
 spaceview          default1            0           24      1         0        81.85 MB        1.97 TB           0 B           0 B    off        off          20         off      2        0         off      1        0         off 
 spaceview                g1            0           24      1         0       180.47 MB      105.55 GB           0 B           0 B    off        off          20         off      2        0         off      1        0         off 
Problem 1

The first thing is that there is no consistency for their status:

But if i do eos space <space-name> set on|off, then it does not matter what <space-name I type and it will set every space on|off

From eos space --help:

usage: space ls                                                      : list spaces
       space set <space-name> on|off                                 : enables/disabels all groups under that space ( not the nodes !)

From eos group --help:

usage: group ls                                                      : list groups
       group set <group-name> on|off                                 : activate/deactivate group`

I can not show you spaces status because that is Problem1. But we can see that the command changes the status of groups, which it should do, but not to all groups:

$ eos group ls
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0          off      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0          off      1         0.00         0.00         0.00       idle          0          0 
 groupview              g1.0          off      1         0.00         0.00         0.00       idle          0          0 

$ eos space set g1 on

$ eos group ls
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0           on      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0 
 groupview              g1.0           on      1         0.00         0.17         0.00       idle          0          0 
Extra

Listing individual groups/spaces is a little strange. For d it should have showed only default.0 and default.1. I think it shows all the groups when the input is a single character:

$ eos group ls d
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0           on      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0 
 groupview              g1.0           on      1         0.00         0.17         0.00       idle          0          0 

$ eos group ls g
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0           on      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0 
 groupview              g1.0           on      1         0.00         0.17         0.00       idle          0          0 

$ eos group ls de
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0           on      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0 

$ eos group ls default
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview         default.0           on      2         0.00         0.03         0.00       idle          0          0 
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0 

$ eos group ls default1
┌──────────┬────────────────┬────────────┬──────┬────────────┬────────────┬────────────┬──────────┬──────────┬──────────┐
│type      │            name│      status│ N(fs)│ dev(filled)│ avg(filled)│ sig(filled)│ balancing│   bal-shd│ drain-shd│
└──────────┴────────────────┴────────────┴──────┴────────────┴────────────┴────────────┴──────────┴──────────┴──────────┘
 groupview        default1.0           on      1         0.00         0.00         0.00       idle          0          0

[1]https://github.com/cern-eos/eos/blob/master/doc/quickstart/admin/configure.rst

mpatrascoiu commented 5 years ago

Hello,

I'll try to answer the questions point by point:

Problem 1

  1. & 2. It's better to say the labels are inconsistent, as the field keys do follow a pattern*. (E.g.: stat. fields vs cfg. fields).
  2. The 2 active fields in the space ls table refer to the converter and wfe. They signify currently active jobs. (The Converter and WFE are daemons, running various background jobs)

*for the most part

To get more details about a space, you may use space status <space>. This will print all variables defined for the given space. However, keep in mind, the output may differ, depending on your config.

Config variables are stored persistently and loaded at system boot-up. However, if a variable has never been defined yet, it will not show up at all. E.g.: If the WFE has never been enabled, then the config will not hold all keys related to it

Problem 2 This seems to be a bug. I've checked on the latest 4.5.5 version and it is reproducible. Thank you for finding this! I've created the following JIRA to track this issue: EOS-3680

Extra Consider the <match> in the various ls <match> commands to work similarly to grep on the whole output line, instead of matching the name.

When doing eos group ls d, it has a similar effect to eos group ls | grep d. There are pros & cons to this approach, but it was preferable, as it allows to filter by more than just name.

Cheers, Mihai

mhpopescu commented 5 years ago

Thank you for the explanations.

mpatrascoiu commented 5 years ago

The space set <on|off> problem has been fixed in version 4.5.6. See related JIRA for more details: EOS-3680

Thank you again for reporting this! Will close the ticket.

Cheers, Mihai