Solution to inactive problem after LVM partition restart in Linux

Source: Internet
Author: User
Tags mongodb postgresql redis uuid


Today engineering side of the brother feedback a problem, LVM partition after the installation completed reboot found unable to mount and identify, host environment for SLSE11 SP3. By viewing and processing, the results are now recorded.



First, online solution


1. View LV information through Lvscan


The code is as follows
111cn.net:~ # Lvscan inactive '/dev/vgteas/lvteasdata ' [2.72 TiB] Inherit


The discovery of LV information is inactive state.



2, activate the volume group by Vgchange and reboot the Mount


The code is as follows
111cn.net:~ # vgchange-a y vgteas
1 Logical volume (s) in volume Group "Vgteas" now active
111cn.net:~ # DF-HP
FileSystem Size Used Avail use% mounted on
/DEV/CCISS/C0D0P5 40G 920M 37G 3%/
Udev 63G 188K 63G 1%/dev
Tmpfs 63G 72K 63G 1%/DEV/SHM
/dev/cciss/c0d0p1 9.9G 186M 9.2G 2%/boot
/DEV/CCISS/C0D0P9 38G 9.9G 26G 28%/home
/DEV/CCISS/C0D0P12 259G 772M 245G 1%/onip/teastore
/DEV/CCISS/C0D0P11 99G 1.2G 93G 2%/teasredo
111cn.net:~ # Mount-a
111cn.net:~ # DF-HP
FileSystem Size Used Avail use% mounted on
/DEV/CCISS/C0D0P5 40G 920M 37G 3%/
Udev 63G 188K 63G 1%/dev
Tmpfs 63G 72K 63G 1%/DEV/SHM
/dev/cciss/c0d0p1 9.9G 186M 9.2G 2%/boot
/DEV/CCISS/C0D0P9 38G 9.9G 26G 28%/home
/DEV/CCISS/C0D0P12 259G 772M 245G 1%/onip/teastore
/DEV/CCISS/C0D0P11 99G 1.2G 93G 2%/teasredo
/dev/mapper/vgteas-lvteasdata 2.7T 202M 2.6T 1%/teasdata


The discovery partition can be hung up again.



Second, evade the method


(1) Set the BOOT.LVM boot from start



The LVM is "inactive" on the reboot after installation to avoid recurrence of the problem, which can be from the following two ways:



1, see if the BOOT.LVM service defaults with system load


The code is as follows
111cn.net:~ #/ETC/INIT.D/BOOT.LVM Status
Unknown
111cn.net:~ # chkconfig--list|grep LVM
Lvm_wait_merge_snapshot 0:off 1:on 2:off 3:off 4:off 5:off 6:off s:on


See the state is Unknow, that is, there is no random start, here need to pay attention to the direct chkconfig--list is not directly to see the BOOT.LVM service.



2, set up BOOT.LVM service boot


The code is as follows
111cn.net:~ # chkconfig BOOT.LVM
BOOT.LVM off
111cn.net:~ # chkconfig BOOT.LVM on



3. Start BOOT.LVM Service


The code is as follows
111cn.net:~ #/ ETC/INIT.D/BOOT.LVM start
Waiting for Udev to settle ...
Scanning for LVM volume groups ...
  Reading All physical volumes.  This may take a while ...
  Found Volume Group "vgteas" using metadata type LVM2
activating LVM volume groups ...
  PARTIAL MODE. Incomplete logical volumes would be processed.
  1 Logical Volume (s) in volume Group "Vgteas" now active
                              



When you start, you can find that the Vgteas volume group is automatically found here.



4, with Redhat slightly different is that under the SuSE part of the service under the RCX.D (x 0-6) run level without some system-related services. This part of the service can be found in the/ETC/INIT.D directory, but its control is loaded in the/ETC/INIT.D/BOOT.D directory.


The code is as follows
111cn.net:~ # LS/ETC/RC.D/BOOT.D
K01boot.compliance k01boot.klog k01boot.udev_retry k04boot.localfs s02boot.rootfsck S13boot.fuse S14boot.ldconfig S17boot.kdump
K01boot.cycle k01boot.ldconfig k02boot.cleanup k06boot.rootfsck s03boot.clock s13boot.klog S14boot.quota
K01boot.debugfs k01boot.lvm_monitor k02boot.clock k08boot.device-mapper s04boot.device-mapper S13boot.lvm_mo Nitor S14boot.sysctl
K01boot.efivars k01boot.proc k02boot.loadmodules K09boot.udev s04boot.loadmodules S13boot.proc S15boot.cleanup
K01boot.fuse K01boot.quota k02boot.localnet S01boot.debugfs s10boot.localfs s13boot.scpm S15boot.ipconfig
K01boot.ipconfig k01boot.scpm k02boot.swap s01boot.efivars s12boot.compliance S13boot.swap S16boot.apparmor
K01boot.kdump k01boot.sysctl k03boot.apparmor S01boot.udev s13boot.cycle s13boot.udev_r Etry s16boot.localnet


(2) Modify the LVM default configuration file



The following is the default configuration for the LVM configuration file

The code is as follows
111cn.net:~ # CAT/ETC/SYSCONFIG/LVM
# # Path:system/file SYSTEMS/LVM
# # DESCRIPTION:LVM Configuration
# # Type:string
# # Default: ""
#
# This variable allows to only activate the LVM volume groups listed at
# bootup. If It is empty, all LVM volume groups are activated at bootup.
# This variable needs setting only under very special.
# for almost all standard LVM installations it can safely stay empty.
#
Lvm_vgs_activated_on_boot= ""
# # Path:system/file SYSTEMS/LVM
# # DESCRIPTION:LVM Configuration
# # Type:string
# # Default: "Disable"
#
# This variable allows newly discovered VG to be activated automatically
# via Udev rules. Set to ' enable ' to turn this feature.
#
lvm_activated_on_discovered= "Disable"


From the note above, the second parameter is set to enable to automatically discover some newly created LVM partitions and set them to active state, where the above disable is changed to enable.


The code is as follows
111cn.net:~ # sed-i ' s/lvm_activated_on_discovered= ' disable '/lvm_activated_on_discovered= ' Enable '/g '/etc/ Sysconfig/lvm



Third. other possible causes and references

Some other reasons are also found on the Internet that may cause the above situation to occur.


Situation 1:uuid Repeat



Problem (Abstract)
If a disk with Logical Volume Manager (LVM) on it are mounted to the original machine with the same disk, one or more dupli Cate Universal Unique Identifiers (UUID) are created
Refer to the technical article on the IBM site, which appears to be a bug on some versions, such as REDHAT5.





Scenario 2: Installation is not using the default installation, causing no boot load

The system is not installed through the Defualt installer, instead bootstrapped
Through Zypper and then installed additional patterns through YaST and might be
The cause the LVM not loading;



Refer to the documentation on openSUSE.


The situation here 2, personal understanding should be due to the BOOT.LVM service does not boot since the reason, because the level is limited, did not understand openSUSE this reference page on the last part of the meaning to express.


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.