identifying a partitition in fstab by PARTLABEL creates a second shortcut for the partition, for it's file system label

Bug #1649360 reported by Dirk Bosmans
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udisks2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

Short story:
When a partition has both a partition label and a filesystem label, and is identified in /etc/fstab by PARTLABEL= , both file manager's side pane (thunar on Xubuntu) and the desktop (with the setting 'icons/default icons/Removable Devices/Disk and Drives') show two shortcuts for the partition: one for the /etc/fstab entry, named as the last pathname component of the mount point in /etc/fstab, and a self-generated second shortcut, named after the filesystem label. By some seemingly random process either of both shortcuts is mounted at some point, preventing the other one to be mounted, EVEN when that one is marked as automount in /etc/fstab. If the mounted shortcut is /etc/fstab's PARTLABEL= entry, it is mounted to the provided /etc/fstab mount point. If the mounted shortcut is that for the filesystem label, it is mounted to a temporary directory under /media/myusername/. In either case, the other shortcut can't be mounted then.

This behaviour makes it unpredictable through which path a partition can be reached. The problem is not present for partitions without a filesystem label, even if they are identified in /etc/fstab by PARTLABEL= .

As a workaround I reverted back to identifying the partitions in /etc/fstab by UUID=, which if I am right, is a filesystem feature. Identified as such, the destop and the file manager side bar show one shortcut only, named after the file system label, and mounting it to the /etc/fstab mount point.

I read somewhere that the option to identify partitions by PARTLABEL= and PARTUUID= is a more recent addition to fstab-syntax, so my first guess is that the auto-mounting system isn't yet aware of these; it seems to collect and identify partitions by the uuid or label of the filesystem on each partition, and when comparing that to the /etc/fstab entries, it does not recognize them as being the same partition that is identified in /etc/fstab by it's uuid or label from the partition table.

Long story:
After using and learning linux (Xubuntu) for half a year, I decided to do the right thing and stop identifying partitions to be mounted by block special device node (/dev/sda1 to /dev/sdb4 for my setup), but by a persistent name. So I set out to change /etc/fstab to identify the partitions to mount by UUID=, and that went well and I felt safe. Only problem was that a week later, I had no clue which UUID is which partition, which made me uncomfortably uncertain.

So I used 'parted' to name all my partitions with a meaningfull partition label, similar but not identical to the filesystem label that I had named them to with 'e2label', 'fatlabel' and 'ntfslabel'. I also changed /etc/fstab to reflect that, now identifying my partitions using the PARTLABEL= . I choose PARTLABEL= instead of LABEL=, because it requires more skill and privileges to change a partition label than to change a filesystem label, so it is 'more persistent'.

From then on, the automatic mounting behaviour became erratic. The desktop and the side pane of the file manager now showed 2 shortcuts for each partition: one named like the filesystem label, another named like the last path component of the mount point in /etc/fstab. When mounting the partition is triggered,by clicking one of both shortcuts in on desktop or in filemanager, or by some other process, and even with automount in /etc/fstab, one of the shortcuts is used for mounting the partition, preventing the other one to be mounted as well later.

By this behaviour the same partition could be accessed at either but not both mount points. Either the mount point provided in /etc/fstab/, which is accessible in file manager under an entry named after the last path component of that mount point, which is linked to the full mount path. Either a temporary mount point which 'the system' creates in my user's /media/myusername/ directory, which is accessible in file manager under the name of the filesystem label, which again is linked to the full mount path.

Because I find it a bit creepy to edit /etc/fstab, I did not go on to try identifying the partitions by LABEL= or by PARTUUID= . My guess is that PARTUUID= would exhibit the same problem, and LABEL= not.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: udisks2 2.1.7-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-53.74-generic 4.4.30
Uname: Linux 4.4.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.2
Architecture: amd64
CurrentDesktop: XFCE
CustomUdevRuleFiles: 56-hpmud.rules 60-vboxdrv.rules
Date: Mon Dec 12 17:35:41 2016
InstallationDate: Installed on 2016-04-07 (249 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
MachineType: MSI MS-7971
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-53-generic.efi.signed root=UUID=88e332dc-deb9-4c9c-9dfc-e0afe7ad45bd ro quiet splash vt.handoff=7
SourcePackage: udisks2
Symptom: storage
Title: Internal hard disk partition cannot be mounted manually
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/25/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: B.50
dmi.board.asset.tag: Default string
dmi.board.name: H170A PC MATE (MS-7971)
dmi.board.vendor: MSI
dmi.board.version: 2.0
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: MSI
dmi.chassis.version: 2.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrB.50:bd01/25/2016:svnMSI:pnMS-7971:pvr2.0:rvnMSI:rnH170APCMATE(MS-7971):rvr2.0:cvnMSI:ct3:cvr2.0:
dmi.product.name: MS-7971
dmi.product.version: 2.0
dmi.sys.vendor: MSI

Revision history for this message
Dirk Bosmans (dirk-bosmans) wrote :
description: updated
description: updated
Revision history for this message
Phillip Susi (psusi) wrote :

Maybe I misunderstood, but did you say that you edited /etc/fstab and put in two entries for the same partition? One using PARTLABEL and one using LABEL?

Revision history for this message
Dirk Bosmans (dirk-bosmans) wrote :

@Phillip Susi (psusi)

Indeed you misunderstood. I apologize for my bug report being much too long to read carefully, but it is my first bug report, and I wanted to be as complete as my understanding allows.

This is wat I did say concerning the part that you misunderstood:

  ... When a partition has both a partition label and a filesystem label, and is identified in /etc/fstab by PARTLABEL= ...
and
  ... I choose PARTLABEL= instead of LABEL= ...

The shortcuts that I talk about that are based on the filesystem label, are generated by the system, although I do not know what part of it.

Revision history for this message
Dirk Bosmans (dirk-bosmans) wrote :

@Phillip Susi (psusi)

Indeed you misunderstood. I apologize for my bug report being much too long to read carefully, but it is my first bug report, and I wanted to be as complete as my understanding allows.

This is wat I did say concerning the part that you misunderstood:

  ... When a partition has both a partition label and a filesystem label, and is identified in /etc/fstab by PARTLABEL= ...
and
  ... I choose PARTLABEL= instead of LABEL= ...

But the title may be misleading. I made the distinction between entry in fstab and shortcut on desktop and in filemanager late into writing the report, and did not reflect that in the title. I will do that now.

The shortcuts that I talk about that are based on the filesystem label, are generated by the system, although I do not know what part of it.

summary: - identifying a partitition in fstab by PARTLABEL creates a second entry
- for the partition, for it's file system label
+ identifying a partitition in fstab by PARTLABEL creates a second
+ shortcut for the partition, for it's file system label
Revision history for this message
Phillip Susi (psusi) wrote :

Oh, so you mean on the unity panel, there is one icon for the filesystem label, and another for the GPT label? I'll try to reproduce it.

Revision history for this message
Dirk Bosmans (dirk-bosmans) wrote :

@Phillip Susi (psusi)

Actually I use Xubuntu, so no Unity panel here, but the 2 icons you describe are indeed on the desktop and in Xubuntus file manager, which is called Thunar. And the problem is not so much that there are 2 icons, but that the shortcuts labeled by these 2 icons mount the filesystem to 2 different paths.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

sounds a bit similar to bug 991471 which I have not gotten my head around yet

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.