Connect a USB Drive to Your Cloud

Connect a USB Drive to Your Cloud


USB passthrough is a technology enabling a USB device connected to a physical machine to be shared on a virtual machine hosted on it's cloud system. This capability is especially useful in scenarios like data backups and transferring large files between virtual machines.

In environments built on Proxmox, you can connect a USB drive directly to the Proxmox hardware and share it with a virtual container (CT).

Steps to connect and share an USB drive in Proxmox

Prepare the USB Drive

Attach the USB drive to your Proxmox server and prepare it using standard Linux commands:

$ lsblk 
$ fdisk /dev/sdb # choose 'n' for new partition, then follow default prompts, and 'w' to write changes
$ mkfs.ext4 /dev/sdb1 # format the new partition        


Mount the USB Drive on Proxmox Node

Create a directory to mount the USB drive and then mount it:

$ mkdir /mnt/usb
$ mount /dev/sdb1 /mnt/usb        


Share the Drive with a Container

Share the mounted USB drive with your container. First, identify a free mount point in your container's resource panel. Then, share the drive:

pct set 101 -mp1 /mnt/usb,mp=/shared_usb        
CT's mount points


After setting up the mount point, restart your container. You'll then have access to the USB drive from the /shared_usb directory within the container.

Caveats

- Remounting After Container Restart: Each time the container restarts, you'll need to remount the USB drive on the Proxmox node.

- Snapshots Limitation: Connecting the USB drive to your container disables the possibility of taking snapshots.

For more detailed information, refer to Proxmox's official documentation on (Linux Container Bind Mount Points).

This article was published on lukaszherok.com.

要查看或添加评论,请登录

?ukasz Herok的更多文章

  • Prosty sposób na elektroniczny Rejestr Umów

    Prosty sposób na elektroniczny Rejestr Umów

    Kiedy kończy si? ta umowa? Jakie by?y ustalenia? Czy to jest aktualna wersja dokumentu? Czy te pytania, co jaki? czas…

  • Linux Email Notifications for Cron Jobs and Bash Scripts

    Linux Email Notifications for Cron Jobs and Bash Scripts

    In a Linux environment, managing email notifications for tasks like cron jobs and setting up email services can often…

  • Po lekturze Jak oswoi? Agile?

    Po lekturze Jak oswoi? Agile?

    Jestem w?a?nie ?wie?o po lekturze "Jak oswoi? Agile". Pierwsze wdro?enia Scruma w Polsce maj? ju? ponad dekad?.

    1 条评论

社区洞察

其他会员也浏览了