Unable to access files created in Linux from windows share - linux

We have mounted an NFS share which is on windows to Linux environment. Something like below.
10.0.0.10:/shared_1 nfs4 50G 19G 32G 38% /mnt
If i create any file from Linux box and try to access the file using windows share \<windows ip shared_1, it gives me the error as attached.
Please help me if i need to do any changes at windows or linux side.
i am not really an OS guy. Please help.

Related

Command to know what was mounted in a folder

I have a folder on my server that mounts volumes of a FreeNAS via the iSCSI protocol. I need to mount these same folders on another server but I can't figure out how they were mounted because the naming in FreeNAS and the folders are different.
 
Are there any commands I can use to see how they were assembled? Using the df command I have the following return:
/dev/sde 1008G 605G 352G 64% /mnt/folder1
/dev/sda 1008G 150G 808G 16% /mnt/folder2
/dev/sdf 4,0T 4,0T 0 100% /mnt/folder3
But this is not useful since I can't figure out which volumes these mounts are referencing.
I'm Using Debian GNU/Linux 8.9 (jessie) and FreeNAS 9.10.2.
As we discussed in the comments to the original question, /dev/sdX is simulated devices with iSCSI protocol. To manage those you would normally use iscsiadm command.

Error Mounting for ntfs partition in ubuntu 16.04 in terminal

hello.
i need to help. i want to mounting drive D in ubuntu 16.04.BUT
my partition is ntfs format. (Drive C & D)
I had Installed Windows 7 on my computer, but then I Deleted It and Installed Ubuntu 16.04, but i just repartition the drive C. and did not change the drive D partition.
means that i changed C partitioning and partitioned it for Ubuntu OS(like home & swap & root). partition of D is constant. so D partitions did not change.(D partition is NTFS)
partitioning for ubuntu in C
When Ubuntu installed, i wanted to open my D drive (ntfs) but get the following error:
this message show when i want to open drive
and when mounting in terminal give me this message:
`root#mjb:/home/mjb# mount -t "ntfs" /home
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.`
and this:
sudo mount -t ntfs-3g /dev/sda5 /dummy
[sudo] password for mjb:
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda5': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
I test this solution:
open Terminal
type this command sudo -mount -t ntfs -r /dev/sda5 and then enter
then the partition mounted but i have a new problem:
the partition is read only because i type in command -r
ubuntu told me in the error message that: you can mount partition read only.
my question is: does exist any command for mounting partition in the form of read/write.
Open Disks
Select the partition you are not able to mount then turn off automatic mounting options, unselect mount at startup & write ro after comma as shown in the image & now you should be able to mount the disk succesfully.
seems like your windows is locking your HD before shutting down.
This happens when you try to acess the HD that windows is installed on from another OS, because on shutdown, windows locks the acess to the HD because by doing this, it can gain some performance on resuming Windows the next time you boot it.
So, simply try rebooting your windows before going to linux, if you shutdown Windows and then turn your PC directly into any other SO you wont be able to acess the HD/partition Windows has acess to.
Try Shift+shutdown in windows, then boot to Ubuntu os. It will mount all drives

Raspbian Wheezy Owncloud and NFS together

I am trying to setup a file/DLNA server on raspberry pi (raspbian wheezy) for the files to be shared by all the devices I use - android and Linux to the minimum.
I have a USB drive with some decent storage where I have all my files. So far, I had NFS and dlna serving the USB drive contents.
Recently, I installed owncloud. It required the owncloud data directory to be owned by www-data. I have mounted (from fstab) the USB drive with options rw,user,uid=33,gid=33,mask=007. The owncloud worked fine (though it is very slow to render the contents).
My nfs exports is as follows:
/owncloud_data/mystuff *(rw,all_squash,anonuid=33,anongid=33,no_subtree_check)
My shomount -e localhost displays the following:
Export list for localhost:
/owncloud_data/mystuff (everyone)
However, when I issue
sudo mount localhost:/owncloud_data/mystuff /my_nfs
I get the following error:
mount.nfs: access denied by server while mounting localhost:/owncloud_data/mystuff
I don't understand why. I kind of guess that this is because the /owncloud_data/mystuff is owned by the www-data. But, the nfs-server is run as root; should it not be able to read the data? Or am I missing anything in this regard? I dont get any useful logs in the /var/log/messages; I tried including the --debug all option in the nfs config.
I haven't started with the dlna yet (I have installed minidlna which was working with NFS before I installed the owncloud).
OR, is there a better solution for what I am trying to do?
Please let me know if you need more information in this regard.
Thanks
I wont tick this as an answer. It is a work around.
The problem is if I export the /owncloud_data/mystuff the nfs mount is not working. If I export all /owncloud_data, it is working fine (along with the export options I have mentioned in the original post). I just mount /owncloud_data/mystuff on the client side (though technically I can mount /owncloud_data there).
I will be happy if anybody can explain this behaviour and solve to export /owncloud_data/mystuff.

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.

Mount Netapp NFS share permanently on RHEL 6.4

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.

Resources