← Solutions Notes

Huawei · OceanProtect · Field notes 5 of 6บันทึกงาน 5 จาก 6

Fileset protection: the numbers you plan withFileset: ตัวเลขที่ใช้วางแผน

Fileset backup looks like the simple case — put an agent on the host, point it at some folders. The work is in three places: how much space the copies will take, how much bandwidth the window needs, and which files the agent will quietly skip. การสำรองแบบ fileset ดูเหมือนง่ายที่สุด ลงเอเจนต์บนเครื่อง แล้วชี้ไปที่โฟลเดอร์ที่ต้องการ แต่งานจริงอยู่ที่สามเรื่อง คือสำเนาจะกินพื้นที่เท่าไหร่ ต้องใช้แบนด์วิดท์เท่าไหร่ถึงจะทันเวลา และไฟล์ไหนบ้างที่เอเจนต์จะข้ามไปเงียบๆ

Deploymentรูปแบบติดตั้ง
Agent on the hostลงเอเจนต์บนเครื่อง
Paths per filesetจำนวนพาธต่อ fileset
64
Lab full backupผลทดสอบ full backup
800 MB/s
Lab full restoreผลทดสอบกู้คืนเต็ม
400 MB/s

Sizing the backup capacityคำนวณพื้นที่ที่ต้องใช้

The formula is straightforward once you have the retention policy in front of you:สูตรไม่ยาก ขอแค่มีนโยบายการเก็บสำเนาอยู่ตรงหน้า

Formulaสูตร

(full sizeขนาด full × full copiesจำนวนสำเนา full + incremental sizeขนาด incremental × incremental copiesจำนวนสำเนา incremental) × dedup&compression ratioอัตรา dedup และบีบอัด / (1 − redundancyเผื่อสำรอง)

Worked exampleตัวอย่างที่คำนวณให้ดู
Inputตัวตั้ง Valueค่า
Full backup sizeขนาดข้อมูล full backup10 TB
Incremental sizeขนาดข้อมูล incremental200 GB
Full every week, kept 1 monthFull ทุกสัปดาห์ เก็บ 1 เดือน5 copiesสำเนา
Incremental daily, kept 1 weekIncremental ทุกวัน เก็บ 1 สัปดาห์8 copiesสำเนา
Dedup and compressiondedup และบีบอัด4:1
Redundancyเผื่อสำรอง20%
Capacity neededพื้นที่ที่ต้องมี16.125 TB
Noteสังเกต

The copy counts are one higher than the retention period suggests. A month of weekly fulls is five copies, not four, because the oldest copy is only deleted after the newest one finishes. The same logic makes a week of dailies eight copies, not seven.จำนวนสำเนามากกว่าที่คิดจากระยะเก็บอยู่หนึ่งชุด เก็บ full รายสัปดาห์หนึ่งเดือนได้ห้าสำเนา ไม่ใช่สี่ เพราะสำเนาเก่าสุดจะถูกลบหลังจากสำเนาใหม่ทำเสร็จแล้วเท่านั้น ด้วยเหตุผลเดียวกัน incremental รายวันเก็บหนึ่งสัปดาห์จึงเป็นแปดสำเนา ไม่ใช่เจ็ด

Sizing the bandwidthคำนวณแบนด์วิดท์

Bandwidth falls out of the window you were given: data volume divided by the hours you are allowed. Run it for the full and the incremental separately, because the two windows are usually different sizes.แบนด์วิดท์คำนวณจากเวลาที่เขาให้มา เอาปริมาณข้อมูลหารด้วยจำนวนชั่วโมงที่ทำได้ ต้องคิดแยกระหว่าง full กับ incremental เพราะสองช่วงเวลานี้มักไม่เท่ากัน

Backup typeประเภท Dataข้อมูล Windowเวลาที่มี Bandwidth neededแบนด์วิดท์ที่ต้องได้
FullFull10 TB12 hoursชั่วโมง242.72 MB/s
IncrementalIncremental0.2 TB1 hourชั่วโมง58.25 MB/s

An X8000 with two controllers tops out around 5 GB/s of system bandwidth and scales out to four controllers and 32 nodes in a cluster. Divide the required bandwidth by that figure and you have the number of appliances — before anyone talks about capacity.X8000 แบบสองคอนโทรลเลอร์ให้แบนด์วิดท์รวมประมาณ 5 GB/s และขยายได้ถึงสี่คอนโทรลเลอร์ 32 โหนดต่อคลัสเตอร์ เอาแบนด์วิดท์ที่ต้องการหารด้วยตัวเลขนี้ก็จะได้จำนวนเครื่อง ก่อนที่ใครจะเริ่มคุยเรื่องพื้นที่เสียอีก

For reference, the vendor's own lab figures for a fileset workload are 800 MB/s on full backup and 400 MB/s on full restore. Restore is the slower direction — worth saying out loud when someone quotes an RTO.ตัวเลขอ้างอิงจากแล็บของผู้ผลิตสำหรับงาน fileset คือ full backup ได้ 800 MB/s และกู้คืนเต็มได้ 400 MB/s ขากู้คืนช้ากว่าเสมอ ควรพูดให้ชัดตอนที่มีคนเสนอตัวเลข RTO

The host that runs the agentเครื่องที่ลงเอเจนต์

Itemรายการ Requirementที่ต้องมี
CPU≥ 4 core 2.1 GHz
Memoryหน่วยความจำ≥ 8 GB
Free disk — Linux / AIX / Solarisพื้นที่ว่าง — Linux / AIX / Solaris/opt ≥ 10 GB · /tmp ≥ 50 MB · /var/log ≥ 5 GB
Free disk — Windowsพื้นที่ว่าง — WindowsInstall drive (C: by default) ≥ 10 GBไดรฟ์ที่ติดตั้ง (ปกติคือ C:) ≥ 10 GB
Networkเครือข่ายA GE port with one IP for management, plus reachability to the backup network planeพอร์ต GE พร้อม IP หนึ่งเบอร์สำหรับจัดการ และต้องคุยกับเครือข่าย backup ได้

On the appliance side, reserve at least two IP addresses on the backup segment for a dual-controller appliance, or four where two appliances give you four controllers. If the backup network and the protected hosts sit on different segments, routes have to be configured — that is a firewall conversation, not a storage one.ฝั่งอุปกรณ์ ให้กัน IP ไว้อย่างน้อย สองเบอร์ บนเครือข่าย backup สำหรับเครื่องแบบสองคอนโทรลเลอร์ หรือ สี่เบอร์ ถ้าใช้สองเครื่องรวมเป็นสี่คอนโทรลเลอร์ ถ้าเครือข่าย backup กับเครื่องที่จะสำรองอยู่คนละวง ต้องตั้งเราต์ให้ด้วย ซึ่งเป็นเรื่องที่ต้องคุยกับทีมไฟร์วอลล์ ไม่ใช่ทีมสตอเรจ

What the agent will not pick upไฟล์ที่เอเจนต์จะไม่เก็บให้

A fileset holds at most 64 paths or files, and on Linux a backup path can be at most 2048 bytes long. Beyond that, a long list of things is skipped by design — worth checking against the customer's folder list before promising coverage.หนึ่ง fileset ใส่ได้ไม่เกิน 64 พาธหรือไฟล์ และบน Linux พาธหนึ่งยาวได้ไม่เกิน 2048 ไบต์ นอกจากนี้ยังมีของอีกยาวเหยียดที่ระบบตั้งใจข้าม ควรเอาไปเทียบกับรายการโฟลเดอร์ของลูกค้าก่อนรับปากว่าครอบคลุม

