Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot mount a btrfs partition over NFS [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
shimbob
n00b
n00b


Joined: 13 Sep 2003
Posts: 45

PostPosted: Wed Dec 18, 2013 7:33 pm    Post subject: Cannot mount a btrfs partition over NFS [SOLVED] Reply with quote

My home server has two partitions that are exported via NFS:
Code:
/etc/fstab:
/dev/sda3               /mnt/storage    ext4            defaults,noatime,nodiratime,norelatime  0 1
/dev/sdb                /mnt/blackhole  btrfs           defaults,noatime,device=/dev/sdb,device=/dev/sdc        0 1


Code:
/etc/exports:
/mnt/blackhole  192.168.1.0/26(rw,async,no_root_squash,no_subtree_check)
/mnt/storage    192.168.1.0/26(rw,async,no_root_squash,no_subtree_check)


These are mounted on my clients:
Code:

/etc/fstab:
192.168.1.9:/mnt/blackhole   /mnt/blackhole   nfs   defaults   0 0
192.168.1.9:/mnt/storage   /mnt/storage   nfs   defaults   0 0


This used to work absolutely fine until recently when nfs-mounting the btrfs partition times out with "Stale NFS file handle" errors:

Code:
dezk mnt # mount -v /mnt/storage ; mount | grep storage
mount.nfs: timeout set for Wed Dec 18 10:01:52 2013
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.9,clientaddr=192.168.1.12'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.9'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.9 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.9 prog 100005 vers 3 prot UDP port 32767
monoliz:/mnt/storage on /mnt/storage type nfs (rw,addr=192.168.1.9)
dezk mnt # mount -v /mnt/blackhole ; mount | grep blackhole
mount.nfs: timeout set for Wed Dec 18 10:02:06 2013
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.9,clientaddr=192.168.1.12'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.9'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.9 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.9 prog 100005 vers 3 prot UDP port 32767
mount.nfs: mount(2): Stale NFS file handle

The last 6 lines repeat until it times out.
Code:
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.9,clientaddr=192.168.1.12'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.9'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.9 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.9 prog 100005 vers 3 prot UDP port 32767
mount.nfs: mount(2): Stale NFS file handle
mount.nfs: Connection timed out


I've searched and found a reference to possible file system corruption that the NFS server is picking up on and reports as ESTALE but I've run btrfsck 3 times as well as scrubbed it twice, no errors reported (btrfsprogs v3.12).


Nevermind. Fixed it.
Code:
monoliz mnt # btrfs subvolume get-default blackhole/
ID 5 (FS_TREE)
monoliz mnt #

Then changed /etc/exports:
Code:

/mnt/blackhole  192.168.1.0/26(rw,async,no_root_squash,no_subtree_check,fsid=5)

I thought the fsid= option was only for NFSv4, oh well.
I have *NO* clue what changes were made that require fsid=.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3374

PostPosted: Wed Dec 18, 2013 10:13 pm    Post subject: Reply with quote

Where did you learn this?

I'm running nfsv4 now, using ext4, and I have to use fsid=n in order to not get the stale file handle error. But the value for fsid when running this way isn't critical, just that it be there, and not be 0.

I'm in the process of building a new server, and have considered using btrfs for this function instead of ext4. I never saw the value of fsid mean anything, so I'm curious about what you've done.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
shimbob
n00b
n00b


Joined: 13 Sep 2003
Posts: 45

PostPosted: Thu Dec 19, 2013 12:52 am    Post subject: Reply with quote

I first heard about fsid from this gentoo forum post, but it seemed purely an issue with NFSv4 (I'm using v3) and he was having an error message that didn't match mine. I didn't try fsid until the very end out of frustration that nothing else was working. It worked, go figure. My /mnt/blackhole btrfs doesn't even have any subvolumes created so I don't understand the requirement.

As an experiement, I unmounted the nfsclient and changed it to fsid=2. The client is still able to mount it so it seems the number does not have to match the number reported by 'btrfs su ge blackhole/'.

I just wish I could find out what change brought this requirement. I'll downgrade nfs-utils to see if I can figure out if & which new version introduced this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum