Mount external USB3 HDD

Hardware: Raspberry Pi 4B at home
YunoHost version: YunoHost 4.3.6.2 (stable)
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hello and thanks for sharing your time!

I’am trying to mount my external USB3-HDD with an NTFS partition, for permanent use (Media-Files for Jellyfin).
My libreelec installation on another SD Card is able to mount it.

This is what I tried.

$ sudo mount /dev/sda2 /media/NAS1
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
$ fuser -m /dev/sda2 (Does nothing)
$ mkdir /media/NAS1
mkdir: cannot create directory ‘/media/NAS1’: File exists
 $ sudo blkid -o list -w /dev/null
device                                                                           fs_type         label            mount point                                                                          UUID
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/dev/mmcblk0p1                                                                                           vfat                  boot                   /boot                                                                                                        49D4-FECF
/dev/mmcblk0p2                                                                                           ext4                  rootfs                 /                                                                                                            e56cd792-9997-4d02-b53e-d51ec370b26e
/dev/sda2                                                                                                ntfs                  NAS1                   (not mounted)                                                                                                82A21F70A21F67C5
/dev/mmcblk0                                                                                                                                          (in use)                                                                               
/dev/sda1                                                                                                                                             (not mounted)          
$ sudo lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0  3.7T  0 disk
├─sda1        8:1    0   16M  0 part
└─sda2        8:2    0  3.7T  0 part
mmcblk0     179:0    0 59.5G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 59.2G  0 part /

I am absolutely not an expert, nd have not used an NTFS partition for years, but in what I understood, this is a Microsofs specific partition format and if you want to use this disk exclusively on your server, you should avoid it.
Something else I noticed when I had a multiboot is that Windows do not close the partitions which then become unusable for linux at all (until you manage to tell Windows to close them on shutdown).

But if you want to use this disk exclusively on your server, use a Linux compatible partition system.

3 Likes

I want to be able to move Files from my Windows Computers over SMB, that’s why I’m using NTFS.
Linux Filesystems won’t work with Windows on the fly.

EDIT: I heard from the HD shutdown problem too and plugged the HDD on my Windows Notebook and did a safe unplug/shutdown. But it changed nothing afaik.

Hi
try to install this package ntfs-3g
you need to create a directory on the Raspberry Pi (Debian) that will act as the mount point for the USB Hard Drive. To keep it organised, we will create this in the directory mnt and we will call the folder usbhdd to keep it simple.
follow this wiki

2 Likes

Thanks for your advice!
I did the tutorial step by step but getting the same error with mount -a:

Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.

My HDD/Partition is 4TB in size and uses GPT.
Could this be a problem?

What gives
mount - l
And

df -aTh
$ mount -l
/dev/mmcblk0p2 on / type ext4 (rw,noatime) [rootfs]
devtmpfs on /dev type devtmpfs (rw,relatime,size=1800564k,nr_inodes=84155,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) [boot]
tmpfs on /run/user/1007 type tmpfs (rw,nosuid,nodev,relatime,size=393084k,mode=700,uid=1007,gid=1007)
$ df -aTh
Filesystem     Type        Size  Used Avail Use% Mounted on
/dev/root      ext4         59G  3.6G   53G   7% /
devtmpfs       devtmpfs    1.8G     0  1.8G   0% /dev
sysfs          sysfs          0     0     0    - /sys
proc           proc           0     0     0    - /proc
securityfs     securityfs     0     0     0    - /sys/kernel/security
tmpfs          tmpfs       1.9G     0  1.9G   0% /dev/shm
devpts         devpts         0     0     0    - /dev/pts
tmpfs          tmpfs       1.9G  8.6M  1.9G   1% /run
tmpfs          tmpfs       5.0M  4.0K  5.0M   1% /run/lock
tmpfs          tmpfs       1.9G     0  1.9G   0% /sys/fs/cgroup
cgroup2        cgroup2        0     0     0    - /sys/fs/cgroup/unified
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/systemd
none           bpf            0     0     0    - /sys/fs/bpf
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/cpuset
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/perf_event
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/freezer
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/devices
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/pids
cgroup         cgroup         0     0     0    - /sys/fs/cgroup/blkio
systemd-1      autofs         0     0     0    - /proc/sys/fs/binfmt_misc
sunrpc         rpc_pipefs     0     0     0    - /run/rpc_pipefs
mqueue         mqueue         0     0     0    - /dev/mqueue
debugfs        debugfs        0     0     0    - /sys/kernel/debug
configfs       configfs       0     0     0    - /sys/kernel/config
/dev/mmcblk0p1 vfat        253M   49M  204M  20% /boot
tmpfs          tmpfs       384M     0  384M   0% /run/user/1007

Try

sudo umount /media/NAS1

Then

sudo mount /dev/sda2 /media/NAS1

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.