Sunday, January 24, 2016

64 bit maximum address space



32 bit processeor have 4GB address space. 2 pow 32 = 4 GB (4294967296)

Is that mean 64 bit can access can access 2 pow 64 = 16 exabytes ??

not really

1. 64 bit does not mean all the bits of those points are actually used.
x86_64 -> 48 bit address lines. -> theoreitically 256 terabytes of RAM.

2. mother board have their own limits how much RAM can be supported.

Physically we can only have few slots ;)

3. OS may have internal limitation on how much it can support.

Linux allows 128 TB of virtual address space per process on x86_64.

Source: http://superuser.com/questions/168114/how-much-memory-can-a-64bit-machine-address-at-a-time
======================================================


installing glusterfs debuginfo package in fedora

Go to repo directory:
cd /etc/yum.repos.d/

wget this file:
wget http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/glusterfs-fedora.repo

Now, search for debuginfo:
yum search glusterfs-debuginfo

Install the package:

yum install glusterfs-debuginfo.x86_64 -y


You are done :)





Tuesday, January 12, 2016

certificate signing using TLS




# Generate private key 
openssl genrsa -out ca.key 2048 

# Generate CSR 
openssl req -new -key ca.key -out ca.csr

# Generate Self Signed Key
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

# Copy the files to the correct locations
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
 
 
/etc/httpd/conf.d/ssl.conf 
SSLCertificateFile /etc/pki/tls/certs/ca.crt 
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
 
httpd restart
 
 
open in browser like : https:// 
 
This is working through 443 port number (Refer  /etc/httpd/conf.d/ssl.conf  )

There are NO changes required in ( /etc/httpd/conf/httpd.conf )
 
Ref:
https://wiki.centos.org/HowTos/Https

Monday, January 11, 2016

volume files in gluster

===================================
# ls /var/lib/glusterd/vols/tv1/*.vol -l
/var/lib/glusterd/vols/tv1/trusted-tv1.tcp-fuse.vol     //client volume file (1)

/var/lib/glusterd/vols/tv1/tv1.tcp-fuse.vol     //client volume file

/var/lib/glusterd/vols/tv1/tv1.gfvm3.opt-volume_test-tv_1-b1.vol        //server volume file (2)

/var/lib/glusterd/vols/tv1/tv1.gfvm3.opt-volume_test-tv_1-b2.vol        //server volume file

/var/lib/glusterd/vols/tv1/tv1-rebalance.vol    //rebalance volume file (3)
===================================
(1)

/var/lib/glusterd/vols/tv1/trusted-tv1.tcp-fuse.vol
/var/lib/glusterd/vols/tv1/tv1.tcp-fuse.vol
 ==> both are quite similar except username and password present in trusted.


volume tv1-client-0
    type protocol/client
    option send-gids true
    option password c841565a-f1fc-4ffb-bb1c-2f5a0939c434
    option username f15ceb70-85fd-4be6-a084-757131d3bb0a
    option transport-type tcp
    option remote-subvolume /opt/volume_test/tv_1/b1
    option remote-host gfvm3
    option ping-timeout 42
end-volume

volume tv1-client-1
    type protocol/client
    option send-gids true
    option password c841565a-f1fc-4ffb-bb1c-2f5a0939c434
    option username f15ceb70-85fd-4be6-a084-757131d3bb0a
    option transport-type tcp
    option remote-subvolume /opt/volume_test/tv_1/b2
    option remote-host gfvm3
    option ping-timeout 42
end-volume

volume tv1-dht
    type cluster/distribute
    subvolumes tv1-client-0 tv1-client-1
end-volume

volume tv1-write-behind
    type performance/write-behind
    subvolumes tv1-dht
end-volume

volume tv1-read-ahead
    type performance/read-ahead
    subvolumes tv1-write-behind
end-volume

volume tv1-readdir-ahead
    type performance/readdir-ahead
    subvolumes tv1-read-ahead
end-volume

volume tv1-io-cache
    type performance/io-cache
    subvolumes tv1-readdir-ahead
