Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
xfs mount fails for read-only devices #17
Comments
|
On Mon, Sep 10, 2012 at 06:39:54AM -0700, Martin Pitt wrote:
It's usually better to report bugs by upstream mailing list or by
Try LIBMOUNT_DEBUG=0xffff mount -r -t xfs /dev/sr1 /mntyou will see that mount(8) calls mount(2) syscall and the syscall [1678391.647219] XFS (sr0): Mounting Filesystem Not sure how I can help you. It would be better to talk about it with
mount(8) successfully detects that the device is read-only (the first mount -t xfs /dev/sr0 /mnt/testmount: /dev/sr0 is write-protected, mounting read-only
Karel Zak kzak@redhat.com |
martinpitt
commented
Sep 11, 2012
|
Hello Karel, Karel Zak [2012-09-11 2:09 -0700]:
Ah sorry, I saw a couple of other issues and thought that this was the
Ah, thanks for the hint about LIBMOUNT_DEBUG!
Right, so let's close this issue, as the bug is not in util-linux. Sorry for the noise! Martin Martin Pitt | http://www.piware.de |
martinpitt commentedSep 10, 2012
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:
now check dmesg for the device that it created; usually /dev/sdb
now create a readonly CD-ROM like device:
now check dmesg for the created CD-ROM device, usually /dev/sr1
try to mount it:
This gives:
Explicitly specifying -r (readonly) also doesn't help; the first line disappears, but the "can't read superblock" error is still happening.
Tested with a rather old 2.20.1, and confirmed with current git master.