SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
CONCON--TAINTAIN--ERSERS
CON-TAIN-ERSCON-TAIN-ERS
CON-TAIN-ERSCON-TAIN-ERS
CON-TAINCON-TAIN--ERSERS
CONCON--TAINTAIN-ERS-ERS
CON-TAIN-ERSCON-TAIN-ERS
CONCON-TAIN-ERS-TAIN-ERS
CON-TAIN-ERSCON-TAIN-ERS
CON-CON-TAINTAIN--ERSERS
● chroot
● namespaces
● cgroups
Control Groups
What do we have?
● cpuset - whole cores and cpu mapping
● cpuacct - cpu cycle accounting
● cpu - less then core granularity
● memory - limits and accounting
● blkio - limits and accounting
● net_cls - network classification
● net_prio - network priority
● Freezer + checkpoint/restore - migration
General structure
● tasks
– attach a task(thread) and show
list of threads
● cgroup.procs
– show list of processes
# mount -t cgroup none /cgroups
# mount -t cgroup -o cpuset cpuset /cg/cpuset
How to use them?
● Create cgroup
# mkdir /cgroup/GRP
● Prepare minimum limits
# echo 0-2 > /cgroup/GRP/cpuset.cpus
# echo 0-1 > /cgroup/GRP/cpuset.mems
● Add a process to a cgroup:
# echo PID > /cgroup/GRP/tasks
● Verify that a process is in the cgroup
# grep PID /cgroup/GRP/tasks
cpuset
● Physical CPU & Memory limits
– cpuset.cpus - list of allowed CPUs
– cpuset.mems - list of allowed memory slots
– cpuset.cpu_exclusive - 0/1 are the CPUs
exclusive to this group
– cpuset.mem_exclusive - 0/1 are the memory
slots exclusive to this group
Documentation/cgroups/cpusets.txt
CPU accounting
● cpu usage combined for all cpus (in
nanoseconds)
● cpu usage per-cpu (in nanoseconds)
● per cpu and user/system(in USER_HZ)
● Documentation/cgroups/cpuacct.txt
CPU
● CPU scheduler limits CONFIG_CGROUP_SCHED
– cpu.shares
– cpu.cfs_quota_us: in microseconds
– cpu.cfs_period_us: in microseconds (default 100ms)
– cpu.stat: exports throttling statistics
nr_throttled: Number of times the group has been
throttled/limited.
throttled_time: The total time duration (in
nanoseconds) for which entities of the group have
been throttled.
● Documentation/scheduler/sched-bwc.txt
CPU 3
CPU 2
CPU 0
CPU examples
CPU 1
q - quata
p - period
q: 500
p: 500
q: 1000
p: 500
q: 1500
p: 500
q: 2000
p: 500
# echo 250000 > cpu.cfs_quota_us
# echo 500000 > cpu.cfs_period_us
q: 250
p: 500
memory
Only Memory
● memory.usage_in_bytes
– show current res_counter usage for memory
● memory.limit_in_bytes
– set/show limit of memory usage
● memory.failcnt
– show the number of memory usage hits limits
Memory + Swap
● memory.memsw.usage_in_bytes
● memory.memsw.limit_in_bytes
● memory.memsw.failcnt
memory
Kernel Memory limits
● memory.kmem.limit_in_bytes
– set/show hard limit for kernel memory
● memory.kmem.usage_in_bytes
– show current kernel memory allocation
● memory.kmem.failcnt
– show the number of kernel memory usage hits
limits
blkio
● blkio.weight
– allowed range 10 - 1000
– we use 500
● blkio.throttle.io_serviced
blkio
/ cgroup - 100% I/O/ cgroup - 100% I/O
blkio
/lxc - 90% I/O/lxc - 90% I/O
blkio
/lxc/lxc
90% I/O90% I/O
/lxc/c120
50% I/O
from the 90%
in /lxc for each
container
blkio
// 10241024
|- lxc/|- lxc/ 900900
| |- c120| |- c120 450450
| |- c121| |- c121 450450
| |- c122| |- c122 450450
| |- c123| |- c123 450450
So each container can get only 50% of the totalSo each container can get only 50% of the total
I/O of the LXC cgroupI/O of the LXC cgroup
Network
● Adding network class to each cgroup so you
can later limit it with tc
– Documentation/cgroups/net_cls.txt
● Prioritizing network traffic on interface
– Documentation/cgroups/net_prio.txt
Freezer + CRIU
● freezer.state
– ТHAWED
– FREEZING
– FROZEN
● freezer.self_freezing
– 0 (thawed)/ 1 (frozen)
● freezer.parent_freezing
– 0 if partent is frozen
● CRIU - Checkpoint and Restore
In Userspace
Linux
Namespac
es
Why do we need that?
What namespaces do we
have?
● UTS namespace
● User namespace
● PID namespace
● IPC namespace
● Mount namespace
● Network namespace
UTS namespace
● Hostname
kernel.hostname = lxc1
● Domainname
kernel.domainname = sgvps.net
Host namespace
New
namespace
New
namespace
New
namespace
User namespace
User authentication and mapping files:
● /etc/passwd
● /etc/group
● /etc/shadow
- What if we want to create a username called
pesho, but such user already exists?
- What if we want to create user joan with UID
1005, but there is already user pesho with UID
1005?
IPC namespace
Unix/Linux IPCs
- unix domain sockets
- shared memory
- semaphores
- message queues
/proc/PID/fd/
|- 3 -> socket:[3537]
IPC namespace
Unix/Linux IPCs
- unix domain sockets
- shared memory
- semaphores
- message queues
key shmid owner perms bytes nattch
0x0052e2c1 1139834880 postgres 600 37879808 4
Network namespace
- IP
- IPv6
- Routing
- TCP
- UDP
- SCTP
- DCCP
- RDS
● Having а separate
loopback device for a process
● Or simply test the MySQL
server on the same IP
● Completely different routing
for a process
Mount namespace
the most complex one...
having only one / is a problem...
- at around 22000 mounts everything on your
machine starts to lag... no matter how many
cores or ram you have :(
- having a different /proc/mounts per process
would be nice and very interesting to
implement... :)
PID namespace
Migration of processes between machines (CRIU)
It allows you to have a two or more processes
running with the same PID.
PID - is the PID on the host machine
NSPID - is the PID that the process sees
PID NSPID
1421 5420 ssh-agent
1730 5420 xchat
1756 5420 firefox
QQ
UU
EE
SS
TT
II
OO
NN
SS
The NEW Backup system
The NEW Backup system
Avatar Design
Avatar MasterAvatar Master
Host ServersHost Servers Backup ServersBackup Servers
Avatar Design
Avatar MasterAvatar Master
Host ServersHost Servers Backup ServerBackup Server
Schedule backup jobs
Avatar Design
Avatar MasterAvatar Master
Host ServerHost Server Backup ServerBackup Server
Start backups
Each backup server
has a limit of maximum
simultaneous jobs.
- max jobs
- max backups
- max restores
Avatar Design
Avatar MasterAvatar Master
Host ServerHost Server Backup ServerBackup Server
Report status
each backup reports a lot of things:
- thinpool data usage
- mounted df output
- LV df output
- archive_size
- broken dbs
- remote_addr
- user IP
- exit_code
- caller_pid
- interface_type
- archive_size
- last_progress
Layerd backupsFile
Physical Volume
Volume Group
ThinPool
Logical Volume
Snapshot6
Snapshot5
Snapshot4
Snapshot3
Snapshot2
Snapshot1
Snapshot0
Loop mount
Backup Server Structure
/sdb/avatar on /var/backups type none (rw,bind)
# ls /var/backups/siteground200.com/
total 33333656
-rw------- 1 root root 32212254720 Jul 22 04:03 camerafi
-rw------- 1 root root 32212254720 Jul 22 01:36 celticc1
-rw------- 1 root root 32212254720 Jul 22 00:57 citecang
-rw------- 1 root root 32212254720 Jul 21 20:24 ecoshea5
[root@smallvault1 /]#
Backup Server Structure
# losetup -f /var/backups/siteground200.com/exaera30
# losetup -a
/dev/loop0: [0811]:909901835
(/var/backups/siteground200.com/exaera30)
# vgchange -K -ay
2 logical volume(s) in volume group "exaera30" now active
# lvs
LV VG Attr LSize Pool Origin Data% Meta%
1437516546 exaera30 Vwi-a-t--- 30.00g coregroup 2.09
coregroup exaera30 twi-a-t--- 29.82g 2.10 1.54
#
Backup Server Structure
[root@smallvault1 /]# mount /dev/exaera30/1437516546
/mnt/...
[root@smallvault1 /]# ls -l /mnt/exaera30/1437516546
total 40
drwxr-xr-x5 root root 4096 Jul 21 17:09 configs
drwxr-xr-x3 963 959 4096 Dec 23 2014 etc
drwx--x--x14963 959 4096 Dec 23 2014 home
drwx------ 2 root root 16384 Jul 21 17:09 lost+found
drwxr-x--- 9 963 959 4096 Feb 29 2012 mail
drwxr-xr-x2 root root 4096 Jul 21 17:09 mysql
drwxr-xr-x2 root root 4096 Jul 21 17:09 pgsql
[root@smallvault1 /]#
Account Backup/Restore
● Configuration
– Extractor scripts
– Intractor scripts
● Files
● Mails
● SQLs
– MySQL, mysqldump
– PgSQL, pg_dump
Full server restore
Avatar MasterAvatar Master
Host ServerHost Server Backup ServerBackup Server
Report status
account 1
ns1 & ns2 restore here
account 3
Web Interface?
● Ammm...
SOON :)
SiteGround Tech TeamBuilding

