{"id":6779,"date":"2026-06-21T16:21:10","date_gmt":"2026-06-21T08:21:10","guid":{"rendered":"https:\/\/www.alfredivy.sg\/blogger\/?p=6779"},"modified":"2026-06-22T14:04:55","modified_gmt":"2026-06-22T06:04:55","slug":"adding-more-storage-to-immich-server","status":"publish","type":"post","link":"https:\/\/www.alfredivy.sg\/blogger\/2026\/06\/adding-more-storage-to-immich-server\/","title":{"rendered":"Adding more storage to Immich server"},"content":{"rendered":"\n<p class=\"has-drop-cap wp-block-paragraph\">In my previous <a href=\"https:\/\/www.alfredivy.sg\/blogger\/2026\/06\/new-immich-server\/\">post<\/a>, I mentioned the Immich server internal disk&#8217;s space is filling up faster than expected. I have decided to add a USB drive, an old 1TB WD My Passport, to hold the photos and the arr stack media.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">The Debian server is a VM running Docker is on proxmox. In Linux, all SATA and SCSI drive are sdx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>All (S)ATA and SCSI disks are called&nbsp;\/dev\/sda,&nbsp;\/dev\/sdb &nbsp;and so on.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">IDE are named as hdx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \/dev\/hda is IDE primary main (equivalent to c: in Windows)\n \/dev\/hdb is IDE primary subordinate (equivalent to d: and so on)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I thought the plugged in USB drive is sda2, when it is actually a partition within the main 80GB drive. Duh!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">alfred@docker-server:~$ lsblk<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>sda 8:0 0 80G 0 disk<br>sda1 8:1 0 75.9G 0 part \/<br>sda2 8:2 0 1K 0 part<br>sr0 11:0 1 3.7G 0 rom<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The USB drive did not show at in the Debian server as it needs to be passed through by proxmox.  SSH to the hypervisor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsusb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Search for the USB drive.  Mine was <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1058:259f Western Digital My Passport Ultra<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pass it through<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>qm set 100 -usb0 host=1058:259f\nqm config 100<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inside the VM, the USB drive should be visible as \/dev\/sdb1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS \nsda 8:0 0 80G 0 disk \n\u251c\u2500sda1 8:1 0 75.9G 0 part \/ \n\u2514\u2500sda2 8:2 0 1K 0 part \nsdb 8:16 0 931.5G 0 disk \n\u2514\u2500sdb1 8:17 0 931.5G 0 part \nsr0 11:0 1 3.7G 0 rom<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Unmount the drive, format as ext4, mount the drive and change the owner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo umount \/dev\/sdb1<br>sudo wipefs -a \/dev\/sdb1<br>sudo mkfs.ext4 \/dev\/sdb1 -L MyPassport<br>sudo mkdir -p \/mnt\/passport<br>sudo mount \/dev\/sdb1 \/mnt\/passport<br>sudo chown -R alfred:alfred \/mnt\/passport<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure the disk is mounted on restart, check for the disk UUID<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo blkid \/dev\/sdb1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure this survives a restart, in fstab add the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UUID=xxxx-xxxx \/mnt\/passport ext4 defaults,nofail 0 2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The storage is now ready for use!  Copy the existing Immich library to the new storage using rsync<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -avh --progress \/mnt\/immich-library\/ \/mnt\/passport\/immich-library\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Shutdown Immich servers to use the new storage via Docker Compose.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose down<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change Immich upload directory from <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- \/mnt\/immich-library:\/usr\/src\/app\/upload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>- \/mnt\/passport\/media\/immich:\/usr\/src\/app\/upload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Start up Immich and verify<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d\ndocker logs -f immich-server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my previous post, I mentioned the Immich server internal disk&#8217;s space is filling up faster than expected. I have decided to add a USB drive, an old 1TB WD My Passport, to hold the photos and the arr stack&hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[125,632,406],"class_list":["post-6779","post","type-post","status-publish","format-standard","hentry","category-servers","tag-linux","tag-proxmox","tag-usb"],"_links":{"self":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/comments?post=6779"}],"version-history":[{"count":9,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6779\/revisions"}],"predecessor-version":[{"id":6798,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6779\/revisions\/6798"}],"wp:attachment":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/media?parent=6779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/categories?post=6779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/tags?post=6779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}