Jellyfin Forum
Cannot Access HDD - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Cannot Access HDD (/t-cannot-access-hdd)

Pages: 1 2


Cannot Access HDD - GreyAether - 2024-08-08

I am running Jellyfin on Debian 11 Bullseye. I recently installed a large mechanical HDD to store my media library, alongside my bootdrive.

However, though I can add files and folders to the drive in File Manager, I am unable to add any libraries in Jellyfin. I get the error: "The path could not be found. Please ensure the path is valid and try again."

I used "chmod -R 777 /media/[username]/[drivename]" when installing the drive, so I'm pretty sure the drive permissions are okay. Can anyone help me out here, am I missing something simple? Thanks in advance.


RE: Cannot Access HDD - Fate - 2024-08-08

This sounds like a permission issue...

can you share fdisk -l and df -h
and the content of your /etc/fstab ?


RE: Cannot Access HDD - TheDreadPirate - 2024-08-08

If the drive is mounted in /media/userName this is likely auto mounted. You can manually mounted it, as Fate suggested, or you can remove the ACL that the auto mount process creates.

Code:
sudo setfacl -b -R /media/Username

That will remove the ACL. BUT, I'd recommend manually mounting the drive in /etc/fstab.


RE: Cannot Access HDD - GreyAether - 2024-08-16

Thanks for the help, I really appreciate it.

My df -h is

df: /run/user/1000/doc: Operation not permitted
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 1.3M 1.6G 1% /run
/dev/sda1 439G 405G 12G 98% /
tmpfs 7.8G 43M 7.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.6G 96K 1.6G 1% /run/user/1000
/dev/sdb1 5.5T 4.1G 5.2T 1% /media/rich/Red6

My fdisk -l

bash: fdisk: command not found

I don't understand this as, according to Synaptic, I have fdisk installed.

My /etc/fstab contents
# /etc/fstab: static file system information.
#
# 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).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=720b113d-2d7b-49eb-b849-01ac644bdcea / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=d7d6541e-b45b-4c70-b7bc-e8a807af3624 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Apologies, but I do not really understand the fstab or what ACL is, so I do not want to try a sudo command until I understand what I am doing.

Thank you both for all of your help so far, I really appreciate it.


RE: Cannot Access HDD - TheDreadPirate - 2024-08-16

Ok. I can help you edit your /etc/fstab. To do this right we need the output of

Code:
sudo ls -l /dev/disk/by-id/ | grep sdb1

And also the output of fdisk. Install fdisk with this command.

Code:
sudo apt install fdisk

Then provide the output of "sudo fdisk -l".


RE: Cannot Access HDD - GreyAether - 2024-08-16

(2024-08-16, 01:48 PM)TheDreadPirate Wrote: Ok.  I can help you edit your /etc/fstab.  To do this right we need the output of

Code:
sudo ls -l /dev/disk/by-id/ | grep sdb1

And also the output of fdisk.  Install fdisk with this command.

Code:
sudo apt install fdisk

Then provide the output of "sudo fdisk -l".

Thank you so much for your help.

The output for sudo ls -l /dev/disk/by-id/ | grep sdb1 is:
Code:
lrwxrwxrwx 1 root root 10 Aug  8 16:06 ata-WDC_WD60EFRX-68L0BN1_WD-WX31D95846NJ-part1 -> ../../sdb1 
lrwxrwxrwx 1 root root 10 Aug  8 16:06 wwn-0x50014ee00419ce97-part1 -> ../../sdb1                   

The output for sudo fdisk -l is:
Code:
Disk /dev/sda: 447.13 GiB, 480103981056 bytes, 937703088 sectors                                     
Disk model: SanDisk Ultra II                                                                         
Units: sectors of 1 * 512 = 512 bytes                                                               
Sector size (logical/physical): 512 bytes / 512 bytes                                               
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x249dad9b

Device    Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 935700479 935698432 446.2G 83 Linux
/dev/sda2      935702526 937701375  1998850  976M  5 Extended
/dev/sda5      935702528 937701375  1998848  976M 82 Linux swap / Solaris


Disk /dev/sdb: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: WDC WD60EFRX-68L
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E5202A53-B276-AB4A-9C9A-8691D15EC892

Device    Start        End    Sectors  Size Type
/dev/sdb1  2048 11721043967 11721041920  5.5T Linux filesystem



RE: Cannot Access HDD - Disentomb - 2024-08-16

Following along here as I have the same issue however I get no output for 

Code:
sudo ls -l /dev/disk/by-id/ | grep sdb1

Thanks


RE: Cannot Access HDD - TheDreadPirate - 2024-08-16

So, just a short primer on what fstab is. It's a text file that Linux reads on boot with the parameters for all of the disks you want mounted.

The first parameter is the disk you want mounted. A lot of people use the /dev/sd* identifier, but that letter at the end can shift if you change what SATA or NVMe port the disk is attached to. So the /dev/disk/by-id/ directory provides a true unique ID to ensure the drive is always correctly identified and mounted. The "wwn" ID.

The second parameter is where in the file system you want the drive mounted. This is arbitrary. You can mount a drive anywhere. But you have to make sure that the directory exists already and is empty.

The third parameter is the file system on that disk. In this case it says "Linux filesystem" (almost certainly ext4).

The fourth are the mount options. This is a bit advanced, but "defaults" is what we'll be putting in and is fine for locally attached drives. If you have a NAS and need to mount a network share in Linux, you would need to provide more than just "defaults".

The fifth (0 or 1) and sixth fields (0, 1, or 2) are switches are for advanced uses, both will be 0 for this.

Now we are going edit /etc/fstab.

Code:
sudo nano /etc/fstab

Now copy and paste this line to the bottom of the fstab file. You can change the second field (the mount path). You currently have your drive mounted at /media/rich/Red6. You can keep it there if you want or have it mounted somewhere else. Just make sure that the folder you want to be at A) exists and B) is empty. I'd recommend moving it out of /media/rich and mounting in a new directory in /mnt or /media. I mount mine at /media/library, but do whatever you'd like. "mkdir" is the command to make new folders.

Code:
/dev/disk/by-id/wwn-0x50014ee00419ce97-part1 /media/rich/Red6 ext4 defaults 0 0

Save and quit.

Regardless whether you keep it in the same place or not, we are going to unmount it and then re-mount it with the new parameters.

Unmount from the current location.

Code:
sudo umount /media/rich/Red6

Then re-mount it.

Code:
sudo mount -a

This command reads in the fstab file and mounts all the drives defined in it.

Backing up a little bit, your question about ACLs. In Linux there are "basic" permissions and then ACLs (access control lists). Basic permissions are what you see when you type "ls -l" on the command line.

Code:
chris@rat-trap:/media/library$ ls -l
total 391
drwxr-s--- 135 chris jellyfin 135 Aug  9 17:21  Anime
drwxr-s---  80 chris jellyfin  80 Aug  1 13:30 'Anime Movies'
drwxr-s---  13 chris jellyfin  39 Apr 29 09:48 'Anime Music Videos'
drwxr-s---  68 chris jellyfin  68 Apr 26 17:05 'Audio Books'
drwxr-s---   4 chris jellyfin   4 Aug 24  2023  Comics
drwxr-s---   5 chris jellyfin   5 Aug  8 18:07  jellyfinBackup
drwxr-s---   7 chris jellyfin   7 Aug  7 16:26 'JP Live Action'
drwxr-s---   3 chris jellyfin   3 Aug  9 17:55 'Korean Movies'
drwxr-s---   2 chris jellyfin   3 Feb 11  2024  liveTV
drwxr-s---  23 chris jellyfin  32 Apr 29 09:48  Manga
drwxr-s--- 177 chris jellyfin 177 Aug  9 11:52  Movies
drwxr-s--- 121 chris jellyfin 199 Jul 30 10:52  Music
drwxr-s---   2 chris jellyfin 280 Aug 11 16:39 'Music Videos'
drwxr-s---  44 chris jellyfin  44 Mar  7  2023 'Old Time Radio'
drwxr-s---  30 chris jellyfin  30 Aug  9 13:43 'TV Shows'
drwxr-s---   2 chris jellyfin   2 Aug 13 19:13  wip

ACLs override the basic permissions and add more advanced and flexible capabilities for power users with complex, multi-user, access requirements. And can even work with Windows Active Directory (with the aid of the SSSD service).

But pretty much nobody on this forum really needs that functionality and should stick with basic permissions (chown, chmod). However, most Linux distros will auto-mount drives you haven't defined in fstab in /media/yourUser/driveName and put an ACL on /media/yourUser. ACLs are denoted by the + at the end of the permissions.

Code:
rwxr-xr-x+

This is why I recommended you mount the drive outside of /media/rich. So you don't have to worry about an ACL coming back on /media/rich the next time you plug in a thumb drive or something.


RE: Cannot Access HDD - TheDreadPirate - 2024-08-16

(2024-08-16, 03:05 PM)Disentomb Wrote: Following along here as I have the same issue however I get no output for 

Code:
sudo ls -l /dev/disk/by-id/ | grep sdb1

Thanks

Remove " | grep sdb1" from the end.  I was search for a specific drive for GreyAether.


RE: Cannot Access HDD - Disentomb - 2024-08-18

I've gotten to the step of unmounting before remounting but terminal responds that the command isn't found, I've tried umount as well. Guessing I need to install or update something.

Also sorry if hijacking thread. Not sure if it'd be appropriate to start a new one at this point.