Más contenido relacionado

La actualidad más candente

1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera clusterOlinData
 
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiess6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiesChris Huybregts
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkLouis liu
 
Performance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networksPerformance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networksMarian Marinov
 
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webSzymon Haly
 
Python, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary ClassificationPython, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary ClassificationHamed Shah-Hosseini
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detailLouis liu
 
MyAWR another mysql awr
MyAWR another mysql awrMyAWR another mysql awr
MyAWR another mysql awrLouis liu
 
My sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsMy sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsLouis liu
 
Nvmfs benchmark
Nvmfs benchmarkNvmfs benchmark
Nvmfs benchmarkLouis liu
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementKenny (netman)
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfsSarwar Javaid
 
Cpu高效编程技术
Cpu高效编程技术Cpu高效编程技术
Cpu高效编程技术Feng Yu
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica setSudheer Kondla
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMDevOps.com
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkHarold Giménez
 

La actualidad más candente (20)

1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster
 
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologiess6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
s6196-chris-huybregts-microsoft-new-gpu-virtualization-technologies
 
Dev ops
Dev opsDev ops
Dev ops
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmark
 
Performance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networksPerformance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networks
 
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-web
 
Python, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary ClassificationPython, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary Classification
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detail
 
PostgreSQL Replication with Bucardo
PostgreSQL Replication with BucardoPostgreSQL Replication with Bucardo
PostgreSQL Replication with Bucardo
 
