#Moving file path to aux drive

1 messages · Page 1 of 1 (latest)

mild basinBOT
#

:wave: Hey @lone phoenix,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

mild basinBOT
rough rose
#

still wiping the drive I take it?

lone phoenix
#

yup. It's going to take a minute with the spinny drive. lol

#

void@void:~$ sudo dd if=/dev/zero of=/dev/sdb bs=10M status=progress

#

that should help it move quickly. And I can see how long

#

im wiping my nvme drive too. it looks like it will get done significantly faster. So I'll use that one for now. And once I prove it works, I'll do it with the HDD later.

rough rose
#

oh snap you had me going there for a second

#

you willingly did the nvme drive hhaha

#

sorry had me freaking out

lone phoenix
#

lol. yes.

#

So when I had all the stuff setup with fedora server, it was through cockpit. well none of that ended up working.. So I just need to wipe the drives and start fresh with all of them. I already wiped the boot drive when I installed ubuntu.

#

135gb done on the HDD. 550 done on the NVME.. lol

#

ok. NVME is done @rough rose

rough rose
#

ok

#

now do this instead and follow the guide in the terminal

#

fdisk /dev/whatever device we are editing

lone phoenix
#

primary or extended partition?

rough rose
#

primary

#

once done youll want to write the changes

lone phoenix
#

I think something mess up. It just froze up. and now it won't mount.

#

lol

#
mount: /home/void/auxdrive: /dev/nvme0n1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
void@void:~$
rough rose
#

so let me get this right

#

youre trying to wipe your nvme drive

#

the same nvme drive that currently has ubuntu on it right now?

lone phoenix
#

yes. I already did. then I used fdisk to write a new ext4 partition

rough rose
#

the very OS you are running the commands from

#

lol

#

youre done

#

you need to reinstall now

lone phoenix
#

lol. No.

#

I have 3 drives in this machine.. lol

rough rose
#
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====
Authentication is required to reload the systemd state.
Authenticating as: void
Password:
==== AUTHENTICATION COMPLETE ====
void@void:~$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda       8:0    0 119.2G  0 disk
├─sda1    8:1    0     1G  0 part /boot/efi
└─sda2    8:2    0 118.2G  0 part /
sdb       8:16   0   3.6T  0 disk /home/void/auxdrive
└─sdb1    8:17   0     2T  0 part
sr0      11:0    1  1024M  0 rom
nvme0n1 259:0    0 931.5G  0 disk
void@void:~$```
#

thats what you showed me earlier

lone phoenix
#

a 128gb NVME for boot, a 1TB NVME just because, and a 4TB HDD for mass storage.

#

BUT. the 128nvme is on a PCIE adapter so it shows up as a SSD

rough rose
#

oh so sda?

lone phoenix
#

ya.

#

Boot drive is SDA. I haven't touched that one.

rough rose
#

the only other drive in this list beond sdb is nvme0n1

lone phoenix
#

it has SDA, SDB, and nvme0n1

rough rose
#

right so you wiped nvme0n1

lone phoenix
#

yes. and SDB.

rough rose
#

sdb is your external drive the 4tb external drive

#

thats a nvme drive?

lone phoenix
#

no.

rough rose
#

im so very confused now

lone phoenix
#

lol. They are all internal. No external drives. They're just sitting in the case.

#

I decided to try to do it with nvme just now because it would wipe faster.

rough rose
#

so when you did fdisk on your "nvme" drive did it look something like this sudo fdisk /dev/nvme0n1

lone phoenix
#

we were originally working with the 4tb SDB. but just now, while the DD was going on it, I decided to substitute SDB for NVME.

#

yes.

rough rose
#

and it froze after that?

lone phoenix
#

sudo fdisk /dev/nvme0n1

#

yes. It froze after that.

#

but it still shows up with lsblk

rough rose
#

and if you do fdisk on it again?

lone phoenix
#

Welcome to fdisk (util-linux 2.39.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Command (m for help): n

All space for primary partitions is in use.

Command (m for help):```
rough rose
#

do m

lone phoenix
#

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty MBR (DOS) partition table
   s   create a new empty Sun partition table


Command (m for help):```
rough rose
#

d

lone phoenix
#

Selected partition 1
Partition 1 has been deleted.

Command (m for help):```
rough rose
#

m

#

n

#

im telling you to do m each time just to build a habit in you

lone phoenix
#

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty MBR (DOS) partition table
   s   create a new empty Sun partition table


Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1953525167, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1953525167, default 1953525167):

Created a new partition 1 of type 'Linux' and of size 931.5 GiB.

Command (m for help):```
#

w right?

rough rose
#

yeeeeessssss

#

so far victory

#

and yes w

lone phoenix
#
The partition table has been altered.
Syncing disks.

rough rose
#

lsblk

lone phoenix
#

not sure if I just need to wait..

rough rose
#

lsblk --fs

lone phoenix
#

its just sitting there. I can't run any commands yet.

rough rose
#

press enter a couple of times

#

otherwise you may have to wait a few

lone phoenix
#

thats what I meant by froze.

rough rose
#

youre playing with a 1tb drive where my drive is a little usb thumb drive like 128gb

lone phoenix
#

I assume its just building the part. but it build the 2tb part on the HDD instantly.

#

but maybe not since it already had a part on it.

#

I'm going to step away for a minute and just let it do its thing. it could be going slow because its still wiping the HDD.

#

still nothing

#
NAME    FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1  vfat   FAT32       4E61-BC76                                 1G     1% /boot/efi
└─sda2  ext4   1.0         692bb464-a2d2-4429-aeed-38c8218ab091   94.5G    13% /
sdb
sr0
nvme0n1
void@void:~$```
#

from another terminal

rough rose
#

ok I may or may not be awake when you get back but I wanted to recap what you do with a new drive when you install it in your system. 1. wipe it using sudo disk /dev/sdx 2. then press d 3. n to create a new partition table 4. p for primary 5. 1 6. enter 7. enter 8. w

#

once done you should do lsblk to list out your drives

#

in my case I modified sda

#

this is what it looks like after NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 1 119.2G 0 disk └─sda1 8:1 1 119.2G 0 part nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 300M 0 part /boot/efi ├─nvme0n1p2 259:2 0 32G 0 part [SWAP] ├─nvme0n1p3 259:3 0 100G 0 part / └─nvme0n1p4 259:4 0 344.6G 0 part /home

#

so now that we have our partition table we will need to create a file system on it and in most cases related to linux youll use ext4

#

so the next thing you would do is sudo mkfs.ext4 /dev/sdaX

#

so in my case it would be mkfs.ext4 /dev/sda1

#

and now it looks like this ```NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1
ext4 1.0 95bb311b-176a-4861-9e35-ae3f1b2b06e1
nvme0n1

├─nvme0n1p1
│ vfat FAT32 2580-3D0E 293.2M 2% /boot/efi
├─nvme0n1p2
│ swap 1 05f7164d-663d-487a-97b8-7e70a3ec7494 [SWAP]
├─nvme0n1p3
│ ext4 1.0 57869970-b325-4971-99a8-a75dc938988a 71.9G 21% /
└─nvme0n1p4
ext4 1.0 7846831b-740f-4327-a03b-d8719af94f7b 220G 30% /home

#

from there I would do sudo umount /dev/sda1 /path/where/i/wanted/it/mounted

#

there edited it so its correct now

#

ok and now that its mounted

#
sda           8:0    1 119.2G  0 disk 
└─sda1        8:1    1 119.2G  0 part /mnt/thumbdrive
nvme0n1     259:0    0 476.9G  0 disk 
├─nvme0n1p1 259:1    0   300M  0 part /boot/efi
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
├─nvme0n1p3 259:3    0   100G  0 part /
└─nvme0n1p4 259:4    0 344.6G  0 part /home```
#

so now its mounted in /mnt/thumbdrive

#

and then lastly edit your fstab

lone phoenix
#

Awesome. Thank you. I'm going to just go to sleep and let it do its thing. Hopefully I can get it situated tomorrow.

rough rose
#

sounds good. you could prob stop the dd command

#

and do the same fdisk path on your 4tb drive

lone phoenix
#

Thats where I'm att right now. lol

rough rose
#

yeah sorry I dont run through the commands very often as the gui tools are very simple to use

#

my linux server is also my gaming rig and everything lol

lone phoenix
#

oh, they 100% are....

rough rose
#

so the dd command I completely forogt

