[Bug 714151] New: nfs kernel server doesn't esport a btrfs partition
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c0 Summary: nfs kernel server doesn't esport a btrfs partition Classification: openSUSE Product: openSUSE 12.1 Version: Milestone 3 Platform: x86-64 OS/Version: SuSE Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: diego.ercolani@gmail.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0 It seem that BTRFS partitions aren't exportable via nfs server Reproducible: Always Steps to Reproduce: 1. create a partition btfs (/dev/mapper/nonraid-ISO on /dati/ISO type btrfs (rw,relatime,compress=zlib)) 1b. launch nfs server rcrpcbind start; rcnfsserver start 2. create an export entry exportfs -o ro,no_subtree_check,all_squash */dati/ISO 3. on a client try to mount mount server:/dati/ISO /mnt/tmp Actual Results: on the server log: Aug 25 11:50:32 pc-diego rpc.mountd[10423]: authenticated mount request from 192.168.10.59:819 for /dati/ISO (/dati/ISO) Aug 25 11:50:32 pc-diego rpc.mountd[10423]: qword_eol: fflush failed: errno 9 (Bad file descriptor) Aug 25 11:50:32 pc-diego rpc.mountd[10423]: Cannot export /dati/ISO, possibly unsupported filesystem or fsid= required -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c zj jia <zjjia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@suse.com AssignedTo|bnc-team-screening@forge.pr |nfbrown@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c1 --- Comment #1 from David Sterba <dsterba@suse.com> 2011-09-07 14:48:13 CEST --- They are, but you have to supply a different fsid= for each export, like the last message says. This is a know issue. http://www.spinics.net/lists/linux-btrfs/msg12062.html -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c2 --- Comment #2 from Diego Ercolani <diego.ercolani@gmail.com> 2011-09-07 13:46:09 UTC --- (In reply to comment #1) I confirm that with fsid=0 It seems to work.
From the exports manual page:
fsid=num|root|uuid NFS needs to be able to identify each filesystem that it exports. Normally it will use a UUID for the filesystem (if the filesystem has such a thing) or the device number of the device holding the filesystem (if the filesystem is stored on the device). As not all filesystems are stored on devices, and not all filesystems have UUIDs, it is sometimes necessary to explicitly tell NFS how to identify a filesystem. This is done with the fsid= option. For NFSv4, there is a distinguished filesystem which is the root of all exported filesystem. This is specified with fsid=root or fsid=0 both of which mean exactly the same thing. Other filesystems can be identified with a small integer, or a UUID which should contain 32 hex digits and arbitrary punctu- ation. Linux kernels version 2.6.20 and earlier do not understand the UUID setting so a small integer must be used if an fsid option needs to be set for such kernels. Setting both a small number and a UUID is supported so the same configuration can be made to work on old and new kernels alike. buti it seem that btrfs have its own uuid, in my case: Label: 'usr' uuid: cb9b8f2b-f590-49c1-a896-7f372732a00a Total devices 1 FS bytes used 2.56GB devid 1 size 10.00GB used 5.04GB path /dev/dm-1 Label: 'vecchiopcrootfs' uuid: 7ae3bf35-4c50-40ef-afe5-6e59272e389e Total devices 1 FS bytes used 14.94GB devid 1 size 24.00GB used 21.04GB path /dev/dm-2 Label: 'samba' uuid: 44f76b1a-a414-40f5-a917-0d0a78b47fb0 Total devices 1 FS bytes used 54.05GB devid 1 size 100.00GB used 70.29GB path /dev/dm-3 Label: 'virtualmachines' uuid: d5d0ac81-3754-40ef-86b4-7b1fa6fb7b02 Total devices 1 FS bytes used 94.74GB devid 1 size 150.00GB used 98.29GB path /dev/dm-7 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c3 Neil Brown <nfbrown@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |diego.ercolani@gmail.com --- Comment #3 from Neil Brown <nfbrown@suse.com> 2011-09-08 06:34:58 UTC --- This should work.... In the mail item referenced in comment 1, the emphasis is on 'different'. The example there has two different filesystems exported with fsid=0. That makes no sense. If you specify fsid, they must be different. But you shouldn't need to specify fsid. nfsd cannot use the uuid reported by blkid or similar as it is based on the block device and so will be the same for each subvol, and nfsd needs different numbers for each subvol. So it makes a special case of btrfs and uses effectively stat -f -c %i /path/to/filesystem Would it be possible to strace -f /tmp/trace -s 1000 -p PID-OF-MOUNTD and the try to mount the btrfs filesystem, then attach the resulting /tmp/trace file? Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c4 Diego Ercolani <diego.ercolani@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|diego.ercolani@gmail.com | --- Comment #4 from Diego Ercolani <diego.ercolani@gmail.com> 2011-09-08 08:05:47 UTC --- Created an attachment (id=449717) --> (http://bugzilla.novell.com/attachment.cgi?id=449717) trace as requested (showmount -e localhost; exportfs ...; showmount ...; mount ..; (In reply to comment #3) Neil, as I have problem exporting btrfs, I don't export different partitions with the same fsid, I don't currently export at all. (The original partition /dev/mapper/nonraid-ISO it's currently an ext4 filesystem) I only tried with your suggestion to give a try. But, if you want the strace file I'm going to provide you. (for information the partition I'm trying to export (without fsid) it's my /usr directory pc-diego:~ # rcnfsserver status Checking for kernel based NFS server: idmapd running mountd running statd running nfsd running pc-diego:~ # ps axuww | grep mountd root 8433 0.0 0.0 19760 1128 ? Ss 09:57 0:00 /usr/sbin/rpc.mountd root 8477 0.0 0.0 6780 856 pts/1 S+ 09:57 0:00 grep mountd pc-diego:~ # showmount -e localhost Export list for localhost: /dati/ISO * pc-diego:~ # exportfs -o ro,no_root_squash *:/usr pc-diego:~ # showmount -e localhost Export list for localhost: /usr * /dati/ISO * pc-diego:~ # mount 127.0.0.1:/usr /mnt/tmp/ mount.nfs: Connection timed out pc-diego:~ # -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c5 Neil Brown <nfbrown@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Neil Brown <nfbrown@suse.com> 2011-09-08 11:53:30 UTC --- Thanks. That is very helpful. It looks like a bug in libblkid, but I cannot download source from the opensuse server just at the moment to confirm. I'll try again in a couple of days. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c6 Neil Brown <nfbrown@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nfbrown@suse.com AssignedTo|nfbrown@suse.com |puzel@suse.com --- Comment #6 from Neil Brown <nfbrown@suse.com> 2011-09-08 21:34:34 UTC --- Yes, definitely a bug in util-linux. In sysfs_init in particular (in lib/sysfs.c) If the 'open' fails we 'goto err' which runs 'sysfs_deinit()' on a 'cxt' which hasn't been fully initialised. The 'dir_fd' is still 0, so sysfs_deinit calls "close(0)" is confused things. Fix is o set dir_fd to -1 immediately after the memset in sysfs_init. I'll this over the Petr - util-linux maintainer. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c7 --- Comment #7 from Diego Ercolani <diego.ercolani@gmail.com> 2011-09-09 07:17:18 UTC --- I undestood only a little about your spiegation ;-) .... but I'm glad to help. Thank you -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c Petr Uzel <puzel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High Status Whiteboard| |util-linux -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c8 Petr Uzel <puzel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #8 from Petr Uzel <puzel@suse.com> 2011-09-13 09:15:21 UTC --- Thanks for the analysis, Neil. Patch submitted to Factory and util-linux upstream. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=714151 https://bugzilla.novell.com/show_bug.cgi?id=714151#c9 --- Comment #9 from Bernhard Wiedemann <bwiedemann@suse.com> 2011-09-13 12:00:22 CEST --- This is an autogenerated message for OBS integration: This bug (714151) was mentioned in https://build.opensuse.org/request/show/81983 Factory / util-linux -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com