vim /etc/sysconfig/network-scripts/ifcfg-p7p1
TYPE=Ethernet
BOOTPROTO=static
NAME=p7p1
UUID=acd05c7f-20a5-4cf7-86f7-25a24e264620
###Account DB tables
CREATE TABLE account_stat (
account TEXT,
created_at TEXT,
put_timestamp TEXT DEFAULT '0',
delete_timestamp TEXT DEFAULT '0',
container_count INTEGER,
object_count INTEGER DEFAULT 0,
###Storage Policy configurations All glusterfs volumes as a single storage policy with each volume being just a device to Swift: In this case, Swift hashes and chooses where to place objects into. Hence PUT of an object can go to either of the volumes. For example, if we have two glusterfs volumes test and test2, putting ten objects (named 1 to 10) into AUTH_abc account and container cg (marked with sp glusterfs) can look like so on mountpoint:
curl -i http://vm1:8080/v1/AUTH_abc/cg -X PUT -H 'X-Storage-Policy: glusterfs'
curl -i http://vm1:8080/v1/AUTH_abc/cg/o{1..10} -X PUT -d'testobject'
/mnt/gluster-object/test
Enable kernel debug tracing
echo 1 > /sys/kernel/debug/tracing/tracing_on
Enable tracing of all inotify syscalls
for i in `ls /sys/kernel/debug/tracing/events/syscalls | grep inotify`; do echo 1 >| /sys/kernel/debug/tracing/events/syscalls/$i/enable; done;
Calculating object hash:
>>> from swift.common.utils import hash_path
>>> print hash_path("AUTH_abc/c1/o4")
c2b307d78b6c419c0c1b76d91c08c69f
The corresponding on-disk object path derived from the above hash:
/mnt/sdb1/./3/node/sdb3/objects/778/69f/c2b307d78b6c419c0c1b76d91c08c69f/1412628708.01757.data
Dongle: ZTE MF825A
Assuming 192.168.0.1 is the IP of your dongle:
Connect
http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK
When directory 'a' does NOT exist:
$ strace mkdir -p ./a/b/c
mkdir("a", 0775) = 0
open("a", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW) = 3
fchdir(3) = 0
close(3) = 0
mkdir("b", 0775) = 0
open("b", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW) = 3
#!/usr/bin/env python | |
import os | |
import argparse | |
import math | |
import time | |
import xattr | |
import cPickle | |
METADATA_KEY = 'user.swift.metadata' |
#!/usr/bin/env python | |
import benchmark | |
import os | |
import uuid | |
import errno | |
import shutil | |
import random | |
import hashlib |
#!/usr/bin/env python | |
# pip install benchmark | |
# Comparison of makedirs_count() vs swift.common.utils.mkdirs() | |
import benchmark | |
import os | |
import uuid | |
import errno |