How To Recover and Start A Veritas Volume Manager Logical Volume Where The Volume Is DISABLED ACTIVE and Has A Plex That Is DISABLED RECOVER
How To Recover and Start A Veritas Volume Manager Logical Volume Where The Volume Is DISABLED ACTIVE and Has A Plex That Is DISABLED RECOVER
Plex is a group of sub-disks. Plex can be organized as stripes, mirror and RAIDs. Plexes are used to form volumes. 'vxassist'
command automatically creates plexes while creating volumes. Plex can also be created seperately with 'vxmake' command and
attached to a volume later.
How to recover and start a Veritas Volume Manager logical volume where the volume is DISABLED ACTIVE
and has a plex that is DISABLED RECOVER
When a system encounters a problem with a volume or a plex, or if Veritas Volume Manager (VxVM) has any reason to
believe that the data is not synchronized, VxVM changes the kernel state, KSTATE and state, STATE, of the volume
and its plexes accordingly. The plex state can be stale, empty, nodevice, etc. A particular plex state does not necessarily
mean that the data is good or bad. The plex state is representative of VxVM's perception of the data in a plex.
# vxprint -ht -g testdg
Veritas Volume Manager provides the "vxrecover -g <disk-group-name> -bs" command which is generally used to recover and
start volumes not in an ENABLED state.
1. Change the plex test-01 to the DISABLED STALE state:
# vxmend -g diskgroup fix stale <plex_name>
For example:
# vxmend -g testdg fix stale test-01
This output shows the plex test-01 as DISABLED STALE:
# vxprint -ht -g testdg
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
2. Change the plex test-01 to the DISABLED CLEAN state:
# vxmend -g diskgroup fix clean <plex_name>
For example:
# vxmend -g testdg fix clean test-01
This output shows that the volume test and its plex test-01 are both ENABLED ACTIVE:
# vxprint -ht -g testdg
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH USETYPE PREFPLEX RDPOL
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
4. Mount the volume to its associated mount point (refer to the /etc/vfstab file if the mount point location is not known) if the
file system is a Veritas File System (VxFS) file system:
# mount -F vxfs /dev/vx/dsk/diskgroup/volume /mount point
For example:
# mount -F vxfs /dev/vx/dsk/testdg/test /testvol
The value can be set in /etc/default/vxassist . If there is a reason to implement a particular layout, you can specify layout=mirror-
concat or layout=concat-mirror to implement the desired layout. Specify the -b option if you want to make the volume
immediately available for use.
To create a new mirrored volume
Create a new mirrored volume, using the following command:
# vxassist [-b] [-g diskgroup] make volume length \
layout=mirror [nmirror=number] [init=active]
Specify the -b option if you want to make the volume immediately available for use.
For example, to create the mirrored volume, volmir, in the disk group, mydg, use the following command:
# vxassist -b -g mydg make volmir 5g layout=mirror
The following example shows how to create a volume with 3 mirrors instead of the default of 2 mirrors:
# vxassist -b -g mydg make volmir 5g layout=mirror nmirror=3
2. To determine regions of total free space for a specific imported disk group, type:
# vxdg -g <disk group> free
When querying the system to determine how much space will be available for a particular volume, it is crucial you
specify the volume layout for the type of volume you are going to create:
Example
Using the following disk group " tdg" (Each LUN is 2G insize):
The vxassist " maxsize" argument allows you to determine the maximum volume size you could create for specified
diskgroup "tdg":
# vxassist -g tdg maxsize
Maximum volume size: 12472320(6090Mb)
NOTE: The maxsize operation will use the default concatenated (concat) layout by default to establish the maximum
volume size.
The available size has changed for the above example from 6090Mb (concat layout) to 4060Mb for the striped volume
layout. The default stripe column count is 2 columns, when no column count is specified.
The "maxgrow" command can be used to determine how much space can be added to an existing volume. This
command respects volume layout device restrictions.
Example Section:
To determine how much space is left available for a concat volume (total free space in disk group):
# vxassist -g tdg maxsize
Maximum volume size: 10424320(5090Mb)
To determine how much space is left available for a new 2 column stripe volume:
# vxassist -g tdg maxsize layout=striped ncols=2
Maximum volume size: 6948864(3393Mb)
2 nodes configured
2 resources configured
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
Once we’ve finished whatever activity required us to move the resources to pcmk-1 (in our case nothing), we can then
allow the cluster to resume normal operation by removing the new constraint. Due to our first location constraint and our
default stickiness, the resources will remain on pcmk-1.
We will use the pcs resource clear command, which removes all temporary constraints previously created by pcs
resource move or pcs resource ban.
[root@pcmk-1 ~]# pcs resource clear WebSite
[root@pcmk-1 ~]# pcs constraint
Location Constraints:
Resource: WebSite
Enabled on: pcmk-1 (score:50)
Ordering Constraints:
start ClusterIP then start WebSite (kind:Mandatory)
Colocation Constraints:
WebSite with ClusterIP (score:INFINITY)
Ticket Constraints:
Note that the INFINITY location constraint is now gone. If we check the cluster status, we can also see that (as expected)
the resources are still active on pcmk-1.
[root@pcmk-1 ~]# pcs status
Cluster name: mycluster
Stack: corosync
Current DC: pcmk-2 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum
Last updated: Mon Sep 10 17:31:47 2018
Last change: Mon Sep 10 17:31:04 2018 by root via crm_resource on pcmk-1
2 nodes configured
2 resources configured
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
What are the logical Steps to Install Red Hat satellite Server 6.2 ?
Ans: Following are the logical Steps:
a) Register Your RHEL 6.x / 7.x Server to Red Hat Network and attach Satellite subscription to it
b) Install the satellite package using below command
# yum install satellite
c) Install the satellite Server using below command
# Satellite-installer --foreman-admin-username admin --foreman-admin-password {Enter_Password}
d) Generate the Manifest for Satellite server from Red Hat Portal and upload it to your satellite Server.
e) Sync the Repositories based on your requirement and Create Contents views and Life cycle environment.
f) Start Registering the RHEL systems using the Activation Keys.
How to retrieve Satellite Server admin password in case you have forgotten ?
Ans: To get the new password for admin user, run the beneath command
# foreman-rake permission:reset
what are the different ways to register RHEL machine to Satellite Server for patching ?
Ans: There are two ways to register RHEL machine to satellite server
a) Use the username and password in subscription-manager command like,
subscription-manager register –username {user} --password {password}
b) Using the activation keys we can also register RHEL server to satellite, like
subscription-manager subscription-manager register --org="Test" --activationkey="RHEL7-Test"
If you have a location of a package available via a URL, you can point RPM to update it for you. This image shows the
update, the confirmation, and the removal of the livna-release-6-1 package.
In a perfect world, once you run the rpm command, you’re done in a moment or two. Confirmation may be a short
message provided by the package installation, or you just get a command prompt ready for your next Linux command.
However, since we don’t live in a perfect world, things can get a little confusing. You may run into a dependency issue
where another package on your machine has to be updated before you can update your target program.
linux rpm
A failed RPM installation will generate the above message and not continue the install.
Things can get worse when you realize that these packages that need updates also require further updates themselves,
turning a simple upgrade into a longer exercise of having to figure out how to deal with all these dependencies and sub-
dependencies.
Rollback patch
Step 1: Boot from the old kernel.
[root@linuxunix ~]# uptime
16:34:24 up 8 min, 1 user, load average: 0.08, 0.08, 0.06
[root@linuxunix ~]# uname -a
Linux linuxunix 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64
GNU/Linux
[root@linuxunix ~]#
Step 2: Now run the yum history command to view a history of previous yum activities.
[root@linuxunix ~]# yum history
Loaded plugins: fastestmirror, security
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
18 | root <root> | 2017-10-28 16:00 | I, U | 287 E<
17 | root <root> | 2017-05-16 04:38 | Install | 1 ><
We are interested in transaction id number 18. This is the latest one which altered 287 packages. This is the transaction
id for our yum update command.
We view more information about this transaction by typing yum history info <id>
[root@linuxunix ~]# yum history info 18
Loaded plugins: fastestmirror, security
Transaction ID : 18
Step 3: Now, we will rollback this transaction via the yum history undo command.
[root@linuxunix ~]# yum history undo 18
Loaded plugins: fastestmirror, security
Once this completes we take a look at the /etc/grub.conf file.
[root@linuxunix ~]# grep -v ^# /etc/grub.conf
default=0
timeout=5
The entries for the new kernel have been removed.
But the entry in /etc/redhat-release file will not be updated automatically. We’ll need to do it manually.
Step 4: Once the rollback operation completes it’s highly recommended that you reboot the system. Now when we
reboot the system and interrupt the boot process we find that only the original kernel is now available to boot from.
Once the system boots, we can run the uname -a command to verify that the system is running on the old kernel.
[root@linuxunix ~]# uname -a
Linux linuxunix 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64
GNU/Linux
[root@linuxunix ~]# date
Sat Oct 28 17:46:26 IST 2017
Let’s run the ‘yum history’ command again to view information on our rollback task:
[root@linuxunix ~]# yum history
Loaded plugins: fastestmirror, security
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
19 | root <root> | 2017-10-28 16:43 | D, E | 15 EE
18 | root <root> | 2017-10-28 16:00 | I, U | 287 E<
17 | root <root> | 2017-05-16 04:38 | Install | 1 ><
Ext2
Ext3
Ext4
XFS
The XFS file system is an extension of the extent file system .XFS is a high performance 64 bit journaling file system .Support of
XFS
was merged into the linux kernel in around 2002 and In 2009 Red Hat Enterprise Linux version 5.4 usage of XFS file system .
Now RHEL 7.0 uses XFS as the default file system .
XFS supports maximum file system size of 8 exbibytes for 64 bit file system .Some comparison of XFS file system is XFS file
system cannot be shrunk and poor performance with
deletions of large numbers of files.
32-bit system 64-bit system
File size: 16 Terabytes 16 Exabytes
File system: 16 Terabytes 18 Exabytes