lone phoenix
#

I thought about just running my immich server through a VM on my main machine.. lol

rough rose
#

its writing 0s across your drive platters

#

this is a very wright intensive process and will take a long time

#

where as if you just run fdisk it writes 0's across the headers instead

#

shorter since the data that was there will still be there but will be over written over time

#

anyways its been fun but like you I need to call it a day

lone phoenix
#
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
│    vfat   FAT32       4E61-BC76                                 1G     1% /boot/efi
└─sda2
     ext4   1.0         692bb464-a2d2-4429-aeed-38c8218ab091   89.9G    17% /
sdb
└─sdb1

sr0
nvme0n1

└─nvme0n1p1
#

lol.

rough rose
#

well the nvme partition is there finally

#

I assume you stopped the dd and went through fstab again

#

sorry not fstab

#

fdisk

lone phoenix
#
sda
├─sda1
│    vfat   FAT32       4E61-BC76                                 1G     1% /boot/efi
└─sda2
     ext4   1.0         692bb464-a2d2-4429-aeed-38c8218ab091   89.3G    18% /
sdb
└─sdb1
     ext4   1.0         e3daafac-d576-454d-b50b-397a2bba0672
sr0
nvme0n1

└─nvme0n1p1
     ext4   1.0         85861fb3-2e68-4921-837c-29c6572ab1f9
void@void:~$```
rough rose
#

there we fucking go

#

now mount that shit

lone phoenix
#

yup. And I made both ext4

#
sda
├─sda1
│    vfat   FAT32       4E61-BC76                                 1G     1% /boot/efi
└─sda2
     ext4   1.0         692bb464-a2d2-4429-aeed-38c8218ab091   89.3G    18% /
sdb
└─sdb1
     ext4   1.0         e3daafac-d576-454d-b50b-397a2bba0672    1.9T     0% /home/void/auxdrive
sr0
nvme0n1

└─nvme0n1p1
     ext4   1.0         85861fb3-2e68-4921-837c-29c6572ab1f9
void@void:~$```
#

Still only let me use 2tb. but yolo

rough rose
#

damn it

#

there must be something else going on here im ust not aware of

lone phoenix
#

ok. Now what do I put in fstab.

#
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/692bb464-a2d2-4429-aeed-38c8218ab091 / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/4E61-BC76 /boot/efi vfat defaults 0 1
/swap.img       none    swap    sw      0       0
/dev/sdb1 /home/void/auxdrive   ext4    defaults        0       0





rough rose
#

the first line is good

#

but before that are you just going to mount the 2tb drive or are you going to mount the nvme as well?

lone phoenix
#

just the 2tb for now.

#

dont want to get too complicated.

rough rose
#

I would consider doing both and playing around with the custom folder options for immich

lone phoenix
#

how much more difficult is that?

rough rose
#

so you can put your thumbs, encoded videos, and your db on the nvme drive

lone phoenix
#

I'm fine with it auto mounting.

rough rose
#

youll get way way way more performance

#

and you can put your library aka the upload folder on the 2tb

#

ok so before we add the nvme to your fstab you need to make a folder where you want it mounted to

lone phoenix
#

ok. I'll do that then. I can tweek those setting now. I just want it to auto mount both for now and I'll point my uploads at the 2tb for now.

rough rose
#

so something like /home/void/nvmedrive

#

mkdir /home/void/nvmedrive

lone phoenix
#
sda
├─sda1
│    vfat   FAT32       4E61-BC76                                 1G     1% /boot/efi
└─sda2
     ext4   1.0         692bb464-a2d2-4429-aeed-38c8218ab091   89.3G    18% /
sdb
└─sdb1
     ext4   1.0         e3daafac-d576-454d-b50b-397a2bba0672    1.9T     0% /home/void/auxdrive
sr0
nvme0n1

└─nvme0n1p1
     ext4   1.0         85861fb3-2e68-4921-837c-29c6572ab1f9  869.2G     0% /home/void/nvmedrive
