Just had the weirdest problem with a new disk, NFS shares and LVM.

Scenario:  Two computers - server and desktop
Fitting a new 3TB drive into server, and my USB adapter doesn't handle
it.  Only shows 800 GB disk.
Server has all four SATA ports are in use, can't install new disk beside
existing ones to copy data.
I want to keep server running for now, so popping the failing drive and
using USB adapter on that would work, but then we'd not have this story.
So I connect the new drive to desktop internal SATA port, and it shows
as 2.7 TB.  Good enough.


New drive is organised as /dev/sdc1 being a PV, and there are two LVs
created, 350 GB for backup and 2 TB for mythtv.
There's 380 GB in unallocated extents, just cos I can.
Both LVs are formatted as ext4.

Filesystem                    1K-blocks       Used  Available Use%
Mounted on
/dev/mapper/threeTB-mythtv   2145296304   31711256 2006210868   2% /x/mythtv
/dev/mapper/threeTB-backuppc  382284292    5758368  357389412   2%
/x/backuppc

I want to copy file permissions etc, so a NFS mount seems appropriate.



On desktop /etc/exports contains
/x    2400:6900:2000:1::/64(rw,sync,no_root_squash,subtree_check)

And on desktop  exportfs returns
/x              2400:6900:2000:1::/64

On server I mount the exported share for desktop:/x


Everything looks good, I can see the two directories all well and good.
server:/x# ll
total 8
drwxr-xr-x 2 root   root   4096 Feb 24 19:50 backuppc
drwxr-xr-x 5 root   root   4096 Feb 24 19:51 mythtv

desktop:/x# ll
total 8
drwxr-xr-x 2 root   root   4096 Feb 24 19:50 backuppc
drwxr-xr-x 5 root   root   4096 Feb 24 19:57 mythtv



I start synching data with this
server:/# rsync -avH  /myth1  /x/mythtv/

but after a moment, there are no files in /x/mythtv/ on desktop???


desktop:/x# du -sh *
20K     backuppc
20K     mythtv

server:/x# du -s *               (yes okay I missed the -h)
4       backuppc
0       boomofo
564384  mythtv


At this point I noticed that blocks were decreasing on my root volume

Filesystem                1K-blocks       Used Available Use% Mounted on
/dev/sda1                  58503812   38638360  16934720  70% /
/dev/sda1                  58503812   39202812  16370268  71% /
/dev/sda1                  58503812   39518088  16054992  72% /



I stop the rsync with ^C at this point.


On desktop when I unmounted /x/mythtv, then all the files were visible
in /x/mythtv *on the root partition.***

The client machine (server) could read and write them happily, but the
host (desktop) couldn't see the files because something was mounted on top.

Perhaps NFS wasn't aware of the LVs mounted one level on from the root
of an export (share)

Finally, if I export the two LVs as separate exports, and mount each
separately on the remote machine, everything works as expected.

Conclusion - NFS doesn't like exporting a tree of mounts.
Further work - whether NFS dislikes all mounts, or just LVM mounts.


But my TV drive is reporting imminent fail, so I'm going to deal to
that.   Comments?

-- 
Criggie

_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to