This is first Part of my RAC lab series guiding me and you step by step in the process of building of a fully usable RAC environment for tests and learning. I need to gather this information in one place as my memory is really shitty, my blog helps me to repeat some activities after few months without digging again in the documentation.
RAC lab Part 1 – Installing the Ubuntu 16.04 desktop
RAC lab Part 2 – Virtualbox installation and configuration
RAC lab Part 3 – VMs configuration
RAC lab Part 4 – Installing the Openfiler software
RAC lab Part 5 – Installing OEL 7.x on VM
RAC lab Part 6 – OEL 7.x configuration for Oracle 12c GI & RAC DB installation
RAC lab Part 7 – Openfilers configuration and cloning
RAC lab Part 8 – OEL 7.x prepare storage
RAC lab Part 9 – Clone first RAC node as 2nd node and prepare config.
RAC lab Part 10 – Installing Grid Infrastructure
RAC lab Part 11 – Installing Database Software
RAC lab Part 12 – Creating a Container Database
Why Ubuntu you might ask?? Well, by accident :), really!!. I had bought Tplink Wifi USB dongle and it wasn’t supported on OEL 7.2 that I used to install everywhere around. I needed to find something else. Ubuntu seems to be the most popular linux desktop distribution in the world. So why not to try??
My plan is to build Virtualbox environment for my RAC laboratory, let’s see how it goes and if it ends up successfully. I hope!!.
First of all, take a look at what my plan is for the LAB.
As I have mentioned, I want to install Virtualbox software on Ubuntu and create Virtual Guests on it. Two guest are going to be dedicated for OpenFiler software. The OpenFiler is a Open Source Storage Management Appliance. In my case it provides iscsi storage by utilizing local storage, it’s working like a storage proxy. I could use local storage of VirtualBox you might say, you could be absolutely right, but I want my configuration to be more enterprise-like. To add more complexity I am gonna leverage two separate OpenFiler servers to be able to use normal redundancy in ASM diskgroups.
Read more about OpenFiler here: http://www.openfiler.com
Having storage infrastructure, I will be able to build Oracle RAC using shared storage presented by OpenFiler servers. I can create as many future RAC nodes as memory accommodates, but in this simple example just 2 will be brought to life. I am gonna install OEL 7.2 as a base OS platform for Oracle Software installation.
VirtualBox infrastructure will provide 3 networks for the guests.
- Storage network for storage iscsi traffic
- Interconnect network for private RAC communication (cache fusion, cluster synchronization, heartbeat)
- Public network for client and admin access
This post includes installation of Ubuntu as a base for VirtualBox. I will try to present more important steps skipping simple ones like time zone settings in gui in example. I will not show exact steps of partitioning process as the real layout on my server is really really complicated (windows partitions interlaced with the linux ones).
I. Ubuntu 16.04 step by step installation
- Download Ubuntu from its official page at https://www.ubuntu.com/
I am not going to build any kind of server services over my Ubuntu machine, so all I need is a desktop version of 16.04 release.Please find the link pointing directly to the iso file below of Ubuntu 16.04 LTS Desktop 64bit:
https://www.ubuntu.com/download/desktop/thank-you?version=16.04.1&architecture=amd64 - Burn bootable USB or DVD
After the file has been downloaded pull UnetBootin software in order to create bootable USB or CD. Please follow the instructions on the tool’s homepage to burn the ISO grabbed in step 1: https://unetbootin.github.io/
- Boot your computer from USB or DVD and follow the steps
- After booting the server/computer you have many options to choose from like disc check etc. Just run Install Ubuntu
- Choose installation language
- If installer detects Wifi adapter it may ask you to provide network credential
It is not necessary, but allows to download OS/packages updates during the installation process - Choose to install additional drivers – I guess it is not required, but wanted to be sure all is in place if any custom hardware exists in my box.
- Choose partitioning schema accordingly to your needs. You can erase all the disks and install ubuntu, or keep the content just installing Ubuntu beside of other OSes like Windows. I have very complicated disk layout so there is no sense in going to deeply into the details. Consider having around 200G for your Virtualbox guests, and 50G for operating system.
- Choose polish keyboard if you like all those ąęśżćół :), or choose any other you like
- Provide details of regular user’s account
- Changing hostname and domain name
If you want to change your hostname and change domain name do the actions in the code below.
First take a peek at how it looks now# To set new server name use hostnamectl tool # It sets hostname dynamically and statically in /etc/hostname maciek@trying ~ $ sudo hostnamectl set-hostname macieksrv # To set domain name # add macieksrv.dba24.pl at the beginning of the second entry in the hosts file maciek@ ~ $ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 macieksrv.dba24.pl macieksrv
Let’s check the effect
Exactly as expected!!
- Setting bash prompt
I really like to know where I am after logging in, if this is production or not. It can be done by adding the following lines at the end of your users’ .bashrc file (in their home dirs).if hostname -f | grep -qE 'tst|dev|pre|uat'; then _ROOT_COLOR=33 # yellow _USER_COLOR=36 # cyan else _ROOT_COLOR=31 # red _USER_COLOR=32 # green fi if [ "`id -u`" -eq 0 ]; then PS1="\[\033[0;${_ROOT_COLOR}m\]\u@$(hostname -f)\[\033[0;34m\] \w #\[\033[00m\] " else PS1="\[\033[0;${_USER_COLOR}m\]\u@$(hostname -f)\[\033[0;34m\] \w $\[\033[00m\] " fi
You can read more about customizing your prompt here:
https://www.digitalocean.com/community/tutorials/how-to-customize-your-bash-prompt-on-a-linux-vpsLet’s see the effects
When server recognized as non-PROD
When server recognized as PROD
- Update Ubuntu after installation
I remember that years ago when I was using debian it was good to update all the packages having new updated versions in the internet repository right after the fresh installation. The update itself was performed by invoking apt-get tool.There are two options available in Ubuntu as described below, I will go with the second one.
upgrade
upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that apt-get knows that new versions of packages are available.dist-upgrade
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a “smart” conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files.First we need to update the our local repo cache with information about any new software versions available
maciek@macieksrv.dba24.pl /etc # sudo apt-get update Hit:1 http://pl.archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://pl.archive.ubuntu.com/ubuntu xenial-updates InRelease [95,7 kB] Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB] Hit:4 http://pl.archive.ubuntu.com/ubuntu xenial-backports InRelease Fetched 190 kB in 5s (34,5 kB/s) Reading package lists... Done
190kB of new information has been fetched now let’s try to dist-upgrade
maciek@macieksrv.dba24.pl /etc # sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: bogofilter bogofilter-bdb bogofilter-common evolution-common libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcryptui0a libevolution libgsl2 libjavascriptcoregtk-3.0-0 libpst4 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libytnef0 seahorse-daemon Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
“The following packages were automatically installed and are no longer required:” is telling me that those packages that were installed due dependency resolution, are no longer required, as the packages that depend on them has been removed or have other dependencies. We can remove them with simple:
maciek@macieksrv.dba24.pl ~ $ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: bogofilter bogofilter-bdb bogofilter-common evolution-common libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcryptui0a libevolution libgsl2 libjavascriptcoregtk-3.0-0 libpst4 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libytnef0 seahorse-daemon 0 upgraded, 0 newly installed, 15 to remove and 0 not upgraded. After this operation, 114 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 215588 files and directories currently installed.) Removing bogofilter (1.2.4+dfsg1-4build1) ... Removing bogofilter-bdb (1.2.4+dfsg1-4build1) ... Removing bogofilter-common (1.2.4+dfsg1-4build1) ... Removing libevolution (3.18.5.2-0ubuntu3) ... Removing evolution-common (3.18.5.2-0ubuntu3) ... Removing libchamplain-gtk-0.12-0:amd64 (0.12.13-1) ... Removing libchamplain-0.12-0:amd64 (0.12.13-1) ... Removing libcryptui0a:amd64 (3.12.2-1) ... Removing libgsl2:amd64 (2.1+dfsg-2) ... Removing libwebkitgtk-3.0-0:amd64 (2.4.11-0ubuntu0.1) ... Removing libjavascriptcoregtk-3.0-0:amd64 (2.4.11-0ubuntu0.1) ... Removing libpst4:amd64 (0.6.59-1ubuntu1) ... Removing libwebkitgtk-3.0-common (2.4.11-0ubuntu0.1) ... Removing libytnef0:amd64 (1.5-9) ... Removing seahorse-daemon (3.12.2-1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for doc-base (0.10.7) ... Processing 6 removed doc-base files... Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Processing triggers for gconf2 (3.2.6-3ubuntu6) ... Processing triggers for libc-bin (2.23-0ubuntu4) ...
Let’s check if all is clean now
maciek@macieksrv.dba24.pl ~ $ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. maciek@macieksrv.dba24.pl ~ $ sudo apt-get check Reading package lists... Done Building dependency tree Reading state information... Done
Yup, it looks fine now.
Just create a place to store your Virtualbox resources as the last step, a leave it to you where you keep it. I prefer meaningful mount points like /vbox-repo1. - Disable IPV6
Since I don’t have plans of using IPv6 addressing in my environment and my ISP doesn’t require it I am going to disable it accordingly to the helpful note:
http://www.binarytides.com/disable-ipv6-ubuntu/
Disabling IPv6 looks differently in different Linux distributions.In my case I will create additional file in /etc/sysctl.d/ called 11-ipv6-disable.conf
and put the lines below inside it. Remember to run sysctl -p /etc/sysctl.d/11-ipv6-disable.conf to enable those changes.maciek@macieksrv.dba24.pl /etc/sysctl.d $ sudo cat /etc/sysctl.d/11-ipv6-disable.conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 # Check if settings enabled maciek@macieksrv.dba24.pl /etc/sysctl.d $ sudo sysctl -a|grep disable_ipv6|grep -v stable sysctl: reading key "net.ipv6.conf.all.stable_secret" sysctl: reading key "net.ipv6.conf.default.stable_secret" sysctl: reading key "net.ipv6.conf.eno1.stable_secret" sysctl: reading key "net.ipv6.conf.lo.stable_secret" sysctl: reading key "net.ipv6.conf.wlx98ded00b5b05.stable_secret" net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.eno1.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.wlx98ded00b5b05.disable_ipv6 = 1 #Check if ipv6 settings disappeared maciek@macieksrv.dba24.pl /etc/sysctl.d $ ip a 1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eno1: <no-carrier,broadcast,multicast,up> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 90:b1:1c:6b:a8:db brd ff:ff:ff:ff:ff:ff 3: wlx98ded00b5b05: <broadcast,multicast,up,lower_up> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 98:de:d0:0b:5b:05 brd ff:ff:ff:ff:ff:ff inet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic wlx98ded00b5b05 valid_lft 66534sec preferred_lft 66534sec
IPv6 disabled successfully!!
- Tune your Ubuntu following 30 simple tips
There are very useful 30 tips on how to improve your Ubuntu Look And Feel and manageability.
Feel free to take what you like most.
http://www.binarytides.com/better-ubuntu-15-10/
Read more about installation and how to use Ubuntu here in this great pdf: http://files.ubuntu-manual.org/manuals/getting-started-with-ubuntu/16.04/en_US/screen/Getting%20Started%20with%20Ubuntu%2016.04.pdf
Extras: Quick LVM tutorial
This part is not directly related to what you might need to build your own environment. As I said before, my disk layout is quite complicated, I got few disks with interlaced partitions and while waiting for new empty SDD disk to come I need to laverage what I got at this moment.
I have prepared two empty partitions both around 111GB one on disk no. 2 (the one and only there) and second on disk no 3. I want to build stripe comprising of those two partitions what is to give me around 220GB of disk space for Virtualbox resources.
Ubuntu desktop in my configuration has no LVM installed so I need to start everything from scratch.
- Install LVM2
maciek@macieksrv.dba24.pl ~ $ sudo apt-get install lvm2 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: dmeventd dmsetup libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5 Suggested packages: thin-provisioning-tools The following NEW packages will be installed: dmeventd dmsetup libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5 lvm2 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 1844 kB of archives. After this operation, 5785 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 libdevmapper-event1.02.1 amd64 2:1.02.110-1ubuntu10 [12,2 kB] Get:2 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 liblvm2cmd2.02 amd64 2.02.133-1ubuntu10 [518 kB] Get:3 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 dmeventd amd64 2:1.02.110-1ubuntu10 [31,3 kB] Get:4 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 dmsetup amd64 2:1.02.110-1ubuntu10 [59,9 kB] Get:5 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 liblvm2app2.2 amd64 2.02.133-1ubuntu10 [392 kB] Get:6 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 libreadline5 amd64 5.2+dfsg-3build1 [99,5 kB] Get:7 http://pl.archive.ubuntu.com/ubuntu xenial/main amd64 lvm2 amd64 2.02.133-1ubuntu10 [731 kB] Fetched 1844 kB in 1s (1603 kB/s) Selecting previously unselected package libdevmapper-event1.02.1:amd64. (Reading database ... 210412 files and directories currently installed.) Preparing to unpack .../libdevmapper-event1.02.1_2%3a1.02.110-1ubuntu10_amd64.deb ... Unpacking libdevmapper-event1.02.1:amd64 (2:1.02.110-1ubuntu10) ... Selecting previously unselected package liblvm2cmd2.02:amd64. Preparing to unpack .../liblvm2cmd2.02_2.02.133-1ubuntu10_amd64.deb ... Unpacking liblvm2cmd2.02:amd64 (2.02.133-1ubuntu10) ... Selecting previously unselected package dmeventd. Preparing to unpack .../dmeventd_2%3a1.02.110-1ubuntu10_amd64.deb ... Unpacking dmeventd (2:1.02.110-1ubuntu10) ... Selecting previously unselected package dmsetup. Preparing to unpack .../dmsetup_2%3a1.02.110-1ubuntu10_amd64.deb ... Unpacking dmsetup (2:1.02.110-1ubuntu10) ... Selecting previously unselected package liblvm2app2.2:amd64. Preparing to unpack .../liblvm2app2.2_2.02.133-1ubuntu10_amd64.deb ... Unpacking liblvm2app2.2:amd64 (2.02.133-1ubuntu10) ... Selecting previously unselected package libreadline5:amd64. Preparing to unpack .../libreadline5_5.2+dfsg-3build1_amd64.deb ... Unpacking libreadline5:amd64 (5.2+dfsg-3build1) ... Selecting previously unselected package lvm2. Preparing to unpack .../lvm2_2.02.133-1ubuntu10_amd64.deb ... Unpacking lvm2 (2.02.133-1ubuntu10) ... Processing triggers for libc-bin (2.23-0ubuntu4) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for systemd (229-4ubuntu11) ... Processing triggers for ureadahead (0.100.0-19) ... ureadahead will be reprofiled on next reboot Setting up libdevmapper-event1.02.1:amd64 (2:1.02.110-1ubuntu10) ... Setting up dmsetup (2:1.02.110-1ubuntu10) ... update-initramfs: deferring update (trigger activated) Setting up liblvm2app2.2:amd64 (2.02.133-1ubuntu10) ... Setting up libreadline5:amd64 (5.2+dfsg-3build1) ... Setting up liblvm2cmd2.02:amd64 (2.02.133-1ubuntu10) ... Setting up dmeventd (2:1.02.110-1ubuntu10) ... Setting up lvm2 (2.02.133-1ubuntu10) ... update-initramfs: deferring update (trigger activated) Processing triggers for libc-bin (2.23-0ubuntu4) ... Processing triggers for initramfs-tools (0.122ubuntu8.5) ... update-initramfs: Generating /boot/initrd.img-4.4.0-45-generic Processing triggers for libc-bin (2.23-0ubuntu4) ... Processing triggers for initramfs-tools (0.122ubuntu8.5) ... update-initramfs: Generating /boot/initrd.img-4.4.0-45-generic Processing triggers for systemd (229-4ubuntu11) ... Processing triggers for ureadahead (0.100.0-19) ...
- Create phisical volumes on the prepared partitions
maciek@macieksrv.dba24.pl ~ $ sudo pvcreate /dev/sdb1 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Physical volume "/dev/sdb1" successfully created maciek@macieksrv.dba24.pl ~ $ sudo pvcreate /dev/sdb1 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Physical volume "/dev/sdb1" successfully created maciek@macieksrv.dba24.pl ~ $ sudo pvdisplay /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. "/dev/sdb1" is a new physical volume of "111,79 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 111,79 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID TwSL5f-lylQ-wsYa-d9XO-z1ys-5EDE-MaOhTK "/dev/sdd7" is a new physical volume of "111,79 GiB" --- NEW Physical volume --- PV Name /dev/sdd7 VG Name PV Size 111,79 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID LJEIaz-wC50-cJNN-VUx6-UUip-5kTs-LQOPHI
As you can see system complains about lvm2-lvmetad not running. I will boot my server now to be sure all is ok after the LVM2 installation, and will check then if lvm2-lvmetad service is running.
So now… let’s reboot it!
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo service lvm2-lvmetad status ● lvm2-lvmetad.service - LVM2 metadata daemon Loaded: loaded (/lib/systemd/system/lvm2-lvmetad.service; disabled; vendor preset: enabled) Active: active (running) since czw 2016-11-03 13:28:14 CET; 5min ago Docs: man:lvmetad(8) Main PID: 330 (lvmetad) CGroup: /system.slice/lvm2-lvmetad.service └─330 /sbin/lvmetad -f maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo pvdisplay "/dev/sdb1" is a new physical volume of "111,79 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 111,79 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID TwSL5f-lylQ-wsYa-d9XO-z1ys-5EDE-MaOhTK "/dev/sdc7" is a new physical volume of "111,79 GiB" --- NEW Physical volume --- PV Name /dev/sdc7 VG Name PV Size 111,79 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID LJEIaz-wC50-cJNN-VUx6-UUip-5kTs-LQOPHI
After the reboot all seems ok. Service is running and pvdisplay show phy volumes without any warnings.
- Create vboxvg diskgroup in LVM
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo vgcreate vboxvg /dev/sdb1 /dev/sdc7 Volume group "vboxvg" successfully created maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo vgdisplay --- Volume group --- VG Name vboxvg System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 223,57 GiB PE Size 4,00 MiB Total PE 57234 Alloc PE / Size 0 / 0 Free PE / Size 57234 / 223,57 GiB VG UUID qLkdm8-Zz9H-d226-1qM4-lWBr-rC23-C7m5rm
- Buil RAID 0 Logical volume called vboxvg-repo1lv in the dg
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo lvcreate -l 100%FREE -i2 -I256 -n vboxvg-repo1lv vboxvg Logical volume "vboxvg-repo1lv" created. maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo lvdisplay --- Logical volume --- LV Path /dev/vboxvg/vboxvg-repo1lv LV Name vboxvg-repo1lv VG Name vboxvg LV UUID vivEKs-DKsy-oS8q-65of-M2hH-1Obe-JA4heX LV Write Access read/write LV Creation host, time macieksrv, 2016-11-03 13:44:59 +0100 LV Status available # open 0 LV Size 223,57 GiB Current LE 57234 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 2048 Block device 252:0
- Format the logical volume with ext4
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo lvcreate -l 100%FREE -i2 -I256 -n vboxvg-repo1lv vboxvg Logical volume "vboxvg-repo1lv" created. maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo lvdisplay --- Logical volume --- LV Path /dev/vboxvg/vboxvg-repo1lv LV Name vboxvg-repo1lv VG Name vboxvg LV UUID vivEKs-DKsy-oS8q-65of-M2hH-1Obe-JA4heX LV Write Access read/write LV Creation host, time macieksrv, 2016-11-03 13:44:59 +0100 LV Status available # open 0 LV Size 223,57 GiB Current LE 57234 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 2048 Block device 252:0
- Prepare and mount filesystem for VB
Create mount point as follows
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo mkdir /vbox-repo1
Retrieve UUID of the newly created logical volume
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo blkid /dev/vboxvg/vboxvg-repo1lv /dev/vboxvg/vboxvg-repo1lv: UUID="6048b7d0-e93d-49f3-b886-f6ffe4975b67" TYPE="ext4"
Add to /etc/fstab the following line
UUID=6048b7d0-e93d-49f3-b886-f6ffe4975b67 /vbox-repo1 ext4 defaults 0 2
Mount and check
maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ sudo mount /vbox-repo1 maciek@macieksrv.dba24.pl /etc/udev/hwdb.d $ df -k Filesystem 1K-blocks Used Available Use% Mounted on udev 16429892 0 16429892 0% /dev tmpfs 3290120 9788 3280332 1% /run /dev/sdc8 135981224 13339012 115711628 11% / tmpfs 16450596 516 16450080 1% /dev/shm tmpfs 5120 4 5116 1% /run/lock tmpfs 16450596 0 16450596 0% /sys/fs/cgroup /dev/sdc5 2958224 109556 2678684 4% /boot tmpfs 3290120 60 3290060 1% /run/user/1000 /dev/mapper/vboxvg-vboxvg--repo1lv 230620308 60624 218821780 1% /vbox-repo1
Sounds fine. Now just bounce your box to check that all is ok!!

About the author

Maciej Tokar
An Oracle technology geek and crazy long distance runner, DBA24 Owner
Senior Oracle DBA / Consultant / [OCP10g, OCP12c, OCE RAC 10g] / [experience: 9y+]
Currently working for Bluegarden (Oslo Norway) by Miratech Group
Past: Mastercard / Trevica by Britenet, Citi International PLC, PZU

