Results 1 to 9 of 9

Thread: mount ntfs USB drive

  1. #1
    Join Date
    Jun 2020
    Beans
    22

    mount ntfs USB drive

    Hey Guys,

    I'm struggling a little with the cli. I want to mount a ntfs usb drive so that plex can other system services can read and write to it.

    I have edited /etc/fstab with:

    "UUID=9C3C7E513C7E2684 /media/usbext ntfs-3g auto,users,uid=1000,gid=1000,dmask=027,fmask=137,u tf8 0 0"

    I exit nano and type "sudo mount -a" and get no errors.

    I then type 'lsblk' and part of the feedback states:
    "sda1 8:1 0 5.5T 0 part /media/usbext" (5.5T USB drive mounted to media/usbext)

    Looks like i did it? no!

    I try and access the directory with:
    "cd /media/usbext"

    and get:
    -bash: cd: /media/usbext: Transport endpoint is not connected

    What am I not doing or doing wrong? any help would be really appreciated, please.

    Kind Regards,

    Chris

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,973
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: mount ntfs USB drive

    Remove the dmask=027,fmask=137 parts.
    if you want good options, these are what i use:
    Code:
    windows_names,nosuid,noatime,async,big_writes,uid=1000,gid=1000,fmask=0002,dmask=0002
    That results in expected directory and file permissions.

  3. #3
    Join Date
    Jun 2020
    Beans
    22

    Re: mount ntfs USB drive

    Unfortunately no luck, i get the came error output with the following in /etc/fstab:

    [UUID=9C3C7E513C7E2684 /media/usbext ntfs-3g windows_names,nosuid,noatime,async,big_writes,uid= 1000,gid=1000,fmask=0002,dmask=0002 0 0]

  4. #4
    Join Date
    Jun 2020
    Beans
    22

    Re: mount ntfs USB drive

    Hi,

    I thought it might be of use to supply the whole contents of /etc/fstab


    /dev/disk/by-uuid/30d530c7-587b-416d-b1c1-6087ffc56a4d / ext4 defaults 0 0
    /swap.img none swap sw 0 0
    UUID=9C3C7E513C7E2684 /media/usbext ntfs-3g windows_names,nosuid,noatime,async,big_writes,uid= 1000,gid=1000,fmask=0002,dmask=0002 0 0
    the first 2 lines "/dev/" and "/swamp.img" were there before I started to edit. I don't think these are having an impact on mounting?

  5. #5
    Join Date
    Jun 2020
    Beans
    22

    Re: mount ntfs USB drive

    Here's some more info using "ls -l" and "lsblk". Interesting to see that the permissions cannot be detected with "?". I hope this helps to give us a clue to whats going on?
    Could 'usbmount' be taking preference or conflicting with the info in 'fstab'?

    chris@server:/media$ ls -l
    ls: cannot access 'usbext': Transport endpoint is not connected
    total 32
    lrwxrwxrwx 1 root root 4 Jul 1 12:59 usb -> usb0
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb0
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb1
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb2
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb3
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb4
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb5
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb6
    drwxr-xr-x 2 root root 4096 Jul 1 12:59 usb7
    d????????? ? ? ? ? ?usbext
    chris@server:/media$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    loop0 7:0 0 55M 1 loop /snap/core18/1705
    loop1 7:1 0 55M 1 loop /snap/core18/1754
    loop2 7:2 0 71.2M 1 loop /snap/lxd/15896
    loop3 7:3 0 71.2M 1 loop /snap/lxd/15913
    loop4 7:4 0 29.8M 1 loop /snap/snapd/
    8140 loop5 7:5 0 27.1M 1 loop /snap/snapd/
    7264 sda 8:0 0 5.5T 0 disk
    └─sda1 8:1 0 5.5T 0 part /media/usbext
    sdb 8:16 0 119.2G 0 disk
    ├─sdb1 8:17 0 118.7G 0 part
    └─sdb2 8:18 0 615M 0 part
    nvme0n1 259:0 0 232.9G 0 disk
    ├─nvme0n1p1 259:1 0 1M 0 part
    └─nvme0n1p2 259:2 0 232.9G 0 part /
    Last edited by optimusprime11; July 3rd, 2020 at 08:56 AM.

  6. #6
    Join Date
    Jun 2020
    Beans
    22

    Re: mount ntfs USB drive

    I edited
    sudo nano /etc/usbmount/usbmount.conf
    to disable it (setting 0). I rebooted the machine and it works! problem is (I assume) if I insert a USB drive it wouldn't automatically mount for access?

    Sorry for the many posts, it helps me keep a log of what i'm doing and hopefully tells you where i'm going with this.

  7. #7
    Join Date
    May 2010
    Beans
    555

    Re: mount ntfs USB drive

    If its NTFS, also run a full chkdsk in Windows on the drive to make sure the file system is complete and consistent

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,973
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: mount ntfs USB drive

    Code:
    UUID=9C3C7E513C7E2684 /media/usbext ntfs-3g windows_names,nosuid,noatime,async,big_writes,uid= 1000,gid=1000,fmask=0002,dmask=0002 0 0
    • Is showing a space in between some options. No spaces are allowed.
    • The UUID must be correct, if you use UUIDs for the mount. blkid is the command to see that. Or you can use the file system LABEL, if one has been set and is unique. I use LABEL=250G in one mount, for example.
    • The /media/usbext directory shouldn't need to exist now that systemd-mount has taken over the fstab, but it wouldn't hurt to create it. sudo mkdir /media/usbext
    • ntfs-3g and ntfs for the type of file system shouldn't make any difference. Both are acceptable. I've used just ntfs for years.
    • If the HDD was connected to Windows recently, that other OS may have not properly closed the file system. Unfortunately, the only solution for that is to connect to it Windows, run scandisk and chkdsk (however they are spelled), then disable hibernation in Windows and use the "eject" option so that Windows will properly close the file system. MSFT started doing this from Win8 and later.


    That's all I got. I've never seen a refusal to mount, but I do see NTFS corruption about once a month on my single NTFS HDD here. Just yesterday, I had to wipe and reformat that disk because some zero-length files showed up that couldn't be removed. My NTFS disk is used by a video recording device that only works with NTFS or FAT32.

  9. #9
    Join Date
    Jun 2020
    Beans
    22

    Re: mount ntfs USB drive

    Update: I unfortunately had to restart the server from scratch but that’s bound to happen a few times while I’m learning. I found that usbmount conflicts with mounting of a drive configured via /etc/fstab. No idea why but I don’t need usbmount so I worked around it.
    thank you for your help.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •