Linux volume management downtime repair Tour

Source: Internet
Author: User
The Linux volume management downtime recovery company recently recruited a DBA, which is definitely called a rare one in a hundred years. let's refer to it as a wonderful one! The director is very keen on and looks forward to him, so he specified the wonderful solution to implement the three-phase database resizing. Next I will share with you how to perform O & M )... information Linux volume management downtime recovery company recently recruited a DBA, which is definitely called a rare one in a hundred years. let's refer to it as a wonderful one! The director is very keen on and looks forward to him, so he specified the wonderful solution to implement the three-phase database resizing. Next, let's share some of the hard work between O & M (me) and the wonderful work of the company ~ Don't laugh! 555 ~ Www.2cto.com was rejected by me when I first arrived at the company and asked me for a production system account the next day. I said I could test the database server in the environment for you first, first, you should study and get familiar with production. Relying on it, the director turned to complain to me. The director asked me to give him an account to let him go to the real environment. Kao really had a background. I held back my anger and told the director that if the system fails, the responsible person will take responsibility. Besides, the current testing environment is consistent with the production environment. I recommend that you first familiarize yourself with the environment in the test and then start production. In the end, a test environment was created. I tried to connect to the database, but I didn't know what client connection I was using. (555 is not playing with me ~ I had to send the mysql client to him ). After connecting to Qihoo, I asked where the configuration file of the database on my server is stored (555 ~ For the second time ). The following is the question: the third-phase database expansion of Qihoo is said to have used google's mmm technology. The nightmare started. he asked me about the server resources. I asked him about the server configuration parameter list ?, Q: No. What are the requirements of the system? Q: No. What are the requirements for system partitions? Answer: none. Well, I had to allocate the three dell R720 servers that the company just purchased with better performance to him based on my own considerations (the third time I was speechless ). Www.2cto.com initially put the database directly under the root directory. I told him that you could put the data storage path in a logical volume and not put it with the System program to avoid maintenance difficulties in the future. In addition, I have already created the logical volume named/data. The current capacity is GB and can be scaled as required. An amazing saying goes, "Can you create a volume with the specified name for me? The name of your volume is prone to ambiguity. Let me talk about it ~ You want to mail me a name ~ After a while, he sent me QQ and said "database". (for the fourth time, when there is no language, cao adds the base word and plays with me )! By the way, after installing the database, I told me that the database could not be remotely connected. I boarded the database and checked that he had not authorized remote access after installing the database. Ah, that sweat (the fifth time I was speechless )! The real nightmare started! The following are the detailed steps to solve the problem when adjusting the logical volume (555 ): 1. unmount the logical volume umount/data2, display the detailed path of the logical volume to be deleted lvdisplay3, delete the logical volume lvremove/dev/VolGroup00/LogVol074, create the mount point/database4, and confirm the volume Group's free space [root @ localhost/] # vgs VG # PV # LV # SN Attr VSize VFree VolGroup00 1 2 0 wz -- n-1.09 T 594.94G5, create logical volume lvcreate-L 100G -n fzhlv VolGroup006: format the logical volume mkfs. ext3/dev/VolGroup00/fzhlv (use lvdisplay in absolute path) 7. mount the logical volume [root @ localhost ~] # Mount/dev/VolGroup00/fzhlv/database/OK! It can be used when mounting ~ When the system fails to start when the server is restarted, the following error message is displayed: an error occurred during the filesystem checkPropping you to shell the system will rebootwance you leave the shellGive root password for mantennance reports An error because I deleted the mount point/data logical volume and caused the startup the system cannot start because the volume fails to be mounted (555, it took me more than two hours to solve this problem ). Go to rescue mode www.2cto.com and modify fstabvi/mnt/sysimage/etc/fstab/dev/VolGroup00/LogVol06/ext3 defaults 1/dev/VolGroup00/LogVol07/data ext3 defaults 1 2/dev/ volGroup00/LogVol02/tmp ext3 defaults 1 2/dev/VolGroup00/LogVol05/opt ext3 defaults 1 2/dev/VolGroup00/LogVol04/var ext3 defaults 1 2/dev/VolGroup00/LogVol03/ usr ext3 defaults 1 2/dev/VolGroup00/LogVol00/home ext3 defaults 1 2 LABEL =/boot ex T3 defaults 1 2 tmpfs/dev/shm tmpfs defaults 0 0 devpts/dev/pts devpts gid = 5, mode = 620 0 0 sysfs/sys sysfs defaults 0 0 0 proc/proc defaults 0 0/dev/VolGroup00/LogVol01 swap defaults 0 0 the logical volume that will be deleted or does not exist comment out the partition, save and exit, and restart the service to solve the problem. Field of View expansion 1. extend a logical volume to a specified size # lvextend-L12G/dev/VolGroup00/fzhlv # at this time, df-lh is used, but your file system is not increased because the file system has not been adjusted so after the capacity of the logical volume is increased, you need to modify the file system size to use the expanded space. We recommend that you use the reiserfs file system to replace ext2 or ext3. Therefore, we will only discuss the reiserfs situation here. The Reiserfs file tool provides the file system size adjustment tool: resize_reiserfs. To adjust the size of the file system to be loaded: # resize_reiserfs-f/dev/VolGroup00/fzhlv it is recommended that you uninstall the file system, resize the file system, and then load the file.
Related Article

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.