Of late I've been doing more and more stuff on Azure and have been considering setting up a separate blog on that - however I've decided this is all part of DBA 2.0 so i'll leave it all here. Even if you aren't sucked into the cloud yet it's useful to know this stuff as it's the way the whole IT world is going (be that for bad or good I'm still not sure).
Anyway this entry is about 'Azure file services' and making a file share available on an OEL box - there is good documentation already about how to set these up for other linux flavours (and of course windows) - but nothing covers OEL - and actually the out of the box image available on Azure does not work.....
This is the main microsoft note on the topic and most of it is largely true for OEL too
https://azure.microsoft.com/en-gb/documentation/articles/storage-how-to-use-files-linux/
You can follow the steps pretty much exactly as they are there for OEL - i personally found it a little confusing when they refer to the 'myaccountname' part - that actually means the storage account name not your top level azure account name - i.e. its something like 'mystorageaccount' rather than 'user@outlook.com'.
If you follow that note through you'll find that when you try and mount of the file share via this command
mount -t cifs //storageacountnamehere.file.core.windows.net/filesharenamehere --verbose -o vers=3.0,username=storageaccountnamehere,password=secretkey from account setting here
You get this message
mount.cifs kernel mount options: ip=x.x.x.x,unc=\\storageaccountnamehere.file.core.windows.net\oraclebackupfileshare,vers=3.0,user=storageaccountnamehere,pass=********
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.ifs)
After much investigation i found something that suggested the problem was kernel related and that i should switch to a different one - which i duly did
I followed this note from Oracle which explains how to switch the kernel that is booted
After doing that the mount command worked and i could create files OK with that and all seemed well until i tried to create a file that was >4GB - at this point it failed with the message 'file too large'.
This again (after much research) appeared to be a kernel problem - something was making something behave in a 32bit way and not accepting large files.
At this point i realised i had not chosen the latest kernel available so tried switching to that one (so repeat the process above and choose the correct one).
After switching to that kernel i'm happy to say that it all mounts fine and it happily accepts large files - job done!
For reference for anyone else trying this - these are the list of available kernels in the OEL default image (well current anyway - it changes regularly i think)
menuentry 'Oracle Linux Server (3.10.0-327.10.1.el7.x86_64 with Linux) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.10.1.el7.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (3.10.0-123.13.1.el7.x86_64 with Linux) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.13.1.el7.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (3.10.0-123.8.1.el7.x86_64 with Linux) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.8.1.el7.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (3.8.13-118.4.1.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.8.13-118.4.1.el7uek.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (3.8.13-55.1.1.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.8.13-55.1.1.el7uek.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (3.8.13-44.1.1.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.8.13-44.1.1.el7uek.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
menuentry 'Oracle Linux Server (0-rescue-3a7dd7bf00dc432fbb046798cab6a1de with Linux) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-3a7dd7bf00dc432fbb046798cab6a1de-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
The default one it boots into without changing anything is the 4th one down (3 in the boot loader as it start at 0 )
The one that works properly for ifs fileshares is entry 0 right at the top - so for the avoidance of any doubt - this one:
menuentry 'Oracle Linux Server (3.10.0-327.10.1.el7.x86_64 with Linux) 7.2' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.10.1.el7.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
Once it is working you see it quite happily in the df -k output (example below) and you can write files as big as you like (well supposed Azure limit of 1TB).
root# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 28263204 2836468 23968000 11% /
devtmpfs 7172904 0 7172904 0% /dev
tmpfs 7180880 0 7180880 0% /dev/shm
tmpfs 7180880 8592 7172288 1% /run
tmpfs 7180880 0 7180880 0% /sys/fs/cgroup
/dev/sda3 1998672 40368 1837064 3% /tmp
/dev/sda1 487634 178068 279870 39% /boot
/dev/sdd1 264090692 4752288 245900300 2% /fra
/dev/sde1 264090692 61464 250591124 1% /orabackup
/dev/sdc1 264090692 50121732 200530856 20% /oracle
//xxx.file.core.windows.net/xxfileshare 536870912 4096896 532774016 1% /fileshare
I'm looking at this by the way to try and determine the best way to handle oracle backups in Azure - there is no native library for rman to allow direct to azure storage backups (something that does exist for oracle cloud and Amazon). I guess something may be in the pipeline here but at the moment I'm working on alternatives - i'll report back when I've decided what i think is the best solution.
perfect. worked. I was on 7.3 so the option to choose was: [root@UGCL0053 etc]# grep '^menuentry' /boot/grub2/grub.cfg
ReplyDeletemenuentry 'Oracle Linux Server, with Linux 3.10.0-123.13.1.el7.x86_64' --class oracle --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.13.1.el7.x86_64-advanced-015d3b46-7448-464e-abbf-9f8c0bd946b3' {
After a reboot of the system worked fine. Many thanks!