Mount Netapp NFS share permanently on RHEL 6.4 - linux

I am trying to mount a volume on a RHEL 6.4 virtual machine permanently.
My fstab entry is as:
172.17.4.228:/bp_nfs_test1 /mnt1 nfs rsize=8192,wsize=8192,intr
And I mounted the volume as:
mount 172.17.4.228:/bp_nfs_test1 /mnt1
When I run df -h I can see the volume and able to access it properly.
But when I reboot the VM, the mount is gone and not able to access it anymore even though the entry in /etc/fstab is present
I have to manually mount the volume again (mount -a), then only I am able to see my volume in df -h and access it.
Any help is appreciated

The mount process on boot is very early, so your network won't be online thus preventing the nfs share from being mounted. You'll need to enable netfs, which manages network file shares, and runs after the network is up. Your desired process is:
Standard mounts processed.
NFS share is skipped during initial mounts (by adding _netdev to options).
After network is online, netfs will process network file systems like nfs and bring them online.
To prevent automounter for attempting to mount your nfs share before the network services are available, add _netdev to your options:
172.17.4.228:/bp_nfs_test1 /mnt1 nfs rsize=8192,wsize=8192,intr,_netdev
Enable netfs:
chkconfig netfs on
Alternatively, you could also configure the share through the /etc/auto.master configuration and have it mount when the share is accessed.

Related

mount point for Azure file share on VM

I am using Azure file share to sync large amounts of data between multiple machines. I followed the mounting docs to mount the file share to an Azure VM (running Ubuntu 20.04):
https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux?tabs=smb311
The Azure VM currently has a /data location with a 64 GB data drive that I elected as an additional option when the VM was created. I then mounted the fileshare at the /data location, mostly as a convenience to have the fileshare directory located in the same place as the local data. The file share mount is now located at /data/storage-account-name/fileshare-name.
When I run df, I can see the /data mount (filesystem /dev/sda1) and the /data/storage-account-name/fileshare-name mount (filesystem //storage-account-name.file.core.windows.net/fileshare-name). The two locations seem to be totally separate mounts, and everything is working as expected with the file share.
However, is it bad practice to mount the file share "on top" of the /data disk like this? Is it preferred to mount at /mnt or /media for any reason? Or is the mount location somewhat arbitrary?

NFS mount using CHEF on LINUX | permissions of directory not getting changed

I am trying to do an NFS mount using CHEF. I have mounted it successfully. Please find the below code.
# Execute mount
node['chef_book']['mount_path'].each do |path_name|
mount "/#{path_name['local']}" do
device "10.34.56.1:/data"
fstype 'nfs'
options 'rw'
retries 3
retry_delay 30
action %i[mount enable]
end
end
i am able to successfully mount and make an entry in fstab file. But, after mounting the user:group for the mount linked is changing to root:root , which i was not expecting.
i want to use myuser:mygroup as owner:group. I tried changing the same using chown command but am getting permission denied issue
request some guidance
As mentioned in the comment, this is not something Chef controls per se. After the mount, the folder will be owned by whatever the NFS server says. You can try to chmod the folder after mounting but that's up to your NFS configuration and whatnot as to if it will be allowed.

How can I mount a CephFS volume on CoreOS using my monitors' domain name?

I am trying to mount a CephFS volume on CoreOS. It currently works by specifying the IP address of one of my monitors:
mount -t ceph 1.2.3.4:6789:/ /mnt
However, I have three monitors for redundancy and have configured my DNS server to resolve to all three of them so I want to specify the domain name instead of the IPs:
mount -t ceph ceph-mon:6789:/ /mnt
However, this doesn't work. I think mount relies on mount.ceph being installed properly in order to resolve hostnames but I'm not certain about that.
How can I achieve this with CoreOS?

Mounting a folder from other machine in linux

I want to mount a folder which is on some other machine to my linux server. To do that i am using the following command
mount -t nfs 192.xxx.x.xx:/opt/oracle /
Which is executing with the following error
mount.nfs: access denied by server while mounting 192.xxx.x.xx:/opt/oracle
Do anyone knows what's going on ??? I am new to linux.
Depending on what distro you're using, you simply edit the /etc/exports file on the remote machine to export the directories you want, then start your NFS daemon.
Then on the local PC, you mount it using the following command:
mount -t nfs {remote_pc_address}:/remote/dir /some/local/dir
Please try with your home directory as per my knowledge you can't dump anything directly on root like that.
For more reference, find full configuration steps here.

Freenas cannot mount NFS

Today I installed FreeNas 9.2.1.8 and now I am trying to set up a NFS.
First I created a Volume with the volume manager. Then I created a dataset.
Now I want to set up a NFS for this dataset.
So I go to share, add UNIX(NFS) share, as mount point I select the path of my created dataset.
As mapalluser and mapallgroup I select nouser and nogroup scince I changed the permission of the dataset to it.
As a final step I have gone to services and switchen on NFS.
When I now try to mount the nfs on Ubuntu 13.10 with
sudo mount -t nfs 192.168.1.5:/mnt/Storage/NFS /home/tm/freenas/
It says mount.nfs Connection timed out
On the FreeNAS i got an message: rpcb_unset failed.
Does someone know what the problem here is?
Ok I solved the problem appearently I had to add my client to the host name database of my freenas server. The Setting can be found at Network Settings-> Global Configuration
And then I add it like:
192.168.1.4 clientmachinename

Resources