void@void:~$```
#

There we go.

rough rose
#

and in fstab add /dev/nvme0n1p1 /home/void/nvmedrive ext4 defaults 0 0

lone phoenix
#

I know I'm keeping you up.. lol. I appreciate it.

rough rose
#

see in fstab its the device id at the beginning and then the path where you want it mounted

#

you also defined the file system in the fstab which in this case is ext4

lone phoenix
#
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/692bb464-a2d2-4429-aeed-38c8218ab091 / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/4E61-BC76 /boot/efi vfat defaults 0 1
/swap.img       none    swap    sw      0       0
/dev/sdb1 /home/void/auxdrive   ext4    defaults        0       0
/dev/nvme0n1p1 /home/void/nvmedrive   ext4    defaults        0       0
#

So like this?

rough rose
#

yup that looks good

#

if you reboot it shold auto mount on the next boot

lone phoenix
#

lol. I feel you. its good when you enjoy work. lol

rough rose
#

you can double check with lsblk

#

and you should see the folder mount path on the right

lone phoenix
#

ok. so modded fstab saved..

#

going to reboot.

#

It's funny that you hate windows.. lol. Becuase I just realized i've been SSHd in this whole time through powershell.. Because I was playing COD when I started this....

rough rose
#

I do tend to live in the terminal / ssh

#

just dont use it much to modify drives

lone phoenix
#
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 119.2G  0 disk
├─sda1        8:1    0     1G  0 part /boot/efi
└─sda2        8:2    0 118.2G  0 part /
sdb           8:16   0   3.6T  0 disk
└─sdb1        8:17   0     2T  0 part /home/void/auxdrive
sr0          11:0    1  1024M  0 rom
nvme0n1     259:0    0 931.5G  0 disk
└─nvme0n1p1 259:1    0 931.5G  0 part /home/void/nvmedrive
void@void:~$


#

woohoo

rough rose
#

mount points sure but in my case I use zfs

#

god damn thats sexy

#

ok

#

you got one more thing you need to do with the file system

#

you need to own it as likely root currently is the ower of those drives

#

sudo chown -R username:groupname /home/void/auxdrive or in your case sudo chown -R void:void /home/void/auxdrive

#

rinse and repeate for the other drive

lone phoenix
#

done for both

rough rose
#

then you can confirm by doing ls -la /home/void

#

and it shold show the user and group that owns the folders

lone phoenix
#
total 92
drwxr-x--- 11 void void  4096 Dec 17 06:20 .
drwxr-xr-x  3 root root  4096 Dec 17 01:44 ..
drwxr-xr-x  3 void void  4096 Dec 17 06:13 auxdrive
-rw-------  1 void void  5765 Dec 17 06:24 .bash_history
-rw-r--r--  1 void void   220 Mar 31  2024 .bash_logout
-rw-r--r--  1 void void  3771 Mar 31  2024 .bashrc
drwx------  2 void void  4096 Dec 17 01:44 .cache
drwxrwxr-x  4 void void  4096 Dec 17 02:20 .config
drwxr-xr-x  3 void void  4096 Dec 17 02:20 .docker
drwxrwxr-x  3 void void  4096 Dec 17 02:34 docker-volumes
-rw-rw-r--  1 void void 22115 Dec 17 02:14 get-docker.sh
drwxrwxr-x  5 void void  4096 Dec 17 06:27 immich-app
drwxrwxr-x  3 void void  4096 Dec 17 01:59 .local
drwxr-xr-x  3 void void  4096 Dec 17 06:13 nvmedrive
-rw-r--r--  1 void void   807 Mar 31  2024 .profile
drwx------  2 void void  4096 Dec 17 01:44 .ssh
-rw-r--r--  1 void void     0 Dec 17 01:47 .sudo_as_admin_successful
-rw-rw-r--  1 void void   165 Dec 17 02:24 .wget-hsts
void@void:~$```
rough rose
#

god damn thats sexy

lone phoenix
#

yup

rough rose
#

ok its time to go to the beddiebyes

lone phoenix
#

lol. ok.

#

ooh

#

so just switch upload location to the full auxdrive path?

rough rose
#

the world is your oyster at this point

lone phoenix
#

hahaha

rough rose
#

make sure you copy the original upload if you plan on restoring immich

lone phoenix
#

but I need to docker down before I change it right?

rough rose
#

if you plan on re deploying immich I may suggest /home/void/auxdrive/immich

#

or something like that

#

make it a sub directory of the drive instead of the full directory of the drive

lone phoenix
#

thanks again. I really appriciate it. gnight