🐙

Ang Ceph!

Object Storage & Backups

Distributed storage system na nagbibigay ng bagay, bloke, at file storage sa isang pinag-isa sistema

Impormasyon sa Pag-deploy

Pag-deploy: 2-5 minuto
kategorya: Object Storage & Backups
Min: 4096MB
Suporta: Ticket at email

Ibahagi ang gabay na ito

Pangkalahatang-ideya

Ang Ceph ay isang lubos na scalable at pinag-isang distributed storage system na nagbibigay ng object, block, at file storage sa iisang plataporma. Dinisenyo upang maging ganap na open-source, napakalaki ang kakayahang i-scale, at software-defined, naghahatid ang Ceph ng mga kakayahan sa storage na pang-enterprise nang walang vendor lock-in o mamahaling proprietary na hardware.

Sa pinakasentro nito, gumagamit ang Ceph ng CRUSH algorithm (Controlled Replication Under Scalable Hashing) upang matalinong ipamahagi ang datos sa mga storage node. Inaalis nito ang mga single point of failure at bottleneck, kaya nakakayang mag-scale ang sistema mula terabyte hanggang exabyte habang pinananatili ang mataas na performance at pagiging maaasahan. Ang kakayahang mag-self-heal at mag-self-manage ay nangangahulugang awtomatikong ibinabalanse ng Ceph ang datos kapag may idinagdag o inalis na node, at nakakabawi ito mula sa mga pagkabigo ng hardware nang walang manu-manong interbensyon.

Ang arkitektura ng Ceph ay binubuo ng ilang pangunahing bahagi: Object Storage Daemons (OSDs) na nag-iimbak ng aktwal na datos sa mga disk, Monitors (MONs) na nagpapanatili ng estado ng cluster at consensus, Managers (MGRs) na nagbibigay ng monitoring at management interface, at Metadata Servers (MDSs) para sa mga operasyon ng CephFS file system. Tinitiyak ng modular na disenyong ito na maaaring mag-scale nang hiwalay ang bawat bahagi batay sa pangangailangan ng workload.

Isa sa pinakamakapangyarihang feature ng Ceph ang kakayahang magbigay ng maraming storage interface mula sa iisang cluster. Nag-aalok ang RADOS Block Device (RBD) ng thin-provisioned na block storage na may snapshot at cloning, perpekto para sa mga virtual machine at database. Nagbibigay ang CephFS ng POSIX-compliant na distributed file system na may matibay na consistency guarantee. Naghahatid ang RADOS Gateway (RGW) ng S3 at Swift-compatible na object storage para sa mga application at cloud-native na workload.

Tuluy-tuloy na nakaka-integrate ang Ceph sa mga cloud platform gaya ng OpenStack, Kubernetes, at Proxmox VE, kaya ideal itong storage backend para sa virtualization at container environment. Kasama ang mga feature gaya ng erasure coding para sa episyenteng paggamit ng espasyo, tiering para sa hot/cold na datos, quality of service control, at multi-site replication para sa disaster recovery, naghahatid ang Ceph ng mga kakayahan sa storage na pang-enterprise sa bahagi lamang ng gastos ng tradisyonal na SAN o NAS na solusyon.

Ang aktibong open-source na komunidad, na suportado ng Red Hat at ng Ceph Foundation, ay tinitiyak ang tuloy-tuloy na pag-develop, regular na update, at malawak na dokumentasyon. Kung gumagawa ka ng private cloud, nagpapatakbo ng Kubernetes cluster, o namamahala ng malalaking media archive, naghahatid ang Ceph ng performance, pagiging maaasahan, at kakayahang umangkop na kailangan para sa mga modernong data-intensive na application.

Mga Susing Katangian

Pinag-isang Storage Platform

Ang iisang cluster ay nagbibigay ng object, block, at file storage na may pare-parehong management at monitoring

Napakalaking Scalability

Mag-scale mula gigabyte hanggang exabyte sa pamamagitan lamang ng pagdaragdag ng mas maraming node nang walang downtime o data migration

Self-Healing na Arkitektura

Awtomatikong nakikita ang mga pagkabigo, nire-replicate ang datos, at ibinabalanse ang cluster nang walang manu-manong interbensyon

