Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)48k · #4036

block-storage

Was er macht

Dieses Tool hilft dir, den Speicherplatz auf Computern zu verwalten. Du kannst damit Festplatten und Partitionen hinzufügen, formatieren, organisieren und absichern, auch mit fortgeschrittenen Optionen wie LVM und RAID.

Wann du ihn nutzt

  • ✓Wenn du einem Server eine neue Festplatte hinzufügen musst.
  • ✓Um Speicherplatz mit LVM flexibel zu organisieren.
  • ✓Um Backups (Snapshots) deiner Daten zu erstellen.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/block-storage/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/block-storage/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie füge ich eine neue Festplatte hinzu und formatiere sie für die Nutzung?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Es führt Befehle auf dem System aus, um Partitionen und Dateisysteme (wie ext4 oder XFS) zu erstellen und logische Volumes (LVM) oder RAID-Verbünde zu verwalten. Außerdem kann es mit Cloud-Diensten zusammenarbeiten, um virtuelle Festplatten zu verwalten.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Block Storage

Manage block storage volumes including LVM, cloud-based EBS, filesystem creation, snapshots, and RAID configurations. Covers the full lifecycle from provisioning raw disks to extending volumes in production.

When to Use

  • Adding, partitioning, or formatting new disks on Linux servers
  • Managing LVM logical volumes for flexible storage allocation
  • Provisioning and attaching cloud block storage (AWS EBS)
  • Creating and restoring snapshots for backup or migration
  • Configuring software RAID for redundancy or performance
  • Extending existing volumes without downtime

Prerequisites

  • Root or sudo access on the target system
  • lvm2 package installed for LVM operations
  • mdadm package installed for software RAID
  • AWS CLI configured for EBS operations
  • Understanding of the workload's I/O characteristics (IOPS, throughput)

Disk Discovery and Partitioning

# List all block devices
lsblk
lsblk -f    # Show filesystem types and mount points

# Show detailed disk information
fdisk -l /dev/sdb

# Identify disk model and health (requires smartmontools)
smartctl -a /dev/sda
smartctl -H /dev/sda    # Quick health check

# Create a GPT partition table and a single partition
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary ext4 0% 100%

# Alternative: use fdisk for MBR partitioning
fdisk /dev/sdb
# n -> new partition, p -> primary, Enter defaults, w -> write

# Inform the kernel of partition table changes
partprobe /dev/sdb

# Wipe filesystem signatures (prepare for LVM or RAID)
wipefs -a /dev/sdb1

Filesystem Creation and Management

# Create an ext4 filesystem
mkfs.ext4 /dev/sdb1

# Create an ext4 filesystem with label and reserved block tuning
mkfs.ext4 -L appdata -m 1 /dev/sdb1    # 1% reserved blocks (default is 5%)

# Create an XFS filesystem (recommended for large volumes)
mkfs.xfs /dev/sdb1

# Create an XFS filesystem with label
mkfs.xfs -L appdata /dev/sdb1

# Mount the filesystem
mkdir -p /data
mount /dev/sdb1 /data

# Add persistent mount to fstab (use UUID for reliability)
blkid /dev/sdb1    # Get the UUID
echo 'UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  /data  ext4  defaults,noatime  0  2' >> /etc/fstab

# Mount all entries in fstab
mount -a

# Check and repair a filesystem (unmount first)
umount /data
fsck.ext4 -y /dev/sdb1
xfs_repair /dev/sdb1    # For XFS

# Resize ext4 (can grow online while mounted)
resize2fs /dev/sdb1

# Resize XFS (must be mounted to grow)
xfs_growfs /data

# Check filesystem usage
df -hT

LVM Management

Creating an LVM Stack

# Step 1: Create physical volumes
pvcreate /dev/sdb /dev/sdc

# View physical volumes
pvs
pvdisplay /dev/sdb

# Step 2: Create a volume group from physical volumes
vgcreate data_vg /dev/sdb /dev/sdc

# View volume groups
vgs
vgdisplay data_vg

# Step 3: Create logical volumes
# Fixed size
lvcreate -L 100G -n app_lv data_vg

# Use percentage of free space
lvcreate -l 50%FREE -n logs_lv data_vg

# Use all remaining space
lvcreate -l 100%FREE -n backup_lv data_vg

# View logical volumes
lvs
lvdisplay /dev/data_vg/app_lv

# Step 4: Create filesystem and mount
mkfs.ext4 /dev/data_vg/app_lv
mkdir -p /data/app
mount /dev/data_vg/app_lv /data/app

# Add to fstab
echo '/dev/data_vg/app_lv  /data/app  ext4  defaults,noatime  0  2' >> /etc/fstab

Extending Volumes (Online)

# Extend a logical volume by 20 GB
lvextend -L +20G /dev/data_vg/app_lv

# Extend to fill all free space in the VG
lvextend -l +100%FREE /dev/data_vg/app_lv

# Grow the ext4 filesystem (online, no unmount needed)
resize2fs /dev/data_vg/app_lv

# Grow XFS filesystem (online)
xfs_growfs /data/app

# Combined: extend LV and resize filesystem in one command
lvextend -L +20G --resizefs /dev/data_vg/app_lv

Adding a New Disk to an Existing VG

# Add a new physical volume
pvcreate /dev/sdd

# Extend the volume group
vgextend data_vg /dev/sdd

# Now extend any logical volume using the new space
lvextend -l +100%FREE --resizefs /dev/data_vg/app_lv

LVM Snapshots

# Create a snapshot (requires free space in VG)
lvcreate -L 10G -s -n app_snap /dev/data_vg/app_lv

# Mount the snapshot read-only for backup
mkdir -p /mnt/snapshot
mount -o ro /dev/data_vg/app_snap /mnt/snapshot

# Perform backup from the snapshot
tar czf /backup/app-$(date +%Y%m%d).tar.gz -C /mnt/snapshot .

# Unmount and remove the snapshot when done
umount /mnt/snapshot
lvremove -f /dev/data_vg/app_snap


…
Häufige Fragen

Was ist LVM?

LVM (Logical Volume Manager) ist eine flexible Methode, Festplatten zu verwalten. Damit kannst du mehrere physische Festplatten zu einem großen logischen Volume zusammenfassen, was das Vergrößern und Organisieren des Speichers erleichtert.

Was sind Snapshots?

Snapshots sind wie „Fotos“ deiner Festplatte zu einem bestimmten Zeitpunkt. Damit kannst du einen Wiederherstellungspunkt anlegen, zu dem du zurückkehren kannst, wenn etwas schiefgeht, oder sichere Backups erstellen.

Muss ich ein Experte sein, um das zu nutzen?

Das Tool vereinfacht viele Aufgaben, doch grundlegendes Wissen darüber, wie Festplatten an einem Computer funktionieren, ist hilfreich. Es liefert die Befehle, du musst aber wissen, welche Aufgabe du erledigen willst.

Details

Originalbeschreibung des Autors

Manage block storage volumes and LVM. Configure cloud block storage and local disks. Use when managing disk storage.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#4036
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills