Skip to content
Commit 8d9c6f19 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Second, try mounting file systems specifying the type (#742741)

On RHEL/CentOS 6, GParted fails to mount nilfs2 file system like this:

    # mkfs.nilfs2 /dev/sdb1
    # mount /dev/sdb1 /mnt/1
    mount: you must specify the filesystem type

This fails because mount internally uses libblkid to determine the file
system type when it is not specified on the command line.  However on
RHEL/CentOS 6 libblkid is too old to recognise nilfs2.

GParted used libparted recognition first and blkid second.  Mount only
uses libblkid.  When there are multiple signatures on a partition
GParted may report a different result to blkid alone.  Therefore fix by
first trying to mount the file system without specifying the type, as is
already done, and if that fails, trying specifying the file system type.
This allows GParted to mount nilfs2 file systems.

    # mount -t nilfs2 /dev/sdb1 /mnt/1
    # mount | fgrep sdb1
    /dev/sdb1 on /mnt/1 type nilfs2 (rw,gcpid=30946)

And for unsupported file systems the error dialog from the failed mount
command shows both commands like this:

    (-) Could not mount /dev/sdb3 on /mnt/3

        # mount -v /dev/sdb3 "/mnt/3"
        mount: unknown filesystem type 'reiser4'

        # mount -v -t reiser4 /dev/sdb3 "/mnt/3"
        mount: unknown filesystem type 'reiser4'

                                         [  OK  ]

Bug 742741 - Nilfs2 file system is unusable on RHEL/CentOS 6
parent 0bdc1fef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment