-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dietpi-Drive_Manager | NTFS drives are not mounted on reboot #4339
Comments
Many thanks. I think I know where this comes from:
Looks like in case of NTFS, there is a difference between the filesystem that you are telling "mount" to mount and the filesystem reported back afterwards. I changed the drive detection loop so that info about mounted drive is consequently obtained via At least I found a way to disable the problematic cache. |
+ DietPi-Drive_Manager | Revert to blkid for mounted filesystem type detection, as findmnt will show "fuseblk" for NTFS filesytems, which is a correct result but cannot be used in fstab or for mounting the drive: #4339 + DietPi-Drive_Manager | Consequently avoid using blkid cache, as it may show outdated info and list drives which are not attached anymore. + DietPi-Drive_Manager | Add a code comment for all cases where we use the not recommended blkid tool and why it is required.
+ DietPi-Drive_Manager | Revert to blkid for mounted filesystem type detection, as findmnt will show "fuseblk" for NTFS filesytems, which is a correct result but cannot be used in fstab or for mounting the drive: #4339 + DietPi-Drive_Manager | Consequently avoid using blkid cache, as it may show outdated info and list drives which are not attached anymore. + DietPi-Drive_Manager | Add a code comment for all cases where we use the not recommended blkid tool and why it is required.
i have the same problem both on ntfs and ext4 disks on a system, have to rename my disks after reboot with my old names, to see them back on my network. |
But you have seen them, their are just not mounted on reboot? |
At least this particular issue does not exist with ext4, which is named "ext4" with all the above tools. Can you show which "name" you exactly changed, or the EDIT: Same for @ravenclaw900, as this should not be related to the filesystem type then. |
I've had the same problem as @cocoflan, sometimes it creates a malformed entry in |
I guess we need to be careful. There might be more and different challenges. This one was particular for NTFS as it was not auto mount on reboot |
This issue does exist for EXT4 and for F2FS. I am running an Odroid N2 and have done a clean install. Using dietpi-drive_manager I cannot get a drive that is formatted to EXT4 or F2FS to be mounted on reboot. There seems to be something seriously wrong with dietpi-drive_manager at the moment. |
Does it mount if you try to access the file system on os level using |
Whatever symptoms you face guys, the only relevant thing we can work with is:
|
I currently cannot get the latest version of DietPi to install on my Odroid N2 at all (I will open a bug report for this as a separate issue.) I will install the old version I got working to double check but when I put in cat /etc/fstab after setting up the drives in drive_manager the only drives showing were my root/boot partition drive. There were no entries for my Micro SD card and USB Flash Drive. |
I did a test on 7.1.2 and
|
I have done a clean install using v6.28.0 (newer versions are broken). On first boot after installation this is the result of
After running dietpi-drive_manager and formatting each drive as drive with GPT and EXT4. The mount points are /mnt/USBFlash and /mnt/MicroSD. The result of cat /etc/fstab is:
After rebooting the result of cat /etc/fstab is:
Drive manager after reboot:
There seems to be a problem with dietpi-drive_manager and it not reading the drives correctly. This may be causing problems for people then trying to mount the drives and use them. I have had errors when trying to format the drives in drive manager and it saying that the drive is mounted. I need to try and mount the drives via Samba and also try mounting them as F2FS. I am uncertain at this moment whether this is related to this NTFS Issue or a separate issue. |
I have made a folder on the drive using the following command:
I have the rebooted the system and used the following command:
I am able to go to the directory without errors. |
The drives are not mounted directly on boot. This is as expected and intended. They are mounted automatically upon access. That's why drive manager shows them unmounted on first place if you did not access them before. Btw it doesn't matter which version you use to flash you SD card initially. On first boot you will be updated to latest version, always. |
The But I have an idea what the issue with One solution could be to access all And the SD card entry looks not as intended:
|
Yes this was the case always, usually hitting the refresh button fixed the view. But indeed not what a user might expect. |
Ah that is true. I wonder which step actually triggers the mount. |
Now I also found a line break in
|
This PR solves both issues for me. Would be great if you could test it as well, as the automount timing might not be the same on each system: https://github.com/MichaIng/DietPi/pull/4349/files |
Did further testing and mount some other issues which should now be fixed. Furthermore, the script contained a few fragile assumptions, like that drives without UUID are network drives and such with are physical drives. While this is mostly true, I added a doubled check before adding fstab entries, first checking for the And indeed when unmounting a drive, removing the mount point directory can fail as long as the automount unit is still active. Sometimes it stops by itself immediately or quickly, but not always, showing the directory as "busy". It is now disabled actively, before attempting to remove the directory. All these automount issues seem to have been slipped through testing, as they become relevant only after a reboot, while I tested everything intensively only within one session. I'll add now a little automount bind mount to my testing systems, to include those in general testing. |
I will test the pull request as soon as I can, it should be the next day or so. I am using the instructions from this link to enable dev mode: I hope this is the correct way to test it, if not could you please give me some pointers so I can test it correctly. I still cannot do a fresh install of DietPi with the DietPi 7.02 image on my OdroidN2 (I will open this as an issue separately), I need to use v6.28.0 to get it to install. It is just going to take a little time but I will feedback as soon as I can after testing. Thanks. |
Many thanks. Instead of
|
I apologise that I messed up the link in my earlier comment, it was a link to the github page for enabling dev mode in the boot folder. Thanks for the command to use. I have clean reinstalled DietPi and used your command. I apologise for the long post but I thought it was best to use the same method as I used when reporting the bug so you can compare the two if so needed.
cat /etc/fstab before installation:
I entered the first command and then ran the second:
This is the error that was created:
I hit retry and then the update continued. It installed the dev version of dietpi-drive_manager. I then ran dietpi-drive_manager and this was the screen produced:
This is the screen immediately after formatting the drives.
This is the cat /etc/fstab before reboot:
This is the cat /etc/fstab after reboot:
This is the screen of the dietpi-drive_manager immediately after. I did not have to use the refresh command.
I hope this has been helpful. I again apologise for the length of the post but I would rather give you too much information than not have enough. Please let me know if you need me to test anything more or if I have made an error. Thanks for your time. |
Many thanks, so all works now as expected, right? Also the doubled entry below |
Yes, for me it works. I go into dietpi_drive_manager and everything appears as expected. I am no longer trying to format a drive and thinking it is broken because it kept appearing that it wasn't mounted. I obviously can't speak for anyone else but I think the change has worked. I will try F2FS next and then try mounting them in Samba. I will of course feedback if I get any problems. Thanks again. |
Many thanks for testing 👍. |
Creating a bug report/issue
@MichaIng
can you have a look to
dietpi-drive_manager
. At the moment we have a couple of user reporting issues using NTFS drives as they are not mounted on reboot. I could replicate the behaviour on my test system.adjusting
/etc/fstab
fromUUID=xxx /mnt/ntfs fuseblk noatime,lazytime,rw,nofail,noauto,x-systemd.automount
to
UUID=xxx /mnt/ntfs ntfs rw,nofail,noauto,x-systemd.automount,user,fmask=133,dmask=022,uid=1000,gid=1000 0 0
fixed it for one user
Reference https://dietpi.com/phpbb/viewtopic.php?t=8971
The text was updated successfully, but these errors were encountered: