Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Mounting external HDD's issue UPDATE

Message
Author
grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Mounting external HDD's issue UPDATE

#1 Post by grelos » Fri May 04, 2018 1:42 pm

I have a couple of external HDD's which I use to backup stuff. These are operating from an USB dock and usually auto-mounted when I switch it on.
Sometimes (for some reason I have still to investigate) they go kind of frozen and there is no way to access them anymore. Well, usually a reboot (hard reboot poweriing off with Power key) fixes it. However after rebooting - and this is the issue I wanna fix- they get labeled by Mx differently. I mean, data is still fully accessible but a different name messes up my crontab (rsync).
I make an example, calling them hddA and hddB. They are correctly accessible in /media/grelos/hddA and /media/grelos/hddB. After going frozen and rebooting, MX puts them in /media/grelos/hddA1 and /media/grelos/hddB1 and these are accessible. Going one folder up, so in /media/grelos I still see folders /media/grelos/hddA and /media/grelos/hddB but with a big X on their icons and they are not accessible.
To access them I need to be root but then hddA and hddB shows no data inside (empty folders). A second reboot does not revert to original status.

Is there any way to force reverting to original naming (so hddA and hddB)?
Thank you
Last edited by grelos on Thu Sep 27, 2018 5:07 am, edited 2 times in total.
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1711
Joined: Wed Apr 11, 2018 5:09 pm

Re: Mounting external HDD's issue

#2 Post by fehlix » Fri May 04, 2018 2:25 pm

The folders /media/grelos/hddA etc are not removed automaticaly when you shut down.
Only the applcation you are using to automount will remove the folder when you properly unmount!
As in your case with a frozen HDD the "automounting" mechanism has now chance to remove the folder!

Solution: During boot-up remove all uneeded "ghost" folder from /media/grelos/
you can run a simple one liner within startup script rc.local
I.e. next automout will create a new /media/grelos/hddA folder freshly for you! :fox:
Let me know if you need the one-liner :happybday:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Re: Mounting external HDD's issue

#3 Post by grelos » Fri May 04, 2018 3:02 pm

Well, yes please! Thanks.
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1711
Joined: Wed Apr 11, 2018 5:09 pm

Re: Mounting external HDD's issue

#4 Post by fehlix » Fri May 04, 2018 5:26 pm

@ grelos,
to fix the not removed mountdir due to your accasional frozen hdds
you can add to the "autostart"-file of the system a command to remove
the unneeded mount-dir at startup like this:
Open the file /etc/rc.local
from within Thunar and right-click -> "Edit as Root"
Add the two lines of code below
just before the "exit 0"-line
that end of the file looks like this:

Code: Select all

#
# 
[ -d /media/grelos/hddA ] && rmdir /media/grelos/hddA
[ -d /media/grelos/hddB ] && rmdir /media/grelos/hddB

# do not remove this last exit line
exit 0

Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Re: Mounting external HDD's issue

#5 Post by grelos » Sat May 05, 2018 2:48 am

Thank you very much. Actually while waiting for your support I have fixed it myself, deleting hddA and hddB folders with Thunar in root mode. After rebooting hddA1 and hddB1 were gone. But your solution is much more elegant than mine. :number1:
MX-17 on Asus FX753VD and Lenovo 520-15IKB

grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Re: [SOLVED] Mounting external HDD's issue

#6 Post by grelos » Thu Sep 27, 2018 5:06 am

New problem with external HDD's and USB stick too.
They get mounted as root randomly. For randomly I mean sometimes they get mounted as User and other times as root.
I have not touched fstab or other permissions so I do not know why this happens.
To add another strange thing: if I check their permissions with Thunar Root (/media/user/ex_HDD) it shows that User can do anything but actually this is not the case as User cannot cut files, etc.

Any idea why this is happening and how to fix it?

Thank you
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1711
Joined: Wed Apr 11, 2018 5:09 pm

Re: Mounting external HDD's issue UPDATE

#7 Post by fehlix » Thu Sep 27, 2018 6:05 am

post the /etc/fstab
Please do post between code-tags [code] [/code].
thanks
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Re: Mounting external HDD's issue UPDATE

#8 Post by grelos » Thu Sep 27, 2018 9:12 am

Code: Select all

  # /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda6 :
UUID=b41304b9-753a-4b33-bdd1-a71678d0a4fc       /       ext4    defaults        1       1
#Entry for /dev/sda1 :
UUID=9ABC-AFG6  /boot/efi       vfat    defaults        1       2
#Entry for /dev/sdb1 :
UUID=1D3C10872E29822F   /media/mx17/Dati        ntfs    defaults,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2 0       0
#Entry for /dev/sdc1 :
UUID=4E55A325326D9950   /media/mx17/Letizia\040EX-HDD   ntfs    defaults,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2 0       0
#Entry for /dev/sda7 :
UUID=149fc43d-1918-43a5-a5c4-ce34bae58154       /home   ext4    defaults        1       2
UUID=6176e9c6-2c10-4bb9-bf0c-e56bf979d887       /media/mx17/Dati_VM1    ext4    defaults,nosuid,nodev,relatime,stripe=8191      0       0
A couple of external HDD's are missing from fstab but they are now connected.
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1711
Joined: Wed Apr 11, 2018 5:09 pm

Re: Mounting external HDD's issue UPDATE

#9 Post by fehlix » Thu Sep 27, 2018 9:31 am

grelos wrote:
Thu Sep 27, 2018 9:12 am
A couple of external HDD's are missing from fstab but they are now connected.
How do you mount those?
grelos wrote:
Thu Sep 27, 2018 5:06 am
They get mounted as root randomly. For randomly I mean sometimes they get mounted as User and other times as root.
Which external HDD are those? Any of those within fstab?
How and when are those mounted, after boot or after the got plugged in?
grelos wrote:
Thu Sep 27, 2018 5:06 am
if I check their permissions with Thunar Root (/media/user/ex_HDD) it shows that User can do anything but actually this is not the case as User cannot cut files, etc.
show us from the command line the permssions

Code: Select all

ls -al /media/user/ex_HDD
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 41
Joined: Wed Mar 28, 2018 3:12 pm

Re: Mounting external HDD's issue UPDATE

#10 Post by grelos » Fri Sep 28, 2018 2:58 am

They are automatically mounted as soon as I switch them on (they are on an external bay).
Usually I boot the system and then power on the external HDD's upon need.
fstab shown before is somehow miselading because it shows some externals but not all of them (and be 100% sure that they were on and operating, I could see them with the file manager).

Here a thunar screenshot of all the externals (but "HDD" which is the second internal hard drive):


Image


A thing I have noticed is that those disks shown in fstab have a ntfs filesystem, the other externals have Ext4.
Now for example they are all mounted as they should not as root.
MX-17 on Asus FX753VD and Lenovo 520-15IKB

Post Reply

Return to “Hardware /Configuration”