why azure file share is not mounting on centos versions under 7? - azure

Is there any way to create Azure File Share mounts on CentOS versions lower as 7?
Azure documentation recommends centos 7+ for it.
I have tried the same for CentOS 7 and Ubuntu 16.04.Its working fine.
But for CentOS version under 7 it is not working.

But for CentOS version under 7 it is not working.
It is a by design behavior, because Azure files share requires SMB 2 dialect which supported by newer CIFS module in RHEL 7.
Pasting the note from Redhat Support Forum:
"For RHEL when you use the mount command your are using the kernel
driver for cifs. The features for cifs commections are tied to the
kernel module providing this. You can see details for this with module
"man mount.cifs" The RHEL6 kernel is only capabable of mounting older
1.0 smb protocol mounts. RHEL7 however can mount smb2 version of the protocal since the kernel is using a newer cifs module. On RHEL7 in
"man mount.cifs" you will see the options to specify vers= 1.0, 2.0,
2.1, or 3.0."
If you want to mount Azure files share to Centos 6, as a workaround we can update your kernel to 3.1.0 or 4.6, install the last version of cifs-utils, but it is not recommended.

As per my knowledge,you are missing the mount-point directory in the Linux VM to mount the SMB share to.
In Linux VM: You need to create a local directory at /mnt/mymountdirectory, use the following example to create a local directory:
sudo mkdir -p /mnt/mymountdirectory
Then Mount the SMB share to the local directory by providing your own storage account username and storage account key for the mount credentials as follows:
sudo mount -t cifs //myStorageAccount.file.core.windows.net/mystorageshare /mnt/mymountdirectory -o vers=3.0,username=mystorageaccount,password=mystorageaccountkey,dir_mode=0777,file_mode=0777
For more details, refer “Use Azure Files with Linux”.
And also, you may refer MSDN thread, which addressing your query.

Related

Undrestanding docker: what is the dockerhub Ubuntu image?

I configured Windows Subsystem for Linux, installed a Microsoft packaged Ubuntu on Win 10, to get my hands on Docker using Linux. From what I understood, Docker does not need a guest OS, unlike VMWare - that's one of the main advantages.
I browsed the dockerhub and found an official Ubuntu image. What is it for, as there is no need of a guest OS?
Shared OS is probably the wrong term here, because many include the Linux distribution and filesystem as part of the OS. Containers run with a shared Linux kernel, but in isolated namespaces from the host and each other. One of those namespaces is the mount namespace, including your root filesystem. Therefore when you enter a container, the files in /bin and other directories are assembled from the image (plus volume mounts, and changes made within the container).
The Ubuntu docker image is an initial filesystem that includes a minimal Ubuntu environment you can use the create other images for running your containers. If you were to start a container without that, you wouldn't have anything, no /bin/sh, no apt, no libraries, and would have to create every binary and needed libraries to run commands inside the container first.

Are there any limitations regarding the age of a linux distribution which can be used to create a docker base-image?

Im wondering if its possible to use very old Linux Distribution like Debian GNU/Linux 3.1 (Sarge) and create a base-image of it to run legacy code not working under "younger" distros.
Only Thing i found about it was somebody successfully using Ubuntu Feisty: Run old Linux release in a Docker container?
Are there any known limitations?
Your host needs to have a minimal version of the Linux kernel, and that version is 3.10
See
Docker minimum kernel version 3.8.13 or 3.10
extract from the previous link
There's also a shell-script to check if your system has the required dependencies in place and to check which features are available;
https://github.com/docker/docker/blob/master/contrib/check-config.sh
So you can use this to check if you will be able to use docker on this host.
From
https://wiki.debian.org/DebianSarge?action=show&redirect=Sarge
I see
kernel : linux 2.4.27 and 2.6.8
So it may not work

Oracle on lxc in ubuntu

