Differences between revisions 8 and 9
Revision 8 as of 2010-03-09 12:02:42
Size: 7339
Editor: ReneStandke
Comment:
Revision 9 as of 2010-03-09 14:11:15
Size: 8445
Editor: ReneStandke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 129: Line 129:
You can choose the id by yourself, but watch out if the id already exists!

The Name is only a string representation.

=== Syntax ===
Predication => Option1, Option2, ...

Predications can be:
||<tablewidth="938px" tableheight="139px">minimum size ||>2M ||>521k ||... ||
||maximum size ||<10M ||<100k ||... ||
||wildcard expression ||~*gz* ||*.[Zz][Ii][Pp] ||*.root ... ||
||regex ||~/tmp_[a-z]{4,8}\.bin/ ||~/orig\./, /\.zip$/i ||... ||
||user id ||uid=245 ||uid=290 ||... ||
||group id ||gid=-150 ||... || ||




Predications supports brackets and logical AND, OR and NOT.

e.g.: (>2M && <10M ) || *.root

Option means, what the rule should do.

Possible Options are:
||<tablewidth="560px" tableheight="178px">'''Options''' ||'''Syntax''' ||'''synonyms''' ||'''Comment''' ||
||location ||location= ||l= loc= ''nothing'' ||l= can be omitted, see below ||
||stripes ||stripes= ||s= str= || ||
||stripesize ||stripe_size= ||ss= ssize= || ||
||copies ||copies= ||c= || ||
||stop ||stop || || ||
||continue ||continue ||c''ont nothing'' || ||




Location can be:

 *

osd commands

statistic

Get rpc statistics of a server

You can also use the ID of osd list, e.g.: #osd stat 2

That gives the same output.

# osd statistic zyklop20-al
funny kvno (256) in ticket, proceeding
Since  2009-11-15 04:00:04 (458674 seconds == 5 days, 7:24:34 hours)
Total number of bytes received   96448669084672   87 tb
Total number of bytes sent       95887024458752   87 tb
rpc 220 Dummy                       17884
rpc 131 read                            4
rpc 170 list                            3
rpc 314 updatecounters           93420271
rpc 211 CopyOnWrite               1972564
rpc 110 create                          1
rpc 121 write                         140
rpc 187 examine                        25
rpc 185 examine0                        1
rpc 150 incdec                          1
rpc 311 Variable                        2
rpc 312 statistic                       2

listosds

List osds

# osd listosds
 id     name      size   state  usage  rpri wpri own loc flag lun  sizerange
  1 local_disk      0 gb up      0.0 % 100   64  --- --- ---    0 (0kb-1mb)
  2 zyklop20-al 10694 gb up      2.5 %  64   64  --- --- ---   37 (1mb-2tb)
  4 arch           46 gb up      0.3 %  64   64  --- --- arch   0 (0kb-10gb)

Important: You can use the i instead of the Name.

osd

show single osddb entry

You can also show only the entry of a given OSD:

e.g. #osd osd 2

# osd osd
Osd 'local_disk' with id=1:
        type            = 0
        minSize         = 0 KB
        maxSize         = 1024 KB
        totalSize       = 0 MB
        pmUsed          = 0 per mille used
        totalFiles      = 0 M Files
        pmFilesUsed     = 0 per mille used
        ip              = 0.0.0.0
        server          = 0
        lun             = 0
        alprior         = 64
        rdprior         = 100
        flags           = 0
        unavail         = 0
        owner           = 0 = ''
        location        = 0 = ''
        timeStamp       = 0 =  never
        highWaterMark   = 0 per mille used
        minWipeSize     = 0 MB
        chosen          = 0 (should be zero)
Osd 'zyklop20-al' with id=2:
        type            = 0
        minSize         = 1024 KB
        maxSize         = 2147483648 KB
        totalSize       = 10951323 MB
        pmUsed          = 17 per mille used
        totalFiles      = 10 M Files
        pmFilesUsed     = 0 per mille used
        ip              = 141.34.22.43
        server          = 0
        lun             = 37
        alprior         = 64
        rdprior         = 64
        flags           = 0
        unavail         = 0
        owner           = 0 = ''
        location        = 0 = ''
        timeStamp       = 1257495000 =  2009-11-06 09:10:00
        highWaterMark   = 800 per mille used
        minWipeSize     = 0 MB
        chosen          = 0 (should be zero)

volumes

list volumes

# osd volumes zyklop20-al
osddb: Could not get afs tokens, running unauthenticated.
RX xdr error
Cannot list volumes, error = 13
Request aborted.

servers

show server osddb entry

# osd servers

addserver

create server entry in osddb

# osd addserver -id <ip address> -name <osd name>

deleteserver

delete a server entry

# osd deleteserver -id <server name or ip-address>

policies

show policy osddb entry

# osd policies

addpolicy

add a policy

# osd addpolicy -id <policy number> -name <short name for policy> -policy <string representation as given by policies -cryptic>

You can choose the id by yourself, but watch out if the id already exists!

The Name is only a string representation.

Syntax

Predication => Option1, Option2, ...

Predications can be:

minimum size

>2M

>521k

...

maximum size

<10M

<100k

...

wildcard expression

~*gz*

*.[Zz][Ii][Pp]

*.root ...

regex

~/tmp_[a-z]{4,8}\.bin/

~/orig\./, /\.zip$/i

...

user id

uid=245

uid=290

...

group id

gid=-150

...

Predications supports brackets and logical AND, OR and NOT.

e.g.: (>2M && <10M ) || *.root

Option means, what the rule should do.

Possible Options are:

Options

Syntax

synonyms

Comment

location

location=

l= loc= nothing

l= can be omitted, see below

stripes

stripes=

s= str=

stripesize

stripe_size=

ss= ssize=

copies

copies=

c=

stop

stop

continue

continue

cont nothing

Location can be:

deletepolicy

delete a policy

# osd deletepolicy -id <policy id (number)>

createobject

create object in existing volume subtree

# osd createobject -osd <osd or name or IP-address of server> -fid <file-id: volume.vnode.uniquifier[.tag]>

createosd

create osd entry in osddb

# osd createosd -id <osd id> -name <osd name>

deleteosd

delete osd entry in odddb

# osd deleteosd -id <osd id>

examine

examine single object Usage: osd examine -osd <osd or server name or IP-address> -fid <file-id>

apropos

search by help text Usage: osd apropos -topic <help string>

# osd apropos create
addserver: create server entry in osddb
createobject: create object in existing volume subtree
createosd: create osd entry in osddb

objects

list objetcs of a volume

# osd objects -osd <osd or name or IP-address of server> -volume <volume-id>

threads

show active threads in osd server

# osd threads

wipecandidates

get candidates for wipeing

# osd wipecandidates -osd <osd or name or IP-address of server>

fetchqueue

show fetch requests

# osd fetchqueue

getvariable

get rxosd variable

# osd getvariable -server <name or IP-address> -variable <name>

setvariable

set rxosd variable

# osd setvariable -server <name or IP-address> -variable <name> -value <value>

decrlinkcount

decrement link count of an objekt

# osd decrlinkcount -osd <osd or name or IP-address of server> -fid <file-id>

incrlinkcount

increment link count of an objekt

# osd incrlinkcount -osd <osd or name or IP-address of server> -fid <file-id>

setosd

set fields in osddb

# osd setosd -id <osd id>

md5sum

get md5 sum

# osd md5sum -osd <osd or name or IP-address of server> -fid <file-id>

psread

pseudo striped read data from an object

# osd psread -osd <osd or name or IP-address of server> -fid <file-id>

pswrite

write data into an object

# osd pswrite -osd <osd or name or IP-address of server> -fid <file-id>

read

read data from an object

# osd read -osd <osd or name or IP-address of server> -fid <file-id>

write

write data into an object

# osd write -osd <osd or name or IP-address of server> -fid <file-id>

help

get help on commands

# osd help [topic/command]

# osd help

osd: Commands are:
addpolicy       add a policy
addserver       create server entry in osddb
apropos         search by help text
createobject    create object in existing volume subtree
createosd       create osd entry in osddb
decrlinkcount   decrement link count of an objekt
deleteosd       delete osd entry in odddb
deletepolicy    delete a policy
deleteserver    delete a server entry
examine         examine single object
fetchqueue      show fetch requests
getvariable     get rxosd variable
help            get help on commands
incrlinkcount   increment link count of an objekt
listosds        list osds
md5sum          get md5 sum
objects         list objetcs of a volume
osd             show single osddb entry
policies        show policy osddb entry
psread          pseudo striped read data from an object
pswrite         write data into an object
read            read data from an object
servers         show server osddb entry
setosd          set fields in osddb
setvariable     set rxosd variable
statistic       get rpc statistic
threads         show active threads in osd server
volumes         list volumes
wipecandidates  get candidates for wipeing
write           write data into an object

AfsOsd/UsageInstructions/OsdSubcommands (last edited 2010-03-22 09:59:28 by ReneStandke)