Août 122018
 

The scality’s RING product is a distributed storage solution, which manages different replication and erasure coding security. – https://www.scality.com/

1. What is a keyspace in the Scality RING

A RING keyspace is a circle starting at 00, ending at FF.

in reality, the numbers are not just 2 character long but 40 characters.

A keyspace is composed of node keyranges.

A keyrange is a space between a key on the keyspace, and the predecessor key.

Continue reading »

Fév 202014
 

On m’a demandé comment copier sans écraser la destination si elle existe.

l’environnement est restreint, pas de rsync et doit tenir dans une ligne.

pas le temps de tester si le fichier existe, ce doit être rapide.

la solution est facile:

# yes |sed 's/y/n/' | cp -i source destination 

Continue reading »

Juil 042013
 

Works on Bash only


cidr2dec() {
cidr=$1
totalmask= ; bits=

for ((i=$cidr; $i>0; i--)); do bits="${bits}1" ; done
for ((i=$((32 - $cidr)); $i>0; i--)); do bits="${bits}0" ; done

for i in 1 9 17 25; do
bitmask=$(echo $bits |cut -c${i}-$(($i + 7)))
totalmask=${totalmask}$(echo 'obase=10; ibase=2;' $bitmask |bc).
done

echo ${totalmask%%.}
}

 


$ for i in 16 24 26 27 32 ; do cidr2dec $i ; done
255.255.0.0
255.255.255.0
255.255.255.192
255.255.255.224
255.255.255.255