{"id":24,"date":"2025-05-16T20:12:15","date_gmt":"2025-05-16T20:12:15","guid":{"rendered":"https:\/\/thenetworkhero.org\/?p=24"},"modified":"2025-05-20T20:11:28","modified_gmt":"2025-05-20T20:11:28","slug":"%f0%9f%9a%80-how-to-add-usb-hard-drives-as-data-stores-in-proxmox-backup-server-pbs","status":"publish","type":"post","link":"https:\/\/thenetworkhero.org\/?p=24","title":{"rendered":"\ud83d\ude80 How to Add USB Hard Drives as Data Stores in Proxmox Backup Server (PBS)"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p>Welcome, fellow homelab wizard! Let&#8217;s break down the (slightly extra) process of adding USB hard drives to a virtual machine running Proxmox Backup Server (PBS). Spoiler alert: it&#8217;s a bit more work than if you just slapped a drive into a physical box, but we\u2019ve got this..<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd27 Overview<\/h2>\n\n\n\n<p>When you&#8217;re running PBS inside a Proxmox VE virtual machine and want to add USB drives as data stores, you need to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Attach the drives to the VM.<\/li>\n\n\n\n<li>Format and mount them manually in the shell.<\/li>\n\n\n\n<li>Add them as data stores via the PBS GUI.<\/li>\n\n\n\n<li>Make the mounts permanent using <code>\/etc\/fstab<\/code>.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udee0 Step-by-Step Instructions (with Example Commands)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Create Your PBS Virtual Machine<\/h3>\n\n\n\n<p>Create a virtual machine and install Proxmox Backup Server. This is your backup brain in a box.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Attach the USB Drives<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On your Proxmox VE host, go to your PBS VM settings.<\/li>\n\n\n\n<li>Click <strong>Hardware &gt; Add &gt; USB Device<\/strong>.<\/li>\n\n\n\n<li>Select the USB hard drive from the list and click <strong>Add<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Boot the PBS VM and Open the Shell<\/h3>\n\n\n\n<p>From the Proxmox GUI:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on your PBS VM.<\/li>\n\n\n\n<li>Go to <strong>Console<\/strong> or <strong>Shell<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. Identify the Drives<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk\n<\/code><\/pre>\n\n\n\n<p>Look for drives like <code>\/dev\/sdb<\/code>, <code>\/dev\/sdc<\/code>, etc. These are likely your USB drives.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Partition the Drives<\/h3>\n\n\n\n<p>Use <code>fdisk<\/code> or <code>parted<\/code> to partition each drive as GPT.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo fdisk \/dev\/sdb\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Press <code>g<\/code> to create a new GPT table.<\/li>\n\n\n\n<li>Press <code>n<\/code> to create a new partition.<\/li>\n\n\n\n<li>Write with <code>w<\/code> to save.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6. Format the Drives<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkfs.ext4 \/dev\/sdb1\n<\/code><\/pre>\n\n\n\n<p>Repeat for each drive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. Create Mount Points<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/mnt\/usb1\nsudo mkdir -p \/mnt\/usb2\n<\/code><\/pre>\n\n\n\n<p>Each drive needs its own folder.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8. Mount the Drives<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mount \/dev\/sdb1 \/mnt\/usb1\n<\/code><\/pre>\n\n\n\n<p>Repeat for each drive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">9. Confirm They\u2019re Mounted<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk\n<\/code><\/pre>\n\n\n\n<p>You should see your devices mounted to the paths you created.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udce6 Add the Data Stores via PBS GUI<\/h2>\n\n\n\n<p>Now let\u2019s make PBS actually <em>use<\/em> these drives:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the PBS web interface.<\/li>\n\n\n\n<li>Click on <strong>Datastore &gt; Add<\/strong>.<\/li>\n\n\n\n<li>Enter:\n<ul class=\"wp-block-list\">\n<li><strong>Name<\/strong> (e.g., <code>USB-Backup1<\/code>)<\/li>\n\n\n\n<li><strong>Path<\/strong> (e.g., <code>\/mnt\/usb1<\/code>)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Add<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>Congrats! PBS now sees the drive.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcbe Make Mounts Persistent with <code>\/etc\/fstab<\/code><\/h2>\n\n\n\n<p>Because Linux is forgetful after reboots.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Get the UUID of Each Drive<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo blkid\n<\/code><\/pre>\n\n\n\n<p>Copy the UUIDs and note which one is which.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Edit <code>\/etc\/fstab<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/fstab\n<\/code><\/pre>\n\n\n\n<p>Add lines like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \/mnt\/usb1 ext4 defaults 0 2\n<\/code><\/pre>\n\n\n\n<p>Do this for each drive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Test the Config<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mount -a\n<\/code><\/pre>\n\n\n\n<p>If no errors appear, you\u2019re golden. Reboot and verify with <code>lsblk<\/code> or <code>df -h<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddd9\u200d\u2642\ufe0f Bonus Tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Take a VM snapshot<\/strong> before making these changes. Always good to have a time machine.<\/li>\n\n\n\n<li><strong>Update your PBS system<\/strong> first with:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If things break after reboot: check your <code>\/etc\/fstab<\/code> syntax or UUIDs.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udfc1 Summary<\/h2>\n\n\n\n<p>Adding USB drives to a PBS VM takes some manual magic, but once it\u2019s set up, you\u2019ve got flexible, external backup storage running in style.<\/p>\n\n\n\n<p>So go ahead, mount up, back up, and sleep easy knowing your data has a solid home\u2014even if it\u2019s via a USB cable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome, fellow homelab wizard! Let&#8217;s break down the (slightly extra) process of adding USB hard drives to a virtual machine running Proxmox Backup Server (PBS). Spoiler alert: it&#8217;s a bit more work than if you just slapped a drive into a physical box, but we\u2019ve got this.. \ud83d\udd27 Overview When you&#8217;re running PBS inside a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":26,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[1],"tags":[6],"class_list":["post-24","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-edu"],"_links":{"self":[{"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":2,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions\/27"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=\/wp\/v2\/media\/26"}],"wp:attachment":[{"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thenetworkhero.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}