"use client" import React, { useState } from "react" import Link from "next/link" import { HardDrive, ArrowLeft, Copy, Check, Terminal } from "lucide-react" import { Button } from "@/components/ui/button" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" export default function StorageCommandsPage() { const [viewMode, setViewMode] = useState<"table" | "accordion">("table") // Group commands by category for better organization const commandGroups = [ { title: "Disk Information", commands: [ { command: "lsblk", description: "List block devices and partitions" }, { command: "fdisk -l", description: "List disks with detailed info" }, { command: "blkid", description: "Show UUID and filesystem type of block devices" }, { command: "ls -lh /dev/disk/by-id/", description: "List disk persistent identifiers" }, { command: "parted -l", description: "Detailed partition layout with GPT info" }, ], }, { title: "Storage Usage", commands: [ { command: "df -h", description: "Show disk usage by mount point" }, { command: "du -sh /path", description: "Show size of a directory" }, { command: "mount | grep ^/dev", description: "Show mounted storage devices" }, { command: "cat /proc/mounts", description: "Show all active mounts from the kernel" }, ], }, { title: "LVM Management", commands: [ { command: "pvdisplay", description: "Display physical volumes (LVM)" }, { command: "vgdisplay", description: "Display volume groups (LVM)" }, { command: "lvdisplay", description: "Display logical volumes (LVM)" }, { command: "pvs", description: "Concise output of physical volumes" }, { command: "vgs", description: "Concise output of volume groups" }, { command: "lvs", description: "Concise output of logical volumes" }, ], }, { title: "Proxmox Storage", commands: [ { command: "cat /etc/pve/storage.cfg", description: "Show Proxmox storage configuration" }, { command: "pvesm status", description: "Show status of all storage pools" }, { command: "pvesm list", description: "List all available storage" }, { command: "pvesm list ", description: "List content of specific storage" }, { command: "pvesm scan ", description: "Scan storage for new content" }, ], }, ] return (
Back to Help and Info

Storage and Disks Commands

This section provides commands for managing and monitoring storage devices and disk partitions in Proxmox VE. Learn how to list disks, check storage usage, manage LVM volumes, and configure Proxmox storage.

{viewMode === "table" ? (
{commandGroups.map((group, index) => (

{group.title}

Command Description Action {group.commands.map((cmd, cmdIndex) => ( {cmd.command} {cmd.description} ))}
))}
) : (
{commandGroups.map((group, index) => (

{group.title}

{group.commands.map((cmd, cmdIndex) => (
{cmd.command}
{cmd.command}

{cmd.description}

))}
))}
)}

Usage Tips

  • Use lsblk for a quick overview of all block devices
  • For detailed partition information,{" "} fdisk -l provides comprehensive output
  • Replace <storage> with your storage name when using pvesm commands
  • LVM commands (pvs, vgs, lvs) provide more concise output than their display counterparts (pvdisplay, vgdisplay, lvdisplay)
  • When using du -sh /path, replace{" "} /path with the directory you want to check
) } interface CopyButtonProps { text: string } function CopyButton({ text }: CopyButtonProps) { const [copied, setCopied] = React.useState(false) const copyToClipboard = () => { navigator.clipboard.writeText(text) setCopied(true) setTimeout(() => setCopied(false), 2000) } return ( ) }