end-volume

volume tv1-quick-read
    type performance/quick-read
    subvolumes tv1-io-cache
end-volume

volume tv1-open-behind
    type performance/open-behind
    subvolumes tv1-quick-read
end-volume

volume tv1-md-cache
    type performance/md-cache
    subvolumes tv1-open-behind
end-volume

volume tv1
    type debug/io-stats
    option count-fop-hits off
    option latency-measurement off
    option log-level INFO
    subvolumes tv1-md-cache
end-volume

-----------------------------------
(2) SERVER volume file

/var/lib/glusterd/vols/tv1/tv1.gfvm3.opt-volume_test-tv_1-b1.vol

[root@gfvm3 glusterfs]# cat /var/lib/glusterd/vols/tv1/tv1.gfvm3.opt-volume_test-tv_1-b1.vol
volume tv1-posix
    type storage/posix
    option volume-id 16a23423-2748-4541-9b17-787609bf72fb
    option directory /opt/volume_test/tv_1/b1
end-volume

volume tv1-trash
    type features/trash
    option trash-internal-op off
    option brick-path /opt/volume_test/tv_1/b1
    option trash-dir .trashcan
    subvolumes tv1-posix
end-volume

volume tv1-changetimerecorder
    type features/changetimerecorder
    option sql-db-wal-autocheckpoint 1000
    option sql-db-cachesize 1000
    option ctr-record-metadata-heat off
    option record-counters off
    option ctr-enabled off
    option record-entry on
    option ctr_lookupheal_inode_timeout 300
    option ctr_lookupheal_link_timeout 300
    option ctr_link_consistency off
    option record-exit off
    option db-path /opt/volume_test/tv_1/b1/.glusterfs/
    option db-name b1.db
    option hot-brick off
    option db-type sqlite3
    subvolumes tv1-trash
end-volume

volume tv1-changelog
    type features/changelog
    option changelog-barrier-timeout 120
    option changelog-dir /opt/volume_test/tv_1/b1/.glusterfs/changelogs
    option changelog-brick /opt/volume_test/tv_1/b1
    subvolumes tv1-changetimerecorder
end-volume

volume tv1-bitrot-stub
    type features/bitrot-stub
    option export /opt/volume_test/tv_1/b1
    subvolumes tv1-changelog
end-volume

volume tv1-access-control
    type features/access-control
    subvolumes tv1-bitrot-stub
end-volume

volume tv1-locks
    type features/locks
    subvolumes tv1-access-control
end-volume

volume tv1-upcall
    type features/upcall
    option cache-invalidation off
    subvolumes tv1-locks
end-volume

volume tv1-io-threads
    type performance/io-threads
    subvolumes tv1-upcall
end-volume

volume tv1-marker
    type features/marker
    option inode-quota off
    option quota off
    option gsync-force-xtime off
    option xtime off
    option quota-version 0
    option timestamp-file /var/lib/glusterd/vols/tv1/marker.tstamp
    option volume-uuid 16a23423-2748-4541-9b17-787609bf72fb
    subvolumes tv1-io-threads
end-volume

volume tv1-barrier
    type features/barrier
    option barrier-timeout 120
    option barrier disable
    subvolumes tv1-marker
end-volume

volume tv1-index
    type features/index
    option index-base /opt/volume_test/tv_1/b1/.glusterfs/indices
    subvolumes tv1-barrier
end-volume

volume tv1-quota
    type features/quota
    option deem-statfs off
    option timeout 0
    option server-quota off
    option volume-uuid tv1
    subvolumes tv1-index
end-volume

volume tv1-worm
    type features/worm
    option worm off
    subvolumes tv1-quota
end-volume

volume tv1-read-only
    type features/read-only
    option read-only off
    subvolumes tv1-worm
end-volume

volume /opt/volume_test/tv_1/b1
    type debug/io-stats
    option count-fop-hits off
    option latency-measurement off
    option log-level INFO
    subvolumes tv1-read-only
end-volume

volume tv1-server
    type protocol/server
    option auth.addr./opt/volume_test/tv_1/b1.allow *
    option auth.login.f15ceb70-85fd-4be6-a084-757131d3bb0a.password c841565a-f1fc-4ffb-bb1c-2f5a0939c434
    option auth.login./opt/volume_test/tv_1/b1.allow f15ceb70-85fd-4be6-a084-757131d3bb0a
    option transport-type tcp
    subvolumes /opt/volume_test/tv_1/b1
end-volume
[root@gfvm3 glusterfs]#

-----------------------------------
SERVER again
/var/lib/glusterd/vols/tv1/tv1.gfvm3.opt-volume_test-tv_1-b2.vol

-- Similar to above.
-----------------------------------
REBALANCE

/var/lib/glusterd/vols/tv1/tv1-rebalance.vol
[root@gfvm3 glusterfs]# cat /var/lib/glusterd/vols/tv1/tv1-rebalance.vol
volume tv1-client-0
    type protocol/client
    option password c841565a-f1fc-4ffb-bb1c-2f5a0939c434
    option username f15ceb70-85fd-4be6-a084-757131d3bb0a
    option transport-type tcp
    option remote-subvolume /opt/volume_test/tv_1/b1
    option remote-host gfvm3
    option ping-timeout 42
end-volume

volume tv1-client-1
    type protocol/client
    option password c841565a-f1fc-4ffb-bb1c-2f5a0939c434
    option username f15ceb70-85fd-4be6-a084-757131d3bb0a
    option transport-type tcp
    option remote-subvolume /opt/volume_test/tv_1/b2
    option remote-host gfvm3
    option ping-timeout 42
end-volume

volume tv1-dht
    type cluster/distribute
    subvolumes tv1-client-0 tv1-client-1
end-volume

volume tv1
    type debug/io-stats
    option count-fop-hits off
    option latency-measurement off
    option log-level INFO
    subvolumes tv1-dht
end-volume
[root@gfvm3 glusterfs]#
-----------------------------------
-----------------------------------------------------------------------
[root@gfvm3 glusterfs]# gluster volume info tv1

Volume Name: tv1
Type: Distribute
Volume ID: 16a23423-2748-4541-9b17-787609bf72fb
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: gfvm3:/opt/volume_test/tv_1/b1
Brick2: gfvm3:/opt/volume_test/tv_1/b2
Options Reconfigured:
performance.readdir-ahead: on
[root@gfvm3 glusterfs]#
-----------------------------------------------------------------------
[root@gfvm3 glusterfs]#
[root@gfvm3 glusterfs]# gluster volume status tv1
Status of volume: tv1
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick gfvm3:/opt/volume_test/tv_1/b1        49152     0          Y       1733
Brick gfvm3:/opt/volume_test/tv_1/b2        49153     0          Y       1753
NFS Server on localhost                     N/A       N/A        N       N/A 

Task Status of Volume tv1
------------------------------------------------------------------------------
There are no active volume tasks

-----------------------------------------------------------------------
[root@gfvm3 glusterfs]# mount | grep tv1
gfvm3:/tv1 on /mnt/master type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)
[root@gfvm3 glusterfs]#
-------------------------------------------------------------------------
[root@gfvm3 ~]# cat /usr/local/etc/glusterfs/glusterd.vol
volume management
    type mgmt/glusterd
    option working-directory /var/lib/glusterd
    option transport-type socket,rdma
    option transport.socket.keepalive-time 10
    option transport.socket.keepalive-interval 2
    option transport.socket.read-fail-log off
    option ping-timeout 0
    option event-threads 1
#   option base-port 49152
end-volume
[root@gfvm3 ~]#
-------------------------------------------------------------------------------



performance measurement in gluster

===========================================

Performance measurement  - getting write statistics

The following steps should help you with profile info:

1) gluster volume profile start
2) Perform copy operations
3) gluster volume profile info (you will get stats of the FOPs at this point)
4) gluster volume profile stop

Please follow steps 1 through 4 twice. 1. Once for copy into glusterfs and
2. once for copy within.

===========================================