Persediaan Docker Production Ubuntu 16.04 Untuk Storage Driver Overlay2
Tujuan :-
Untuk menggunakan partition berasingan untuk /var/lib/docker dan Overlay2 sebagai Storage Driver.
Pastikan :-
Hanya lakukan pada pemasangan docker CE yang baru sahaja.
Pastikan dahulu partition hardisk baru telah dibuat.
1) sudo fdisk /dev/vdb
create vdb1
n p w
(vdb adalah volume dalam OpenStack)
(akan berbeza bagi setiap sistem)
2) Buat fail sistem xfs (system file creation)
sudo mkfs.xfs /dev/vdb1
3) labelkan (filesystem label)
sudo xfs_admin -L dockerstore /dev/vdb1
4) Hentikan docker
sudo systemctl stop docker
5) Buat backup directory /var/lib/docker
sudo cp -au /var/lib/docker /var/lib/docker.bk
6) delete isinya
rm -rf /var/lib/docker/*
(hati-hati dengan * star - jangan ada ruang)
(disengajakan tiada sudo. Sila tambah)
7) Masukkan dalam /etc/fstab
LABEL=dockerstore /var/lib/docker xfs defaults 0 0
8) mount filesystem tersebut
sudo mount /var/lib/docker
9) Periksa dengan sudo df -h
Contoh hasil :-
/dev/vdb1 1.0T 33M 1.0T 1% /var/lib/docker
10) Periksa overlay2 adalah default storage driver dengan arahan (Hanya disokong dalam kernel Linux versi 4.0 dan keatas)
docker info
Hasil output yang dicari adalah
Storage Driver: overlay2
11) Edit fail
/etc/docker/daemon.json
Isinya
{
"storage-driver": "overlay2"
}
12) Mulakan docker
sudo systemctl start docker
13) Periksa isi /var/lib/docker pastikan ada isinya
root@ranchernode1:~# ls /var/lib/docker
builder containerd containers image network overlay2 plugins runtimes swarm tmp trust volumes
14) docker info
Output yang dicari
Storage Driver: overlay2
Backing Filesystem: xfs
15) Periksa juga /var/lib/docker/overlay2 selepas download container
16) Untuk memudahkan pembesaran saiz partition, boleh gunakan LVM. Pastikan gunakan GPT untuk harddisk lebih 2TB
Rujukan :-
https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/#configure-docker-with-the-overlay-or-overlay2-storage-driver
https://liquidstate.net/using-disk-labels/
https://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
Nota oleh : Harisfazillah Jamel
[email protected]
5 Jan 2018
PS. Bagi Redhat / Centos 7 dan Fedora arahan yang digunakan adalah :-
container-storage-setup
Dan dengan Storage driver devicemapper
Persediaan Docker Production Ubuntu 16.04 Untuk Storage Driver Overlay2
Harisfazillah Jamel, 06 January 2018Popular Posts
-
Just my post to claim my blog in Technorati. Technorati Profile
-
Saya, Harisfazillah Jamel, rakyat Malaysia yang bekerja dan terlibat dalam bidang ICT ingin membuat bantahan kepada cara dan bagaimana ...
-
Install Oracle OCI8 for PHP 8.2 Ubuntu 22.04 Get the link for the latest RPM https://www.oracle.com/database/technologies/instant-client/...
-
Download And Use latest Version Of Nginx Stable To ensure you receive the latest security updates and bug fixes for Nginx, configure you...
-
Critical OpenSSH Vulnerability (CVE-2024-6387): Please Update Your Linux A critical security flaw (CVE-2024-6387) has been identified in O...
-
Registration Is Now Open For MSC Malaysia Open Source Conference 2010 (MSC MOSC2010) Please visit MSC MOSC2010 website to register http://...
-
Need to blog this. Keep on google for it. I need a set of command so I can check the IMAP connection for email server. Yep Im promoting the ...
-
Latihan Konsep Cluster Dalam Dunia Open Source Kenapa perlu Cluster? Cluster adalah bertujuan menggabungkan perkakasan atau sistem ...
-
Call For Speaker for Mini UbuCon Malaysia 2024 Mini UbuCon Malaysia 2024: Call for Speakers Share your Ubuntu expertise! The Ubuntu Malay...
-
Upgrade Clamav 0.93 in Zimbra 5 My friend had this problem with his zimbra installation. After upgrade Clamav to version 0.93 Zimbra service...
Labels
64bit
Activity
Adempire
advocate
Akta
Apache
ASAS
Azam
backup
backuppc
Bash
Beowulf
Big Data
Broadband
Budget
Centos
Cinta
Cluster
CMS
cmsfornerd
Company
Complain
computer
Computer Operation
Conference
Contest
Data Centre Operation
DBmail
Digg
Digital Certification
Discussion Group
Django
DNS
Docker
Domain
Duit Online
Economy
Elastic Stack
Elasticsearch
ELK
email
email server
English
Evangelist
Events
Family Tree
Fedora
File System
Firefox
Foss
FOSS.my
FreeBSD
FTX
Gesaan
Gluster
Gmail
Godaddy.com
Google
Google App
GTUG
Hacking
Hadoop
hafnie
Harisfazillah Jamel
horde
HP-UX
hwclock
IBM
ICT Service Delivery and Operation
Indonesia
Internet
Internet Tools
Itanium
Jabatan IT Negara
Jaring
Java
Javascript
Jepun
Jiwang
Joke
Joomla
K3S
K3Sup
Kernel
Kesihatan
Kibana
KOSTEM
Kubernetes
ldap
Linux
Linux Counter
linuxmalaysia
Logstash
Love
Mailman
MailScanner
Mailwatch
Malay
Malaysia
MAMPU
MDeC
meetup
Melaka
Melayu
Merdeka
Microsoft
Migration
mirror sites
Money Online
Monitor
MOSC 2010
MOSC2010
mosc2011
MOSC2013
MOSCMY
MOSCMY2014
MOSCMY2015
Mozilla
MPI
MSC Malaysia
MSC Malaysia OSCONF
MSCOSCONF
My Love
MyGOSSCON
MyMeeting
Mypenguin99
mysql
Nagios
NagiosQL
Negaraku
Nginx
nss_ldap
ntp
OBW2014
Open Office
Open Source
openldap
Openoffice.org
OpenSSH
OpenStack
Opera
OS2
OS400
OSCC
OSCC MAMPU
osdc.my
OSS
OSS Policy
OWASP
Parallel Computing
People Power
Personal
Petition
PGP
PHP
Pligg
Podman
Politik
Postfix
Postgresql
Programming
Proxmox
Python
q1moscmy2015
Questionnaires
Research
Research tools
RPM
SASSIAN
Sassian 85-89
Sassians 85-89
SCO
Security
Sekolah
Sekolah Alam Shah
Shell script
Software License
Solaris
SongketMail
SongketMailFilter
sourceforge
spam
spamassassin
Spoof
SSH
Survey
SVR4
System Tools
Technorati
Terjemahan
Terminal
TMnet
Tor
Training
translation
Treasury Malaysia
Trend Micro
Twitter
Ubuntu
Unix
Virtualization
VMS
VOIP
Wang
Web Server
Windows
Zimbra