Project

General

Profile

Bug #581

hda-diskmount does not ignore fstab comment lines

Added by davidjmurray over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
setup-storage
Target version:
-
Start date:
07/22/2010
Due date:
% Done:

100%


Description

If a line with the /dev/fstab file has been commented out by a '#', hda-diskmount will still find the /dev/sdx statement and not produce the fstab mount help cut/paste text.

Scenario.

Either a hard drive has failed or has to be removed, Fedora will fail on boot up as the disk in the /etc/fstab can not be found to mount. Fedora will stop and prompt for the root password for maintenance mode. If the offending line is commented out, by remounting root rw and editing the /dev/fstab file, rather than deleting (which is good practice until the problem is solved) and then the system is rebooted.

Fedora will now start correctly. If there is a replacement disk, it must be partitioned and formatted as per wiki 'Add a 2nd hard disk' instructions.

Upon running hda-diskmount, no new disk is found as hda-diskmount will find the mount disk instruction in the commented out line in the fstab file and assume that it is already added; which is not the case.

Removing the commented out line completely and re-running hda-diskmount solves this issue.

Solution.

Change hda-diskmount to correctly scan the fstab file and ignore comment lines irrespective if they are /dev/sdx mount instructions.

History

#1 Updated by gboudreau over 11 years ago

I prefer to keep it that way.
Maybe it's commented out, but shouldn't be, or something.
I added a warning instead.

[gb@hda amahi]$ grep f16e1be2-85fd-48ed-bd77-1876b1dea8a5 /etc/fstab
#UUID=f16e1be2-85fd-48ed-bd77-1876b1dea8a5 /mnt/hdd7 ext3 defaults 0 2
@
[gb@hda amahi]$ sudo hda-diskmount@
****************************************************************
Ignoring /dev/sdb1 - already mounted
Ignoring /dev/sdb1 - already in /etc/fstab as UUID=1e6dbb66-0f46-40bc-975b-f87c5e0e04bf
****************************************************************
Ignoring /dev/sdd1 - already mounted
Ignoring /dev/sdd1 - already in /etc/fstab as UUID=f16e1be2-85fd-48ed-bd77-1876b1dea8a5
This device appears to be commented out of your /etc/fstab. You will need to remove it from there for hda-diskmount to be able to mount it.
****************************************************************
...
No usable Linux, Windows or Mac partitions found on your disks.

#2 Updated by gboudreau over 11 years ago

  • Status changed from New to Assigned
  • Assignee set to gboudreau
  • % Done changed from 0 to 100

Patch submitted.

#3 Updated by Anonymous over 11 years ago

  • Status changed from Assigned to Closed

Applied in changeset commit:"8a23ca0b2de4340d1896a369f8945173289b1353".

Also available in: Atom