Linux / Unix

  • Socket filesไฟล์ socket
  • /dev, /proc, /run, /sys, /mnt/databackup
  • Memory file systems — tmpfs, devtmpfs, proc, sysfs, cgroup, debugfs and the restระบบไฟล์ในหน่วยความจำ เช่น tmpfs, devtmpfs, proc, sysfs, cgroup, debugfs และอื่นๆ
  • The snapshot mount path itself — /opt/lvm_snapshots, or /opt/jfs_snapshots on AIXพาธที่ใช้ mount snapshot เอง — /opt/lvm_snapshots หรือ /opt/jfs_snapshots บน AIX
  • Directories named .snapshot, ~snapshot, .snapshotsโฟลเดอร์ชื่อ .snapshot, ~snapshot, .snapshots

Windows

  • C:\Windows, C:\System Volume Information, C:\Recovery
  • $Recycle.Bin, $WinREAgent, Recycler
  • pagefile.sys, swapfile.sys, hiberfil.sys
  • C:\mnt\databackup and the VSS snapshot path C:\vss_snapshotsและพาธ snapshot ของ VSS คือ C:\vss_snapshots
Solaris

A file name can be at most 255 characters, and name plus path at most 998 — and since one character can be several bytes in Unicode, a Thai or Chinese path hits that limit sooner than it looks. The /devices directory, DOOR files and .zfs are skipped.ชื่อไฟล์ยาวได้ไม่เกิน 255 ตัวอักษร และชื่อรวมกับพาธไม่เกิน 998 ตัวอักษร และเพราะหนึ่งตัวอักษรอาจกินหลายไบต์ในระบบ Unicode พาธภาษาไทยหรือจีนจึงชนเพดานเร็วกว่าที่เห็น ส่วน /devices ไฟล์ DOOR และ .zfs ระบบจะข้ามไป

Consistency and the small-file trade-offเรื่องความสอดคล้องของข้อมูล และผลข้างเคียงของ small file aggregation

Any POSIX-compatible file system can be backed up. ACLs and extended attributes have been tested on ext3, ext4, XFS, Btrfs and JFS/JFS2; on Windows both file data and NTFS security descriptors are covered.ระบบไฟล์ที่เข้ากับ POSIX สำรองได้ทั้งหมด ส่วน ACL และ extended attribute ผ่านการทดสอบบน ext3, ext4, XFS, Btrfs และ JFS/JFS2 ฝั่ง Windows ครอบคลุมทั้งตัวข้อมูลและ security descriptor ของ NTFS

Consistent backup, by platformการสำรองแบบสอดคล้อง แยกตามแพลตฟอร์ม
Platformแพลตฟอร์ม Taken throughใช้กลไก
LinuxLVM — tested on ext3, ext4 and XFSLVM — ทดสอบแล้วบน ext3, ext4 และ XFS
WindowsVSS on NTFSVSS บน NTFS
AIXJFS2
SolarisZFS
Trade-offแลกกัน

Turning on small file aggregation helps with millions of tiny files, but it costs you two things: forever-incremental (synthetic full) backup no longer works, and those copies cannot be live mounted. Leave it off and live mount works — but without ACLs and extended attributes. Neither answer is free; pick the one that matches what the customer actually does with the copies.การเปิด small file aggregation ช่วยได้มากเวลามีไฟล์เล็กเป็นล้าน แต่แลกมาด้วยสองอย่าง คือใช้ forever incremental (synthetic full) ไม่ได้อีก และสำเนาพวกนั้น live mount ไม่ได้ ถ้าปิดไว้ live mount ได้ แต่จะไม่ได้ ACL และ extended attribute ติดมาด้วย ไม่มีทางเลือกไหนฟรี ให้ดูว่าลูกค้าเอาสำเนาไปทำอะไรจริงๆ แล้วเลือกตามนั้น

Restore rules worth knowing earlyกฎการกู้คืนที่ควรรู้ตั้งแต่ต้น

The rest of this seriesตอนอื่นในชุดนี้