Ext Harddrive Filepath/Create Directory
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Ext Harddrive Filepath/Create Directory
So I'm trying to connect an external hard drive to a media server program but it's saying that the file path doesn't exist when looking in the app. When I go into the properties folder, It appears to be located in media/administraton. But that option shows nothing when going through the apps file search. I created a directory, but can't figure out how to mount it. It also appears that it is already mounted. I'm trying to figure this out with google searching, but it's making me more confused.
Disk /dev/sdb: 3.65 TiB, 4000752599040 bytes, 976746240 sectors
Disk model: My Book 1230
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdb4bf07b
Disk /dev/sdb: 3.65 TiB, 4000752599040 bytes, 976746240 sectors
Disk model: My Book 1230
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdb4bf07b
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Ext Harddrive Filepath/Create Directory
Can you show us the output of
Code: Select all
cat /etc/fstab
Re: Ext Harddrive Filepath/Create Directory
What media server program?
Re: Ext Harddrive Filepath/Create Directory
/etc/fstab: static file system information.spamegg wrote: ⤴Tue Apr 20, 2021 3:11 pm Can you show us the output ofCode: Select all
cat /etc/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 installation
UUID=07694ce3-1fcd-4c41-9ae0-1274d9907f34 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=F4EA-42F2 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
Re: Ext Harddrive Filepath/Create Directory
Nothing there is mounting the drive automatically.
To check if it's already mounted:
(NOTE -- going with sdb given your first post).
You'll ideally see a line to the effect of "/dev/sdb1 on /some/path type ntfs [...]"
If not; then it's not mounted. You can mount it temporarily with
this'll at least let you confirm everything is happy and the system can successfully mount it (and you can navigate around and so on).
To permanently mount it somewhere, the best thing to work with would be the partition UUID; which you can get with the command (note, might need "sudo" to work). For example, from one of my drives:
We then take the "UUID" portion, and edit /etc/fstab to include it (just stick this at the end of the file):
The six fields are as follows:
To check if it's already mounted:
Code: Select all
mount | grep "sdb"
You'll ideally see a line to the effect of "/dev/sdb1 on /some/path type ntfs [...]"
If not; then it's not mounted. You can mount it temporarily with
Code: Select all
sudo mkdir -p /mnt/mybook
sudo mount -t ntfs -o defaults,uid=1000,gid=1000 /dev/sdb1 /mnt/mybook
To permanently mount it somewhere, the best thing to work with would be the partition UUID; which you can get with the command
Code: Select all
blkid
Code: Select all
# blkid
/dev/sda1: UUID="94518771-7381-4cc9-adfa-8aade95d8017" TYPE="ext4" PARTUUID="fbfb984e-01"
Code: Select all
UUID=94518771-7381-4cc9-adfa-8aade95d8017 /some/directory ntfs defaults,uid=1000,gid=1000 0 0
- UUID=[xxx] -- the partition UUID (could also be /dev/sdb1 ... but USB sometimes gets weird, UUID is best here). Replace with your UUID
- /some/directory -- the directory you want the partition to be available in. For example "/srv/mediaserver"
- ntfs -- filesystem type. should be "ntfs" for a mybook, unless you've reformatted it (in which case, use the new filesystem type)
- defaults,uid,gid -- mounting options. "Default" options for all filesystems are:
- rw -- set filesystem read/write
- suid -- allow set UID / set GID bits to take effect (probably no effect on NTFS, I can't remember or find it quick like in the manual)
- dev -- interpret the character / block device
- execv -- allow executable files (i.e. with the 'x' bit in permissions) to be executed.
- auto -- can be automounted with "mount -a"
- nouser -- forbid regular users from mounting
- async -- I/O is done asynchronously
- the first '0' -- used for dump(8), irrelevant for most drives.
- the second '0' -- used to set whether or not fsck will ever run at boot. Valid options are '0' (disable) or '2' (run, but after primary HDD). The only partition that should have this set to '1' is the partition that contains your root ("/") filesystem.
Last edited by djph on Wed Apr 21, 2021 10:46 am, edited 1 time in total.
Re: Ext Harddrive Filepath/Create Directory
You might be able to use the apps file search and you would have to go into the root of the filesystem first to find the /media directory and get down in there. There might be an initial option for "Computer", or "File System" or maybe a selection for "Other" where you have to get to the "File System" which will be the base(root) of the whole system file tree. And look for the /media directory. It's a long way to do it if you are only using a mount like that but it can often work that way, but it depends on the program you are using and the particular file search option it uses.
Re: Ext Harddrive Filepath/Create Directory
djph wrote: ⤴Tue Apr 20, 2021 8:47 pm Nothing there is mounting the drive automatically.
To check if it's already mounted:(NOTE -- going with sdb given your first post).Code: Select all
mount | grep "sdb"
You'll ideally see a line to the effect of "/dev/sdb1 on /some/path type ntfs [...]"
If not; then it's not mounted. You can mount it temporarily withthis'll at least let you confirm everything is happy and the system can successfully mount it (and you can navigate around and so on).Code: Select all
sudo mkdir -p /mnt/mybook sudo mount -t ntfs -o defaults,uid=1000,gid=1000 /dev/sdb1 /mnt/mybook
To permanently mount it somewhere, the best thing to work with would be the partition UUID; which you can get with the command(note, might need "sudo" to work). For example, from one of my drives:Code: Select all
blkid
We then take the "UUID" portion, and edit /etc/fstab to include it (just stick this at the end of the file):Code: Select all
# blkid /dev/sda1: UUID="94518771-7381-4cc9-adfa-8aade95d8017" TYPE="ext4" PARTUUID="fbfb984e-01"
The six fields are as follows:Code: Select all
UUID=94518771-7381-4cc9-adfa-8aade95d8017 /some/directory ntfs defaults,uid=1000,gid=1000 0 0
- UUID=[xxx] -- the partition UUID (could also be /dev/sdb1 ... but USB sometimes gets weird, UUID is best here). Replace with your UUID
- /some/directory -- the directory you want the partition to be available in. For example "/srv/mediaserver"
- ntfs -- filesystem type. should be "ntfs" for a mybook, unless you've reformatted it (in which case, use the new filesystem type)
- defaults,uid,gid -- mounting options. "Default" options for all filesystems are:
- rw -- set filesystem read/write
- suid -- allow set UID / set GID bits to take effect (probably no effect on NTFS, I can't remember or find it quick like in the manual)
- dev -- interpret the character / block device
- execv -- allow executable files (i.e. with the 'x' bit in permissions) to be executed.
- auto -- can be automounted with "mount -a"
- nouser -- forbid regular users from mounting
- async -- I/O is done asynchronously
In addition, the uid=1000/gid=1000 directives set ALL files and directories to the specified owning UID and GID (in mint, this'll be the user you created at setup - presumably the account you use daily). This is because NTFS doesn't actually follow linux permission setting paradigms.- the first '0' -- used for dump(8), irrelevant for most drives.
- the second '0' -- used to set whether or not fsck will ever run at boot. Valid options are '0' (disable) or '2' (run, but after primary HDD). The only partition that should have this set to '1' is the partition that contains your root ("/") filesystem.
It returned this code
/dev/sdb1 on /media/administrator/My Book type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
Re: Ext Harddrive Filepath/Create Directory
You have 1 possibly 2 problems:
[1] It's not that the partition isn't being auto-mounted it's that it is mounting it at the wrong place for what you are trying to do:
[2] It goes back to this question:
[1] It's not that the partition isn't being auto-mounted it's that it is mounting it at the wrong place for what you are trying to do:
Regardless of the permissions on the "My Book" folder nobody will be able to get to it other than "administrator". If you notice/dev/sdb1 on /media/administrator/My Book
djph
has you mounting it far away from that path /mnt/mybook
[2] It goes back to this question:
What server program and more importantly how did you install it? If it is a flatpak you may have the issue of a flatpak not being able to connect to any folder outside of one's home directory.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Ext Harddrive Filepath/Create Directory
Alright -- it means that it was automounted; and is only accessible to root (uid/gid=0)LPredmore wrote: ⤴Wed Apr 21, 2021 7:19 amIt returned this codedjph wrote: ⤴Tue Apr 20, 2021 8:47 pm Nothing there is mounting the drive automatically.
To check if it's already mounted:[...]Code: Select all
mount | grep "sdb"
/dev/sdb1 on /media/administrator/My Book type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
unmount it
Code: Select all
sudo umount /dev/sdb1
Code: Select all
sudo mkdir -p /mnt/mybook
sudo mount -t ntfs -o defaults,uid=1000,gid=1000 /dev/sdb1 /mnt/mybook
Re: Ext Harddrive Filepath/Create Directory
I"m trying to use Emby. And I didn't use flatpak to download it. I just downloaded from the site and followed the commandaaltair4 wrote: ⤴Wed Apr 21, 2021 7:54 am You have 1 possibly 2 problems:
[1] It's not that the partition isn't being auto-mounted it's that it is mounting it at the wrong place for what you are trying to do:Regardless of the permissions on the "My Book" folder nobody will be able to get to it other than "administrator". If you notice/dev/sdb1 on /media/administrator/My Bookdjph
has you mounting it far away from that path/mnt/mybook
[2] It goes back to this question:What server program and more importantly how did you install it? If it is a flatpak you may have the issue of a flatpak not being able to connect to any folder outside of one's home directory.