You are not logged in.

#1 2017-05-15 15:25:35

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

[SOLVED] Internal disk mounted in home (with fstab) showed removable

Hi,
I have installed a new SATA hard disk in my PC and I mount it with fstab in a sub-folder of my home:

....
# /dev/sdb1
UUID=13e4d10e-c62f-43dc-b3c6-94773e2a79eb	/home/juan/dunehd	ext4	defaults,noatime,data=writeback	0	1
....

But Gnome shows it like a removable disk:
http://i.imgur.com/vVNzNk0.png


Is there any way to disable this behavior?
Regards.

Last edited by j1simon (2017-05-16 16:06:22)

Offline

#2 2017-05-15 19:39:14

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

j1simon wrote:

I have installed a new SATA hard disk in my PC

How is it attached? Is it connected into a motherboard sata port - if so, is it a regular sata port or esata? What disk controller/kernel module? What does the journal say about it?

j1simon wrote:

# /dev/sdb1
UUID=13e4d10e-c62f-43dc-b3c6-94773e2a79eb    /home/juan/dunehd    ext4    defaults,noatime,data=writeback    0    1

The last field is wrong - see "man fstab", specifically "The sixth field" section.

Offline

#3 2017-05-15 20:21:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

Read the Code of Conduct and only post thumbnails.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2017-05-15 21:13:39

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

For me here, there are settings for a "hot-plug" SATA feature in the UEFI/BIOS menus. If I have that enabled on certain SATA ports, then those drives show up as removable in Nautilus, Thunar, etc.

Offline

#5 2017-05-16 08:01:31

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

It's connected to an internal SATA port. It's an internal hard disk.

fstab now is right:

# /dev/sda2 LABEL=arch64
UUID=1189fc3c-092c-424d-834e-6174830417c8	/         	f2fs      	rw,relatime,lazytime,background_gc=on,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6	0	1

# /dev/sda1
UUID=4FE9-F61F      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0	2

# /dev/sdb1
UUID=13e4d10e-c62f-43dc-b3c6-94773e2a79eb	/home/juan/dunehd	ext4	defaults,noatime,data=writeback	0	2

I've seen this old thread: https://bbs.archlinux.org/viewtopic.php?id=208514 but in my case the disk have "Removable",  "Ejectable" and "MediaRemovable" as false.

$ udisksctl info -d WDC_WD60EFRX_68L0BN1_WD_WX41D965T4JK
/org/freedesktop/UDisks2/drives/WDC_WD60EFRX_68L0BN1_WD_WX41D965T4JK:
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                false
    Configuration:              {'ata-write-cache-enabled': <true>}
    ConnectionBus:              
    Ejectable:                  false
    Id:                         WDC-WD60EFRX-68L0BN1-WD-WX41D965T4JK
    Media:                      
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:         
    MediaRemovable:             false
    Model:                      WDC WD60EFRX-68L0BN1
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  false
    Revision:                   82.00A82
    RotationRate:               5700
    Seat:                       seat0
    Serial:                     WD-WX41D965T4JK
    SiblingId:                  
    Size:                       6001175126016
    SortKey:                    00coldplug/00fixed/sd____b
    TimeDetected:               1494861445632316
    TimeMediaDetected:          1494861445632316
    Vendor:                     
    WWN:                        0x50014ee20e0f805a
  org.freedesktop.UDisks2.Drive.Ata:
    AamEnabled:                                 false
    AamSupported:                               false
    AamVendorRecommendedValue:                  0
    ApmEnabled:                                 false
    ApmSupported:                               false
    PmEnabled:                                  true
    PmSupported:                                true
    ReadLookaheadEnabled:                       true
    ReadLookaheadSupported:                     true
    SecurityEnhancedEraseUnitMinutes:           276
    SecurityEraseUnitMinutes:                   276
    SecurityFrozen:                             true
    SmartEnabled:                               true
    SmartFailing:                               false
    SmartNumAttributesFailedInThePast:          0
    SmartNumAttributesFailing:                  0
    SmartNumBadSectors:                         0
    SmartPowerOnSeconds:                        57600
    SmartSelftestPercentRemaining:              0
    SmartSelftestStatus:                        success
    SmartSupported:                             true
    SmartTemperature:                           315.15000000000003
    SmartUpdated:                               1494920252
    WriteCacheEnabled:                          true
    WriteCacheSupported:                        true

And the kernel is right too:

$ cat /sys/class/block/*/removable                                  
0
0

Offline

#6 2017-05-16 11:43:25

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

I don't get what's going on there for you. Everything you show seems seems similar to what I see here for me, but the filesystems I added to /etc/fstab don't even show up in that "Other Locations" area in Gnome's file manager, I guess are seen as part of the "/" entry.

I remembered something about "x-gvfs" mount options that can control what Gnome's stuff does with fstab entries. This lead me to this document here that might help:

https://github.com/GNOME/gvfs/blob/mast … -shown.txt

If you scroll down a bit, there's an Examples section with something interesting:

# forcibly hide device in user interface
/dev/disk/by-id/ata-HITACHI_HTS723232A7A364_E3834563KRG2HN-part1   /home/davidz/Data  auto  defaults,x-gvfs-hide 0 0

This seems like exactly what you need.

Offline

#7 2017-05-16 15:28:58

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

what-is-shown.txt wrote:

If the directory for a device is known and outside /media, $HOME (typically /home/foo) or /run/media/$USER then the device is not shown in the user interface.

Seems like if you mount anything under $HOME, it's normal that it shows up.

P.S. I just tested with a partition on my drive. If I mount it to /mnt, it disappears from nautilus. If I for example mount it to /home/tom/test, it remains.

Last edited by tom.ty89 (2017-05-16 15:32:00)

Offline

#8 2017-05-16 16:05:50

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 189

Re: [SOLVED] Internal disk mounted in home (with fstab) showed removable

Ropid wrote:

I remembered something about "x-gvfs" mount options that can control what Gnome's stuff does with fstab entries. This lead me to this document here that might help:

https://github.com/GNOME/gvfs/blob/mast … -shown.txt

If you scroll down a bit, there's an Examples section with something interesting:

# forcibly hide device in user interface
/dev/disk/by-id/ata-HITACHI_HTS723232A7A364_E3834563KRG2HN-part1   /home/davidz/Data  auto  defaults,x-gvfs-hide 0 0

Thanks, this works.

Offline

Board footer

Powered by FluxBB