User Tools

Site Tools


nfs_exporting_the_wrong_disk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

nfs_exporting_the_wrong_disk [2016/07/29 13:26] (current)
The SuperUser created
Line 1: Line 1:
 +If you going to export a disk from NFS, you need to be aware that it can be a bit picky about the volumes blkid. ​ I found this issue by restoring multiple copies of a VM (from different days backups), and want wanting to export out each copy.  On the NFS server, each volume was proper, but NFS was exporting out only one version.
 +
 +So I had:
 +<​code>​export
 +   ​+---backup1
 +   ​+---backup2</​code>​
 +   
 +Which looked fine on the server, but on the client it was showing the same volume.
 +
 +I traced it back to the UUID of the volume (and not the LVM UUID).
 +
 +If you run this command:
 +<​code>​blkid /​dev/<​vg_name>/​logical volume></​code>​
 +
 +You will get back the blkid of the volume. ​ This is what NFS uses to export the volume. ​ You can see this by running this command:
 +<​code>​cat /​proc/​fs/​nfsd/​exports</​code>​
 +
 +You will see that as part of the mounted disks, the UUID listing. ​ And in my case I saw the same UUID.
 +
 +So I umounted on the client, stopped the NFS export and then ran this command command to change the UUID of the volume:
 +
 +<​code>​tune2fs /​dev/<​vg_name>/​logical volume> -U  `uuidgen`</​code>​
 +
 +Check the blkid again and ensure that everything is good and then re-export.
 +
 +
 +
 +
 +
  
nfs_exporting_the_wrong_disk.txt ยท Last modified: 2016/07/29 13:26 by The SuperUser