Menyambungkan USB Drive ke Proxmox

Menyambungkan USB Drive ke Proxmox
Photo by Shubham Dhage / Unsplash

Dear Pembaca Setia,

Kali ini Penulis hendak mencatat (dan berbagi) pengalaman Penulis dalam menghubungkan USB Drive ke Proxmox. Sehingga USB Drive tersebut dapat dipakai sebagai storage tambahan untuk keperluan backup, menyimpan file ISO, ataupun fungsi lain. Informasi ini Penulis dapatkan dari trial & error, mencari dari berbagai sumber di google, dan dari youtube (link tercantum di bawah). Berikut rangkumannya

How to Attach

  • Source
  • Format drive in general linux
  • Connect drive to proxmox pc
  • In proxmox shell
    • run
      • lsblk -f
        • (to get the UUID)
        • abcdef01-2345-6789-abcd-ef0123456789
      • mkdir /mnt/pve/eap
        • create mount point from connected usb
      • nano /etc/fstab
    • copy-paste
      • /dev/disk/by-uuid/abcdef01-2345-6789-abcd-ef0123456789 /mnt/pve/eap ext4 defaults 0 0
    • shortcut
      • Ctrl+O
        • Save
      • Ctrl+X
        • Exit
    • run
      • mount -a
      • systemctl daemon-reload
  • In proxmox UI
    • DataCenter > Storage
      • Add Directory
      • ID: my-folder-name
      • Directory: /mnt/pve/my-folder-name
      • Content: VZDump backup file
    • So we can have a UI for summary
  • In proxmox shell
    • rsync -rva /mnt/pve/msata/dump /mnt/pve/eap/msata/dump

How to Remove

Crontab

  • Create new sh file
    • nano rsync-run.sh
  • Writeimage
    • rsync -rva /mnt/pve/msata/dump /mnt/pve/eap/msata 2>&1 | sed 'h; s/.*/date "+%Y-%m-%d %H:%M:%S"/e; G; s/\n/ [rsync -rva]: /' >> /root/eap/log/log.log &
    • So we can run rsync command with timestamp
  • add permission
    • chmod +x /root/eap/rsync-run.sh
  • run
    • crontab -e
  • Write
    • 0 2 * * * /root/eap/rsync-run.sh
    • To run every 02:00

Demikian tutorial kali ini, selamat berkarya.

Salam Virtualisasi Open Source!