MyAWR another mysql awr
MyAWR another mysql awrMyAWR another mysql awr
MyAWR another mysql awr
 
LSA2 - PostgreSQL
LSA2 - PostgreSQLLSA2 - PostgreSQL
LSA2 - PostgreSQL
 
My sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsMy sql fabric ha and sharding solutions
My sql fabric ha and sharding solutions
 
Nvmfs benchmark
Nvmfs benchmarkNvmfs benchmark
Nvmfs benchmark
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfs
 
Cpu高效编程技术
Cpu高效编程技术Cpu高效编程技术
Cpu高效编程技术
 
RamDisk
RamDiskRamDisk
RamDisk
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the Trunk
 

Similar a SiteGround Tech TeamBuilding

Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Praguetomasbart
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntuSim Janghoon
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephRongze Zhu
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactAlessandro Selli
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyLinaro
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVMAchieving the ultimate performance with KVM
Achieving the ultimate performance with KVMStorPool Storage
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2While42
 
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...Ron Munitz
 
Build an affordable Cloud Stroage
Build an affordable Cloud StroageBuild an affordable Cloud Stroage
Build an affordable Cloud StroageAlex Lau
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptxssuserfcf43f
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterAndrey Kudryavtsev
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM ShapeBlue
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016StackIQ
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMdata://disrupted®
 
Presentation aix performance tuning
Presentation   aix performance tuningPresentation   aix performance tuning
Presentation aix performance tuningxKinAnx
 

Similar a SiteGround Tech TeamBuilding (20)

Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
 
linux-memory-explained.pdf
linux-memory-explained.pdflinux-memory-explained.pdf
linux-memory-explained.pdf
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case study
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVMAchieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon Boston, ...
 
Build an affordable Cloud Stroage
Build an affordable Cloud StroageBuild an affordable Cloud Stroage
Build an affordable Cloud Stroage
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptx
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Presentation aix performance tuning
Presentation   aix performance tuningPresentation   aix performance tuning
Presentation aix performance tuning
 
SOFA Tutorial
SOFA TutorialSOFA Tutorial
SOFA Tutorial
 

Más de Marian Marinov

Dev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & LoggingDev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & LoggingMarian Marinov
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsMarian Marinov
 
Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?Marian Marinov
 
Introduction and replication to DragonflyDB
Introduction and replication to DragonflyDBIntroduction and replication to DragonflyDB
Introduction and replication to DragonflyDBMarian Marinov
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMarian Marinov
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfMarian Marinov
 
How to survive in the work from home era
How to survive in the work from home eraHow to survive in the work from home era
How to survive in the work from home eraMarian Marinov
 
Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Marian Marinov
 
Securing your MySQL server
Securing your MySQL serverSecuring your MySQL server
Securing your MySQL serverMarian Marinov
 
DoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKDoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKMarian Marinov
 
Challenges with high density networks
Challenges with high density networksChallenges with high density networks
Challenges with high density networksMarian Marinov
 
SiteGround building automation
SiteGround building automationSiteGround building automation
SiteGround building automationMarian Marinov
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingMarian Marinov
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of serversMarian Marinov
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failuresMarian Marinov
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingMarian Marinov
 
How to build your own anycast service
How to build your own anycast serviceHow to build your own anycast service
How to build your own anycast serviceMarian Marinov
 

Más de Marian Marinov (20)

Dev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & LoggingDev.bg DevOps March 2024 Monitoring & Logging
Dev.bg DevOps March 2024 Monitoring & Logging
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanisms
 
Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?Microservices: Benefits, drawbacks and are they for me?
Microservices: Benefits, drawbacks and are they for me?
 
Introduction and replication to DragonflyDB
Introduction and replication to DragonflyDBIntroduction and replication to DragonflyDB
Introduction and replication to DragonflyDB
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdf
 
How to survive in the work from home era
How to survive in the work from home eraHow to survive in the work from home era
How to survive in the work from home era
 
Managing sysadmins
Managing sysadminsManaging sysadmins
Managing sysadmins
 
Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?Защо и как да обогатяваме знанията си?
Защо и как да обогатяваме знанията си?
 
Securing your MySQL server
Securing your MySQL serverSecuring your MySQL server
Securing your MySQL server
 
Sysadmin vs. dev ops
Sysadmin vs. dev opsSysadmin vs. dev ops
Sysadmin vs. dev ops
 
DoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKDoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDK
 
Challenges with high density networks
Challenges with high density networksChallenges with high density networks
Challenges with high density networks
 
SiteGround building automation
SiteGround building automationSiteGround building automation
SiteGround building automation
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel tracking
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of servers
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failures
 
Preventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel trackingPreventing cpu side channel attacks with kernel tracking
Preventing cpu side channel attacks with kernel tracking
 
How to build your own anycast service
How to build your own anycast serviceHow to build your own anycast service
How to build your own anycast service
 
Electrical workshop
Electrical workshopElectrical workshop
Electrical workshop
 

Último

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