I'm currently trying to install an oracle server (11g) in a linux container on ubuntu (following this tutorial (http://www2.hawaii.edu/~lipyeow/ics321/2014fall/installoracle11g.html).
When I try to change the file handler with sysctl, the modifications doesn't save into my container. Moreover, when I make the modification in the main ubuntu kernel, it propagates to the containers, so my question is as follow:
How can I modify the file handlers only in my oracle container ?
Thanks.
Try out the Orabuntu-LXC project code. It supports Ubuntu 16.04, 17.04, 17.10 and is purpose-built for running Any Oracle on Any Linux, including Ubuntu Linux. Note that as you probably already know, Oracle Corp does not formally support or certify Oracle on Ubuntu Linux.
As far as you question about the file handlers, some sysctl values can only be set at the LXC host level, and some can be set in the container.
https://sites.google.com/site/nandydandyoracle/oracle-rac-in-lxc-linux-containers/oracle-lxc-vlc#TOC-Install-the-etc-sysctl.conf-File-Required-for-Oracle
https://github.com/gstanden/orabuntu-lxc
https://sites.google.com/site/nandydandyoracle/
Please note that the step-by-step guides are quite old and that the basic LXC infrastructure together with OpenvSwitch, an LXC-containerized DNS/DHCP, and an optional SCST Linux SAN can all be installed on Ubuntu 16.04, 17.04 and 17.10 with one command:
./anylinux-services.sh
after completion of which all you would need do is download your Oracle database installtion media and install.

Is there a way to share host (ubuntu) file system with guest (centos 7)?

I am trying to use virsh and domain xml to launch a Centos 7 guest from ubuntu 16.04 LTS host.
The "filesystem" node that i am using in domain xml is as below:
<filesystem type='mount' accessmode='passthrough'>
<driver type='path' wrpolicy='immediate'/>
<source dir='/opt/test'/>
<target dir='testlabel'/>
</filesystem>
With the above config, "testlabel" is not visible in the guest and hence i am not able to mount it. Is there anything that i am missing?
I tried to have 9p modules in guest but they don't seem to be available in centos 7.
I do not want to use network based file sharing like NFS or glusterfs either.
RHEL-7 (and thus CentOS-7) explicitly does not support the 9p filesystem. It is disabled in guest kernel builds and also disabled in QEMU builds for RHEL hosts. The reason is that 9p support in QEMU has been largely unmaintained upstream and the QEMU community doesn't have confidence its is security or performance.
If you want to share filesystem locations, pretty much your only choice is to use a traditional network filesystem, whether NFS, SAMBA, or something tunnelled like SSHFS.
Work is ongoing upstream to support a new technology called virtio-vsock, which will allow running NFS-over-vsock, bypassing the need for networking - think of it as akin to NFS over UNIX sockets. This is not ready for use yet though, so not possible for an Ubuntu/RHEL-7 pair.
Use for the guest (CentOS 7) the kernel from the CentOSPlus repository Wiki CentOSPlus. The CentOSPlus kernel has the 9p file system support build in. You can install the "kernel-plus" kernel with
yum --enablerepo=centosplus install kernel-plus
Start the guest with the "kernel-plus" kernel and
mount -t 9p -o trans=virtio {sharetarget} {mountpoint}
works. I use it this way on CentOS 7 guest systems.

VirtualBox: mounting shared folder fails during start-up, but succeed from shell

Problem description:
When I boot my VirtualBox Guest OS, the mounting of the shared file-system - which is referenced in /etc/fstab - fails.
However, after login - mount -a succeeds.
Details:
The boot process gets stuck here ...
... and pressing s continues the boot process, which finishes.
In the shell, I verify that my shared directory is not mounted:
But now, from the shell, the mount of the shared file-system succeeds:
What should I do to make my mount succeed during start-up?
Environment:
VirtualBox: 4.3.12.r93733
Host OS: Windows 7
Guest OS: Linux ubuntu 3.13.0-32-generic #57~precise1-Ubuntu x86_64 GNU/Linux
/etc/fstab
Relevant lines in /var/log/boot.log
You don't have to mount it, VitrualBox will make it for you. For me,these steps worked on my System (VirtualBox 5.0.10 on Windows 7 and Kubuntu 14.04 guest system):
In VirtualBox, configure your shared folder for your machine under 'Shared Folder'. Pick up the directory on your host system (e.g. D:\shared) and set a name for your guest system (e.g. shared).
Boot the guest system. Now you should have a mounted folder under \media\sf_shared.
Thats all. VirtualBox manages this for you.
You need to install VirtualBox Guest Additions properly and use VirtualBox Manager to specify share folders. The issue happens because the mount point is in place with root permissions. The default mount location is in /media/sf_.
You can change mount point with VBoxControl command. To change the mount point from /media/sf_... to /home/user/sf_... use the command:
sudo VBoxControl guestproperty set /VirtualBox/GuestAdd/SharedFolders/MountDir /home/user/
To check if that's working:
sudo VBoxControl guestproperty get /VirtualBox/GuestAdd/SharedFolders/MountDir

Resources