[SOLVED] Partition on internal SATA device mounted at boot appears removable

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

[SOLVED] Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Mon Sep 02, 2019 7:04 am

I'm running Mint 19.2 booting from a SATA SSD which has a UEFI boot partition, Linux root partition, swap, a partition mounted on /var and a larger data partition. The mounted partitions are all formatted as ext4. The data partition was mounted on /opt/steam for my games but was filling up so I recently bought a new larger SSD which now has a partition mounted there.

So with the original 400GB partition spare I mounted it as a workspace in my /home directory by amending its entry in /etc/fstab (only the mount point - all other mount options the same). That's fine, it's working nicely where it is mounted but Linux now sees it as a removable drive. It isn't a show-stopper but it's untidy and I don't want to accidentally unmount it while in the middle of some work. I'm also curious as to what has made it now appear removable.

Any ideas? :?

p.s. The device itself is not set as removable in the BIOS so as far as I can see this is something to do with the way I've done this in Linux.

EDIT
p.p.s. I've just noticed the sub-forum Mounting Partitions where I guess I should have posted this - oops! I don't think I can move the post (other than by deleting and re-posting it).
Last edited by 74m3_G33k on Sun Sep 08, 2019 7:13 am, edited 1 time in total.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Partition on internal SATA device mounted at boot appears removable

Post by Sir Charles » Mon Sep 02, 2019 7:42 am

Could mounting the partition under /mnt be an option? In that case you would need to create a new directory, lets call it Data for the sake of example under/mnt:

Code: Select all

sudo mkdir -v /mnt/Data
and use it as a new mount point for the partition in question and modify /etc/fstab accordingly. I guess you would also need to add x-gvfs-show to the mount options for the partition to show in the left pane of your file manager.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Mon Sep 02, 2019 8:20 am

Sir Charles wrote:
Mon Sep 02, 2019 7:42 am
Could mounting the partition under /mnt be an option?
Thanks for the reply - yes that could be a reasonable workaround - and I assume instead of using x-gvfs-show I could just create a symlink in my /home directory to the mount point. However it still leaves unanswered (for me anyway) the question as to why the patition appears as removable. Are you saying that this is something to do with it being mounted in my /home directory?

I suppose I should add that /home is a separate partition in itself.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Partition on internal SATA device mounted at boot appears removable

Post by Sir Charles » Mon Sep 02, 2019 8:34 am

74m3_G33k wrote:
Mon Sep 02, 2019 8:20 am
However it still leaves unanswered (for me anyway) the question as to why the patition appears as removable. Are you saying that this is something to do with it being mounted in my /home directory?
I am not sure why that is the case. To my understanding, it shouldn't make any difference unless the partition is mounted under /media which is the default location for the removable devices. Perhaps others will have an explanation for why a device mounted under /home will show as removable.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

altair4
Level 19
Level 19
Posts: 9690
Joined: Tue Feb 03, 2009 10:27 am

Re: Partition on internal SATA device mounted at boot appears removable

Post by altair4 » Mon Sep 02, 2019 9:14 am

By "removable" do you mean it shows up under Devices in nemo with the little triangle thingy?

That's a udisks thing. Anything mounted under /media or $HOME will show up on the side panel of your file manager. If it's mounted anywhere else it will not.

If you mount it under /mnt but add x-gvfs-show it will come right back and end up under Devices again.

If you want it under $HOME or under /media add the reverse gvfs option: x-gvfs-hide
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

jglen490
Level 5
Level 5
Posts: 625
Joined: Sat Jul 15, 2017 9:57 pm

Re: Partition on internal SATA device mounted at boot appears removable

Post by jglen490 » Mon Sep 02, 2019 11:12 am

Please copy and paste your fstab file into a CODE box, here.
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Thu Sep 05, 2019 3:25 am

altair4 wrote:
Mon Sep 02, 2019 9:14 am
By "removable" do you mean it shows up under Devices in nemo with the little triangle thingy?

That's a udisks thing. Anything mounted under /media or $HOME will show up on the side panel of your file manager. If it's mounted anywhere else it will not.

If you mount it under /mnt but add x-gvfs-show it will come right back and end up under Devices again.

If you want it under $HOME or under /media add the reverse gvfs option: x-gvfs-hide
Thanks for your reply. Yes - the partition appears as removable in Nemo and the Removable drives widget in the panel.

So...here's the mount in /etc/fstab followed by the bind to which I've added the option x-gvfs-hide:

UUID=23efd2ff-4ba1-4e0b-8cc2-565ac26feb39 /home/ian/Pictures/Photos/Workflow ext4 defaults,noatime 0 2
/home/ian/Pictures/Photos/Workflow /home/ian/Pictures/Photos/Workflow none bind,x-gvfs-hide 0 0


However this doesn't have any effect so I presume I am using the bind and/or x-gvfs-hide incorrectly. Any suggestions?

User avatar
catweazel
Level 19
Level 19
Posts: 9219
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Partition on internal SATA device mounted at boot appears removable

Post by catweazel » Thu Sep 05, 2019 3:59 am

74m3_G33k wrote:
Mon Sep 02, 2019 8:20 am
Sir Charles wrote:
Mon Sep 02, 2019 7:42 am
Could mounting the partition under /mnt be an option?
Thanks for the reply - yes that could be a reasonable workaround - and I assume instead of using x-gvfs-show I could just create a symlink in my /home directory to the mount point. However it still leaves unanswered (for me anyway) the question as to why the patition appears as removable. Are you saying that this is something to do with it being mounted in my /home directory?

I suppose I should add that /home is a separate partition in itself.
The quickest and easiest thing to do is to check your machine's BIOS to see if the drive is marked as hot-swapable.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Thu Sep 05, 2019 4:13 am

catweazel wrote:
Thu Sep 05, 2019 3:59 am
The quickest and easiest thing to do is to check your machine's BIOS to see if the drive is marked as hot-swapable.
See my OP: I've done that.

altair4
Level 19
Level 19
Posts: 9690
Joined: Tue Feb 03, 2009 10:27 am

Re: Partition on internal SATA device mounted at boot appears removable

Post by altair4 » Thu Sep 05, 2019 7:04 am

Ah, you're doing a bind mount.

Note: It is not at all clear to me why one would bind mount something to itself ..... but anyhoo ...

That be a bug I'm afraid: https://bugzilla.gnome.org/show_bug.cgi?id=782814

You can use bindfs instead like this guy did: viewtopic.php?f=90&t=288444

But a bindfs mount replaces the perceived permissions with it's own which may or may not be a problem in your case.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Thu Sep 05, 2019 7:48 am

altair4 wrote:
Thu Sep 05, 2019 7:04 am
Ah, you're doing a bind mount.

Note: It is not at all clear to me why one would bind mount something to itself ..... but anyhoo ...
OK...well I wasn't originally doing a bind mount, I added the /etc/fstab line:
/home/ian/Pictures/Photos/Workflow /home/ian/Pictures/Photos/Workflow none bind,x-gvfs-hide 0 0
after reading your reply, i.e. that the partition appears removable because it's mounted under $Home. I had a look around about using x-gvfs-hide and I only found it being used in a bind mount (something I've only heard of today). Is there another way to use x-gvfs-hide?

altair4
Level 19
Level 19
Posts: 9690
Joined: Tue Feb 03, 2009 10:27 am

Re: Partition on internal SATA device mounted at boot appears removable

Post by altair4 » Thu Sep 05, 2019 8:11 am

UUID=23efd2ff-4ba1-4e0b-8cc2-565ac26feb39 /home/ian/Pictures/Photos/Workflow ext4 defaults,noatime,x-gvfs-hide 0 2
Unmount the partition: sudo umount /home/ian/Pictures/Photos/Workflow

Then remount it: sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Thu Sep 05, 2019 9:20 am

altair4 wrote:
Thu Sep 05, 2019 8:11 am
UUID=23efd2ff-4ba1-4e0b-8cc2-565ac26feb39 /home/ian/Pictures/Photos/Workflow ext4 defaults,noatime,x-gvfs-hide 0 2
Unmount the partition: sudo umount /home/ian/Pictures/Photos/Workflow

Then remount it: sudo mount -a
Ah...clearly me being a bit dim not finding that! I thought it might an option for a regular mount but I didn't see anything in the man pages for /etc/fstab that mentioned x-gvfs-**** options. Thanks, will try this later today :D

altair4
Level 19
Level 19
Posts: 9690
Joined: Tue Feb 03, 2009 10:27 am

Re: Partition on internal SATA device mounted at boot appears removable

Post by altair4 » Thu Sep 05, 2019 9:43 am

Regrettably there is no one source or listing of all the available mount options any longer in Linux.

THe gvfs ones - at least a subset of them - are listed here: CONTROLLING WHAT IS SHOWN IN THE USER INTERFACE

And don't ask me about the other gvfs options ( x-gvfs-name, etc.. ) as I've never used them.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
74m3_G33k
Level 1
Level 1
Posts: 13
Joined: Wed Dec 15, 2010 5:37 pm
Location: UK

Re: Partition on internal SATA device mounted at boot appears removable

Post by 74m3_G33k » Sun Sep 08, 2019 7:12 am

@altair4: Finally got around to adding the x-gvfs-hide flag in the regular mount entry in /etc/fstab and confirming that it worked. Thanks again for your help and explanation. :D

Post Reply

Return to “Hardware Support”