Can't mount external drives after updating kernel

The short answer is yes.

If chkdsk is performed and ntfs3 still does not mount it, there could be deeper issues with your drive. The best resolution would then be to use chkdsk again, but use the advanced options to check for and repair bad sectors.

Some of these commands are given in the article I previously linked; otherwise use your favourite search engine, and search for ‘microsoft chkdsk’.

Note that such a scan will likely take a very long time to complete.

Okay, I will give it a try. I have a dual boot and can access windows easily. Hoping it’ll fix it.
But, can the chkdsk affect the data and delete anything?

But, it was working. If it can be a deeper issue -and I hope not-, wouldn’t it affect the drive even with ntfs-3g or even windows?

The drive is 2 terabytes. How much time can it take? Or it depends on the issue itself?

I am sorry for those many questions, but I just need to understand the issue correctly to deal with it. Thanks for your patience.

Only if that data happens to be in a damaged sector. NTFS is quite resilient (despite some forum opinions to the contrary); and one of the benefits of a jounaling filesystem is that data is usually recovered easily, where possible.

Yes, it would.

However (as you would have seen in the article I linked), ntfs-g3 actually ignores the dirty bit (and any damage, if it exists), and that is why it still gets mounted – any damage is also ignored, and eventually can cause greater problems. Windows is similar, in that you never know about any damage until you can no longer open a file, for example.

ntfs3 forces you to take action to fix the problem. You would likely have been unaware of otherwise, until it was too late.

2 TB = a long time, most likely - maybe set it to run over night; or, preferably at the weekend if you need access to your machine on weekdays.

I hope it doesn’t affect the data.
If the ext4 is readable by windows, I would switch to it as it works perfectly on Linux. But, afaik it is not readable.

When you said that, I noticed now that I have issues with this drive. When I rename some files, copy or delete them, they are disturbed. They are readable and I can see them, but can’t delete, copy or do anything with them. And I need to access windows to access them. May be this is caused by these damaged sectors.

If you only use USB drives for data transfer (not for storage) you could format one with EXFAT which is readable by both Windows and Linux; recovery of files from EXFAT, however, is virtually impossible when damaged. Some people prefer this filesystem, nonetheless.

Unfortunately, I want a format for storage drives not transferring USBs. But, how can exfat affect the storage drives?

I wouldn’t recommend EXFAT for long term storage; but some people still use it for that. It’s a filesystem best suited for USB drives.

EXFAT doesn’t use either Windows or Linux permissions; that can be an advantage. The only issue with it is the lack of recovery options; if a file is damaged it’s often lost for good. Files are able to be recovered more easily on NTFS (or any Linux filesystem).

By all means use EXFAT if you accept the risks. If you always have backups of that data, then the risk of losing it is minimised, at least.

@soundofthunder
I tried the chkdsk, and now I can auto mount the 2 drives through fstab.
But, I have another issue, I can’t access many of the data inside, I can’t delete, cut, rename, tag or duplicate files.
When I run this command sudo findmnt --verify, I get this:

[minaw@mina-manjaro ~]$ sudo findmnt --verify
[sudo] password for minaw: 
/mnt/Data
   [W] ntfs3 does not match with on-disk ntfs
/mnt/Fun
   [W] ntfs3 does not match with on-disk ntfs
none
   [W] non-bind mount source /swapfile is a directory or regular file

0 parse errors, 0 errors, 3 warnings

I don’t know what to do.

Is it only in Linux that you notice this? Are those files still accessible in Windows without any problem? Are you mounting the Windows system drive (C:) in Linux? - if so, that’s not a good idea (mounting a secondary partition or disk is preferred).

Post your current /etc/fstab content; maybe that will be useful to someone; otherwise, nothing comes immediately to mind.

I have never used findmnt --verify; the tool might not support ntfs3 (a guess). Keep in mind that most Linux tools are designed for use with native Linux filesystems, without much thought given to Microsoft (or Apple) formats. In any case, you’ll notice they are warnings and not errors; you can probably ignore them. Cheers.

Yes, it’s working normally on Windows.

Nope, I didn’t add it to fstab file.

Here you are:

  GNU nano 7.2                                                             /etc/fstab                                                                       
# /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).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=A999-BF76                            /boot/efi      vfat    umask=0077 0 2
UUID=d4407709-5ea0-42a1-915f-202fc30174a2 /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
UUID=01D6D6DDA6146800 /mnt/Data ntfs3 defaults 0 0
UUID=5E7E4E247E4DF575 /mnt/Fun ntfs3 defaults 0 0

/swapfile none swap defaults 0 0

Why you can’t access some of those files, I can’t say, however it seems likely to be permissions related. That’s a whole new topic in itself.

For now, mark the post that you feel solved the mounting issues, and then start another thread with the new issue.

Aside:- I just noted this threads title - are Data and Fun actually external USB disks? If so, they shouldn’t actually need to be listed in /etc/fstab; they should mount only manually using the disk mount feature in the taskbar. Just something to keep in mind. Cheers.

When I chose from grub the LTS kernel and changed the fstab back to /mnt/Data ntfs-3g auto,nofail,uid=1000,gid=1000,utf8,umask=022,defaults 0 0, it works fine and I can access all the files. With ntfs3 on the newest kernel, I can read, but can’t write to almost all files. That’s what I mean.

They are hard drives that I am sharing between Windows and Linux. I am adding them to fstab as I access them a lot on both systems and I don’t need to mound them dolphin panel with entering the sudo password every time I use them.

It’s possible that this additional issue stems from:

Is this the kernel that you’re using?

NTFS on linux is a reverse engineered implementation of a proprietary Microsoft filesystem.

Such implementation can only be a best effort when no specification has been released by Microsoft.

Therefore it is recommended to use exFAT as this is the only filesystem which can be used to exchange data between platforms without issues.

While NTFS has an extended attribute set designed for access control - those attributes only work on Windows and have no meaning for a Linux system.

Write permission errors with NTFS is never rooted in Linux but in how the filesystem was previously handled on a Windows system when the device was unmounted or shutdown.

NTFS formatted file systems should never be mounted using fstab but always mounted ad-hoc.

With today’s Linux such devices will always appear in the file manager’s device pane and can be mounted on the fly.

If it doesn’t appear it is a matter of configuring the file manager to display devices not yet mounted.

Yes, but I didn’t understand the solution he said. Should I write the fstab mounting line in a specific way?

I didn’t give you a solution.
I gave you a link to investigate for yourself.

This is how I manage any NTFS volumes.

For the comparatively few times access to an NTFS volume is needed, it just makes sense, rather than have them automount.

BUT as this ntifs - YOU MUST ensure the filesystems are shut down cleanly from Windows - otherwise ntfs3 driver will refuse to mount.

If you get write errors you must reboot into Windows and run chkdsk command for the file system

@soundofthunder created a very thorough topic on ntfs - worth a read.

If you have anything - scripts et.al. - that requires the device to have a fixed mountpoint my recommendation is to use a set of unit files.

This makes the device available when needed and unmount shortly after it is no longer needed.

As example we take your devices from fstab - comment the lines in fstab and save the file

#UUID=01D6D6DDA6146800 /mnt/Data ntfs3 defaults 0 0
#UUID=5E7E4E247E4DF575 /mnt/Fun ntfs3 defaults 0 0

Then reboot your system

When back up create 4 new files in /etc/systemd/system - file names reference the mount point

  1. /etc/systemd/system/mnt-Data.mount
    [Unit]
    Description=Mount Data partition
    
    [Mount]
    What=/dev/disk/by-uuid/01D6D6DDA6146800
    Where=/mnt/Data
    Type=ntfs3
    Options=rw,noatime
    
    [Install]
    WantedBy=multi-user.target
    
  2. /etc/systemd/system/mnt-Fun.mount
    [Unit]
    Description=Mount Fun partition
    
    [Mount]
    What=/dev/disk/by-uuid/5E7E4E247E4DF575
    Where=/mnt/Fun
    Type=ntfs3
    Options=rw,noatime
    
    [Install]
    WantedBy=multi-user.target
    
  3. /etc/systemd/system/mnt-Data.automount
    [Unit]
    Description=Automount Data partition
    ConditionPathExists=/mnt/Data
    
    [Automount]
    Where=/mnt/Data
    TimeoutIdleSec=10
    
    [Install]
    WantedBy=multi-user.target
    
  4. /etc/systemd/system/mnt-Fun.automount
    [Unit]
    Description=Automount Fun partition
    ConditionPathExists=/mnt/Fun
    
    [Automount]
    Where=/mnt/Fun
    TimeoutIdleSec=10
    
    [Install]
    WantedBy=multi-user.target
    

Enable and start the .automount units

sudo systemctl enable --now mnt-Data.automount mnt-Fun.automount

Open your file manager an point to /mnt/Data - watch the magic…

What happens is - at the time of accessing the automount calls the mount thus making your data accessible.

The longer explanation

2 Likes

Hmm, it must be this one [Primer] NTFS on Linux.

When I run this command, it gives me this error:

Job failed. See "journalctl -xe" for details.

I ran “journalctl -xe”

[minaw@mina-manjaro ~]$ journalctl -xe
Apr 07 16:54:45 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:54:45 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:54:45 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:54:45 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:54:45 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:54:54 mina-manjaro sudo[2547]:    minaw : TTY=pts/1 ; PWD=/home/minaw ; USER=root ; COMMAND=/usr/bin/systemctl enable --now mnt-Data.automount mn>
Apr 07 16:54:54 mina-manjaro sudo[2547]: pam_unix(sudo:session): session opened for user root(uid=0) by minaw(uid=1000)
Apr 07 16:54:54 mina-manjaro systemd[1]: Reloading requested from client PID 2556 ('systemctl') (unit user@1000.service)...
Apr 07 16:54:54 mina-manjaro systemd[1]: Reloading...
Apr 07 16:54:54 mina-manjaro systemd[1]: mnt-Fun.mount: Where= setting doesn't match unit name. Refusing.
Apr 07 16:54:54 mina-manjaro systemd[1]: Reloading finished in 322 ms.
Apr 07 16:54:55 mina-manjaro systemd[1]: mnt-Fun.automount: Refusing to start, unit mnt-Fun.mount to trigger not loaded.
Apr 07 16:54:55 mina-manjaro systemd[1]: Failed to set up automount Automount Fun partition.
░░ Subject: A start job for unit mnt-Fun.automount has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit mnt-Fun.automount has finished with a failure.
░░ 
░░ The job identifier is 2561 and the job result is failed.
Apr 07 16:54:55 mina-manjaro sudo[2547]: pam_unix(sudo:session): session closed for user root
Apr 07 16:54:55 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.163 DST=192.168.1.29 LEN>
Apr 07 16:55:15 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:15 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.251.209.3 DST=192.168.1.29 LEN=5>
Apr 07 16:55:15 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:15 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.251.209.3 DST=192.168.1.29 LEN=5>
Apr 07 16:55:15 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:16 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.251.209.3 DST=192.168.1.29 LEN=5>
Apr 07 16:55:16 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:17 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:17 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.251.209.3 DST=192.168.1.29 LEN=5>
Apr 07 16:55:19 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:19 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=35.190.31.54 DST=192.168.1.29 LEN=52>
Apr 07 16:55:24 mina-manjaro kernel: [UFW BLOCK] IN=wlp0s26u1u1 OUT= MAC=88:82:79:1c:74:8c:30:cc:21:ae:61:2c:08:00 SRC=142.250.180.131 DST=192.168.1.29 LEN>
Apr 07 16:55:40 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:40 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: Invalid encoding. Ignoring "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Service Worker/CacheStorage/eb8379e540732e8b03e302d>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Local Extension Settings/cdgkmagmdldlpiglliebaajdpd>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Managed Extension Settings/jhnleheckmknfcgijgkadoem>
Apr 07 16:55:41 mina-manjaro baloo_file_extractor[1850]: kf.baloo: "/home/minaw/.config/vivaldi/Default/Sync Extension Settings/cdgkmagmdldlpiglliebaajdpdk>
Apr 07 16:55:45 mina-manjaro baloo_file_extractor[2686]: Invalid encoding. Ignoring "/home/minaw/.cache/nvidia/GLCache/fd536ac49c5e66fddf61714b67b9b775/b9c>
Apr 07 16:55:45 mina-manjaro baloo_file_extractor[2686]: Invalid encoding. Ignoring "/home/minaw/.config/vivaldi/Default/shared_proto_db/metadata/000003.lo>
lines 2646-2717/2717 (END)

I think it works only for Data drive. If I am right, then it still has the same accessibility issue that I had with fstab. I still can’t cut, delete, rename or tag.

Update: this issue was due to naming i.e., inside the mount file of Fun, it was called Data. I changed it and they both are auto mount. But, still can’t write to both f them.

that is the fun with copy paste - you copy paste the authors error and you don’t know where to look.

I have corrected my error.

When the devices are mounted please run

ls -l /mnt

The expected output is root root rwxrwxrwx for the sub folders as NTFS permissions should have no effect.

If you do not get the expected result - we need to investigate if the ntfs3 driver is attempting permissions.