dm.register(dev);
boolean ok = false;
try {
final FileSystemService fss = InitialNaming.lookup(FileSystemService.NAME);
NFS2FileSystemType type = fss.getFileSystemType(NFS2FileSystemType.ID);
final NFS2FileSystem fs = type.create(dev, readOnly);
fss.registerFileSystem(fs);
try {
fss.mount(mountPoint.getAbsolutePath(), fs, null);
ok = true;
} finally {