xfs-masters
[Top] [All Lists]

[Bug 929] New: mount fails for read-only devices

To: xfs-masters@xxxxxxxxxxx
Subject: [Bug 929] New: mount fails for read-only devices
From: bugzilla-daemon@xxxxxxxxxxx
Date: Mon, 10 Sep 2012 08:27:55 -0500
Auto-submitted: auto-generated
http://oss.sgi.com/bugzilla/show_bug.cgi?id=929

           Summary: mount fails for read-only devices
           Product: XFS
           Version: Current
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: xfsprogs
        AssignedTo: xfs-masters@xxxxxxxxxxx
        ReportedBy: martin.pitt@xxxxxxxxxx
   Estimated Hours: 0.0
    Classification: Unclassified


With xfsprogs 3.1.7, you cannot mount read-only devices such as write protected
SD cards, CD-ROMs, etc. with XFS. This is currently being detected by the
udisks2 test suite which tries to do fs creation and mounting for r/w and r/o
devices.

If you want to reproduce this on Linux without any hardware, here are the steps
(as root) to prepare a virtual readonly device:

modprobe scsi_debug dev_size_mb=100

# now check dmesg for the device that it created; usually /dev/sdb
mkfs.xfs -L testro /dev/sdb

# now create a readonly CD-ROM like device:
echo 5 > /sys/bus/pseudo/drivers/scsi_debug/ptype
echo 1 > /sys/bus/pseudo/drivers/scsi_debug/add_host

# now check dmesg for the created CD-ROM device, usually /dev/sr1

# try to mount it:
mount -t xfs /dev/sr1 /mnt

This gives:
mount: block device /dev/sr1 is write-protected, mounting read-only
mount: /dev/sr1: can't read superblock

Explicitly specifying -r (readonly) also doesn't help; the first line
disappears, but the "can't read superblock" error is still happening.

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

<Prev in Thread] Current Thread [Next in Thread>