SiteGround Tech TeamBuilding

  • 6. What do we have? ● cpuset - whole cores and cpu mapping ● cpuacct - cpu cycle accounting ● cpu - less then core granularity ● memory - limits and accounting ● blkio - limits and accounting ● net_cls - network classification ● net_prio - network priority ● Freezer + checkpoint/restore - migration
  • 7. General structure ● tasks – attach a task(thread) and show list of threads ● cgroup.procs – show list of processes # mount -t cgroup none /cgroups # mount -t cgroup -o cpuset cpuset /cg/cpuset
  • 8. How to use them? ● Create cgroup # mkdir /cgroup/GRP ● Prepare minimum limits # echo 0-2 > /cgroup/GRP/cpuset.cpus # echo 0-1 > /cgroup/GRP/cpuset.mems ● Add a process to a cgroup: # echo PID > /cgroup/GRP/tasks ● Verify that a process is in the cgroup # grep PID /cgroup/GRP/tasks
  • 9. cpuset ● Physical CPU & Memory limits – cpuset.cpus - list of allowed CPUs – cpuset.mems - list of allowed memory slots – cpuset.cpu_exclusive - 0/1 are the CPUs exclusive to this group – cpuset.mem_exclusive - 0/1 are the memory slots exclusive to this group Documentation/cgroups/cpusets.txt
  • 10. CPU accounting ● cpu usage combined for all cpus (in nanoseconds) ● cpu usage per-cpu (in nanoseconds) ● per cpu and user/system(in USER_HZ) ● Documentation/cgroups/cpuacct.txt
  • 11. CPU ● CPU scheduler limits CONFIG_CGROUP_SCHED – cpu.shares – cpu.cfs_quota_us: in microseconds – cpu.cfs_period_us: in microseconds (default 100ms) – cpu.stat: exports throttling statistics nr_throttled: Number of times the group has been throttled/limited. throttled_time: The total time duration (in nanoseconds) for which entities of the group have been throttled. ● Documentation/scheduler/sched-bwc.txt
  • 12. CPU 3 CPU 2 CPU 0 CPU examples CPU 1 q - quata p - period q: 500 p: 500 q: 1000 p: 500 q: 1500 p: 500 q: 2000 p: 500 # echo 250000 > cpu.cfs_quota_us # echo 500000 > cpu.cfs_period_us q: 250 p: 500
  • 13. memory Only Memory ● memory.usage_in_bytes – show current res_counter usage for memory ● memory.limit_in_bytes – set/show limit of memory usage ● memory.failcnt – show the number of memory usage hits limits Memory + Swap ● memory.memsw.usage_in_bytes ● memory.memsw.limit_in_bytes ● memory.memsw.failcnt
  • 14. memory Kernel Memory limits ● memory.kmem.limit_in_bytes – set/show hard limit for kernel memory ● memory.kmem.usage_in_bytes – show current kernel memory allocation ● memory.kmem.failcnt – show the number of kernel memory usage hits limits
  • 15. blkio ● blkio.weight – allowed range 10 - 1000 – we use 500 ● blkio.throttle.io_serviced
  • 16. blkio / cgroup - 100% I/O/ cgroup - 100% I/O
  • 17. blkio /lxc - 90% I/O/lxc - 90% I/O
  • 18. blkio /lxc/lxc 90% I/O90% I/O /lxc/c120 50% I/O from the 90% in /lxc for each container
  • 19. blkio // 10241024 |- lxc/|- lxc/ 900900 | |- c120| |- c120 450450 | |- c121| |- c121 450450 | |- c122| |- c122 450450 | |- c123| |- c123 450450 So each container can get only 50% of the totalSo each container can get only 50% of the total I/O of the LXC cgroupI/O of the LXC cgroup
  • 20. Network ● Adding network class to each cgroup so you can later limit it with tc – Documentation/cgroups/net_cls.txt ● Prioritizing network traffic on interface – Documentation/cgroups/net_prio.txt
  • 21. Freezer + CRIU ● freezer.state – ТHAWED – FREEZING – FROZEN ● freezer.self_freezing – 0 (thawed)/ 1 (frozen) ● freezer.parent_freezing – 0 if partent is frozen ● CRIU - Checkpoint and Restore In Userspace
  • 22.
  • 24. Why do we need that?
  • 25. What namespaces do we have? ● UTS namespace ● User namespace ● PID namespace ● IPC namespace ● Mount namespace ● Network namespace
  • 26. UTS namespace ● Hostname kernel.hostname = lxc1 ● Domainname kernel.domainname = sgvps.net
  • 28. User namespace User authentication and mapping files: ● /etc/passwd ● /etc/group ● /etc/shadow - What if we want to create a username called pesho, but such user already exists? - What if we want to create user joan with UID 1005, but there is already user pesho with UID 1005?
  • 29. IPC namespace Unix/Linux IPCs - unix domain sockets - shared memory - semaphores - message queues /proc/PID/fd/ |- 3 -> socket:[3537]
  • 30. IPC namespace Unix/Linux IPCs - unix domain sockets - shared memory - semaphores - message queues key shmid owner perms bytes nattch 0x0052e2c1 1139834880 postgres 600 37879808 4
  • 31. Network namespace - IP - IPv6 - Routing - TCP - UDP - SCTP - DCCP - RDS ● Having а separate loopback device for a process ● Or simply test the MySQL server on the same IP ● Completely different routing for a process
  • 32. Mount namespace the most complex one... having only one / is a problem... - at around 22000 mounts everything on your machine starts to lag... no matter how many cores or ram you have :( - having a different /proc/mounts per process would be nice and very interesting to implement... :)
  • 33. PID namespace Migration of processes between machines (CRIU) It allows you to have a two or more processes running with the same PID. PID - is the PID on the host machine NSPID - is the PID that the process sees PID NSPID 1421 5420 ssh-agent 1730 5420 xchat 1756 5420 firefox
  • 35. The NEW Backup system
  • 36. The NEW Backup system
  • 37. Avatar Design Avatar MasterAvatar Master Host ServersHost Servers Backup ServersBackup Servers
  • 38. Avatar Design Avatar MasterAvatar Master Host ServersHost Servers Backup ServerBackup Server Schedule backup jobs
  • 39. Avatar Design Avatar MasterAvatar Master Host ServerHost Server Backup ServerBackup Server Start backups Each backup server has a limit of maximum simultaneous jobs. - max jobs - max backups - max restores
  • 40. Avatar Design Avatar MasterAvatar Master Host ServerHost Server Backup ServerBackup Server Report status each backup reports a lot of things: - thinpool data usage - mounted df output - LV df output - archive_size - broken dbs - remote_addr - user IP - exit_code - caller_pid - interface_type - archive_size - last_progress
  • 41. Layerd backupsFile Physical Volume Volume Group ThinPool Logical Volume Snapshot6 Snapshot5 Snapshot4 Snapshot3 Snapshot2 Snapshot1 Snapshot0 Loop mount
  • 42. Backup Server Structure /sdb/avatar on /var/backups type none (rw,bind) # ls /var/backups/siteground200.com/ total 33333656 -rw------- 1 root root 32212254720 Jul 22 04:03 camerafi -rw------- 1 root root 32212254720 Jul 22 01:36 celticc1 -rw------- 1 root root 32212254720 Jul 22 00:57 citecang -rw------- 1 root root 32212254720 Jul 21 20:24 ecoshea5 [root@smallvault1 /]#
  • 43. Backup Server Structure # losetup -f /var/backups/siteground200.com/exaera30 # losetup -a /dev/loop0: [0811]:909901835 (/var/backups/siteground200.com/exaera30) # vgchange -K -ay 2 logical volume(s) in volume group "exaera30" now active # lvs LV VG Attr LSize Pool Origin Data% Meta% 1437516546 exaera30 Vwi-a-t--- 30.00g coregroup 2.09 coregroup exaera30 twi-a-t--- 29.82g 2.10 1.54 #
  • 44. Backup Server Structure [root@smallvault1 /]# mount /dev/exaera30/1437516546 /mnt/... [root@smallvault1 /]# ls -l /mnt/exaera30/1437516546 total 40 drwxr-xr-x5 root root 4096 Jul 21 17:09 configs drwxr-xr-x3 963 959 4096 Dec 23 2014 etc drwx--x--x14963 959 4096 Dec 23 2014 home drwx------ 2 root root 16384 Jul 21 17:09 lost+found drwxr-x--- 9 963 959 4096 Feb 29 2012 mail drwxr-xr-x2 root root 4096 Jul 21 17:09 mysql drwxr-xr-x2 root root 4096 Jul 21 17:09 pgsql [root@smallvault1 /]#
  • 45. Account Backup/Restore ● Configuration – Extractor scripts – Intractor scripts ● Files ● Mails ● SQLs – MySQL, mysqldump – PgSQL, pg_dump
  • 46. Full server restore Avatar MasterAvatar Master Host ServerHost Server Backup ServerBackup Server Report status account 1 ns1 & ns2 restore here account 3