Walang Single Point of Failure

Ang distributed na arkitektura gamit ang CRUSH algorithm ay tinitiyak ang mataas na availability at fault tolerance

Suporta sa Maraming Protocol

Native na suporta para sa RBD block storage, CephFS filesystem, at S3/Swift object storage API

Mga Enterprise Feature

Snapshot, cloning, thin provisioning, erasure coding, tiering, at multi-site replication

Gamitin ang mga kaso

• OpenStack Storage Backend: Magbigay ng block at object storage para sa OpenStack Glance (mga image), Cinder (mga volume), at Nova (mga instance)
• Kubernetes Persistent Volume: Dynamic na provisioning ng mga RBD block device para sa mga containerized na application gamit ang CSI driver
• Private Cloud Storage: Bumuo ng scalable na imprastraktura ng storage para sa mga VM disk image at datos ng application
• Media at Archive Storage: Mag-imbak ng malalaking video file, backup, at archive gamit ang erasure coding para sa episyenteng paggamit ng espasyo
• High-Performance Computing: Parallel file system para sa scientific computing at mga workload ng data analytics
• Database Storage: RBD block device para sa MySQL, PostgreSQL, at MongoDB na may snapshot at replication
• Backup Repository: Mura at pangmatagalang backup storage na may S3-compatible na object storage interface

Panuntunan ng Pag-install

Pag-install sa Ubuntu 22.04 LTS (3-Node Cluster):

Mga Prerequisite (Lahat ng Node):
# Update system
sudo apt update && sudo apt upgrade -y

# Set hostnames (on each node)
sudo hostnamectl set-hostname ceph-node1  # ceph-node2, ceph-node3
1. I-install ang Cephadm (Bootstrap Node):
# Install dependencies
sudo apt install -y python3 python3-pip curl

# Download cephadm
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/quincy/src/cephadm/cephadm
chmod +x cephadm

# Install cephadm
sudo ./cephadm add-repo --release quincy
sudo ./cephadm install
2. I-bootstrap ang Cluster (Node 1):
# Bootstrap first node
sudo cephadm bootstrap --mon-ip 10.0.0.10 --cluster-network 10.0.1.0/24

# Save output - contains dashboard URL and admin password
# Dashboard: https://ceph-node1:8443/
# Username: admin
# Password: <generated-password>
3. Magdagdag ng Karagdagang Node:
# Copy SSH key to other nodes
ssh-copy-id root@ceph-node2
ssh-copy-id root@ceph-node3

# Add hosts to cluster
sudo ceph orch host add ceph-node2 10.0.0.11
sudo ceph orch host add ceph-node3 10.0.0.12

# Label nodes for specific roles
sudo ceph orch host label add ceph-node1 mon
sudo ceph orch host label add ceph-node2 mon
sudo ceph orch host label add ceph-node3 mon
4. I-deploy ang MON at MGR Daemon:
# Deploy monitors (3 for quorum)
sudo ceph orch apply mon --placement="3 ceph-node1 ceph-node2 ceph-node3"

# Deploy managers (2 for HA)
sudo ceph orch apply mgr --placement="2 ceph-node1 ceph-node2"
5. Magdagdag ng OSD Storage:
# List available devices
sudo ceph orch device ls

# Add all available devices as OSDs
sudo ceph orch apply osd --all-available-devices

# Or add specific devices
sudo ceph orch daemon add osd ceph-node1:/dev/sdb
sudo ceph orch daemon add osd ceph-node2:/dev/sdb
sudo ceph orch daemon add osd ceph-node3:/dev/sdb
6. I-deploy ang MDS para sa CephFS (Opsyonal):
# Create CephFS
sudo ceph fs volume create cephfs --placement="2 ceph-node1 ceph-node2"
7. I-enable ang Dashboard:
# Enable dashboard module
sudo ceph mgr module enable dashboard

# Create dashboard admin user
sudo ceph dashboard ac-user-create admin <password> administrator

# Check dashboard status
sudo ceph mgr services
8. Gumawa ng RBD Pool para sa Block Storage:
# Create replicated pool (3 replicas)
sudo ceph osd pool create rbd 64 64

# Enable RBD application
sudo ceph osd pool application enable rbd rbd

# Initialize pool
sudo rbd pool init rbd
9. I-verify ang Kalusugan ng Cluster:
# Check cluster status
sudo ceph -s

# Check OSD status
sudo ceph osd status

# Check MON status
sudo ceph mon stat

Mga Tip sa Konfigurasyon

Mahalagang Configuration:

1. Pag-configure ng Pool:
# Create replicated pool (size=3, min_size=2)
ceph osd pool create mypool 128 128
ceph osd pool set mypool size 3
ceph osd pool set mypool min_size 2

# Create erasure-coded pool (k=4, m=2)
ceph osd erasure-code-profile set myprofile k=4 m=2
ceph osd pool create mypool-ec 128 128 erasure myprofile
2. Pamamahala ng RBD Block Device:
# Create RBD image (10GB)
rbd create mypool/myimage --size 10G

# List images
rbd ls mypool

# Map image to local device
sudo rbd map mypool/myimage

# Format and mount
sudo mkfs.ext4 /dev/rbd0
sudo mount /dev/rbd0 /mnt/ceph-disk

# Create snapshot
rbd snap create mypool/myimage@snap1

# Clone snapshot
rbd snap protect mypool/myimage@snap1
rbd clone mypool/myimage@snap1 mypool/clone1
3. Mount ng CephFS (Client):
# Install ceph-fuse
sudo apt install ceph-fuse

# Get admin keyring
sudo ceph auth get-or-create client.cephfs mon 'allow r' mds 'allow rw' osd 'allow rw pool=cephfs_data'

# Mount CephFS
sudo ceph-fuse -n client.cephfs /mnt/cephfs

# Or kernel mount
sudo mount -t ceph ceph-node1:6789:/ /mnt/cephfs -o name=cephfs,secret=<key>
4. Gateway ng RADOS (S3/Swift):
# Deploy RGW
ceph orch apply rgw myrgw --placement="2 ceph-node1 ceph-node2" --port=8080

# Create S3 user
radosgw-admin user create --uid=s3user --display-name="S3 User" --access-key=ACCESSKEY --secret-key=SECRETKEY

# Test with s3cmd
s3cmd --access_key=ACCESSKEY --secret_key=SECRETKEY --host=http://ceph-node1:8080 ls
5. Pag-tune ng Performance:
# Set scrub intervals (reduce I/O impact)
ceph osd set noscrub
ceph osd set nodeep-scrub

# Adjust backfill and recovery
ceph tell 'osd.*' injectargs '--osd-max-backfills 1'
ceph tell 'osd.*' injectargs '--osd-recovery-max-active 1'

# Enable RBD caching
rbd config global set rbd_cache true
rbd config global set rbd_cache_size 67108864  # 64MB
6. Monitoring:
# Check cluster health
ceph health detail

# Monitor real-time stats
ceph -w

# Check pool usage
ceph df

# Check OSD performance
ceph osd perf

# View PG statistics
ceph pg stat
Mga Best Practice:
- Gumamit ng magkahiwalay na network para sa public at cluster traffic
- Mag-deploy ng monitor sa nakalaang magagaan na node
- Gumamit ng SSD para sa OSD journal/WAL at BlueStore metadata
- Mag-configure ng hindi bababa sa 3 replica o erasure coding na k+m≥3
- Regular na scrubbing at deep-scrubbing para sa integridad ng datos
- I-monitor ang IOPS, latency, at network bandwidth
- Gumamit ng CRUSH rule para ipamahagi ang datos sa mga failure domain
- I-enable ang dashboard at Prometheus metrics para sa monitoring

Teknolohiya Requirements

Mga Requirement ng System

  • Memorya: 4096MB RAM

I-rate ang Artikulo na Ito

★★★★★
-
Pag-load ng pahina...

Handa ka na bang i-deploy ang iyong aplikasyon? Ang Ceph!?

Magsimula sa loob ng ilang minuto sa aming simpleng proseso ng pag-deploy VPS

I-deploy sa tungkol sa2minuto • Buong root access • Suporta sa pamamagitan ng tiket at email