The logical volume manager. Inconspicuous, unassuming but could quite honestly be one of the most integral parts of the linux OS. For those who have not really cared or taken much notice about the finer points of LVM, then this blog post may change your mind.
LVM can be used in a multitude of ways some of them being -
- Provide data protection by way or mirroring volumes
- Provide increased I/O performance by way of striping across volumes
- Ability to resize and reshape volumes on the fly
- Provide backup utilities using snapshots
These are a just a few of the benefits of understanding more about LVM. My experience in particular was to create GPT partitions on 22 SAN attached LUNS without losing my data. My LVM metadata was written directly on the LUN rather than a partition on the LUN so I had the problem of now trying to create the partition which required the first 34 sectors which would overwrite the LVM metadata which was situated at the first 4 sectors. Dilemma.
Each LUN was in it's own volume group and the logical volume that the file system sits on, was within that volume group. So the solution here was to add another physical volume to the volume group with the vgextend command and remove the existing one so I could then do what I want with it. It can immediately be seen how this may be benificial to other problems. For example if the problem was to replace the existing disks with bigger or faster disks, then the same methodology would also be relevant.
I now have 2 physical volumes in my volume group and using the pvmove command I could move the extents off the volume I so wish. One piece of advice here though is that this can be extremely time consuming, so it is a good idea to reduce the file system to not much bigger than what is absolutely necessary and in turn reduce the size of the logical volume.
Once the pvmove command is complete, the vgreduce -a command can be executed to remove the physical volume from the volume group. If the physical volume is still in use, vgreduce will inform you that ir is so and therefore will not trash your VG. It is always a good idea anyway to use the -t option (test).
Now that all the extents have been moved to the replacement disk, the old disk can be removed with the pvremove command and then what ever is required to be done with the disk/s can be done. To put back all that needs to be done is the reverse of the process - pvcreate, vgextend to add the disk again and then pvmove the subsitute disk.
Don't forget to lvresize and resize2fs back to the way it was after your done!
Another handy little tip is to keep copies of your /etc/lvm/archive and /etc/lvm/backup directories. Should for any reason you lose the lvm metadata on your physical volumes, then your going to need the above to piece everything back together.
- bonobo_slr's blog
- Login or register to post comments
Quorum Problems with a Non-Root Volume Group
If you attempt to activate a non-root volume group when not enough disks and backup are present to establish a quorum, you will see error messages similar to those in this example: vgchange -a y /dev/vg01 vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c1t0d2":The path of the physical volume refers to a device that does notexist, or is not configured into the kernel. vgchange: Couldn't activate volume group "/dev/vg01":Either no physical volumes are attached or no valid VGDAs were foundon the physical volumes. If a non-root volume group does not get activated because of a failure to meet quorum, try the following: Check the power and data connections of all the disks that are part of the volume group that you cannot activate. Return all disks (or, at least enough to make a quorum) to service. Then, use the vgchange command to try to activate the volume group again. If there is no other way to make a quorum available, the -q option to the vgchange command will override the quorum check. EXAMPLE: vgchange -a y -q n /dev/vg01 CAUTION: This will activate the volume group but a quorum will not be present. You might get messages about not being able to access logical volumes. This is because some or all of a logical volume might be located on one of the disks that is not present. Whenever you override a quorum requirement, you run the risk of using data that is not current. Be sure to check the data on the logical volumes in the activated volume group as well as the size and locations of the logical volumes to ensure that they are up-to-date. You should attempt to return the disabled disks to the volume group as soon as possible. When you return a disk to service that was not online when you originally activated the volume group, use the activation command again to attach the now accessible disks to the volume group. EXAMPLE: vgchange -a y /dev/vg01
Reply
This war will not end today,
This war will not end today, or tomorrow, or acceptable for decades to come, if ever E20-520. But so continued as we advance aback adjoin those who seek to yield abroad our freedoms HP0-D03, and action the acceptable fight, we will win victories that will accord us the freedoms we deserve and desire HP0-D04. We have to never become complacent. Software and media abandon is for everyone, and it is a appropriate and a abandon we should never, anytime yield for granted.
Global lessons 2009" - which
Global lessons 2009" - which has lots of ideas about how schools can mark the International Day of Peace - or indeed make peace a focus on another day. hoardings design | billboard design | outdoor media banner design
fact, we all need to declear
To put back all that needs to
To put back all that needs to be done is the reverse of the process - pvcreate, vgextend to add the disk again and then pvmove the subsitute disk.
<a href="http://www.questia.com/questialibraryplus">Book App</a>
LVM is a logical volume
Wish I have the luxury of
Wish I have the luxury of time to consider using the benefits these site can offer..... 5.11 boots
if installed - will be
Web Design
The main focus of the 2010 release is to improve the user experience for daily tasks. In a blog posting, VP of Engineering at Mandriva – Anne Nicolas-Velu, provided an overview of the new features included in the development release and the current list of 2010 specifications. Web Design SEO Company SEO Expert
valuable information.
Exllent post.
To put back all that needs to
To put back all that needs to be done is the reverse of the process - pvcreate, vgextend to add the disk again and then pvmove the subsitute disk.
<a href="http://www.vanreviews.com/">Van Reviews</a>()<a href="http://www.bestecigarettesreview.com/">Electronic Cigarette</a>
mobile dispatch
hi admin, i like your logical post read every line but topic is interesting new for me .hope to see more interesting and knowledgeable topics in future .anyways great work.
<a href="http://www.bizspeed.com/products/goroamdelivery/">mobile dispatch</a>
Great post, thank you for
The solution here was to add
The solution here was to add another physical volume to the volume group with the vgextend command and remove the existing one. Thanks for sharing. Regards, mi car insurance
These are a just a few of the
These are a just a few of the benefits of understanding more about LVM. My experience in particular was to create GPT partitions on 22 SAN attached LUNS without losing my data. Thanks. Regards, cheap auto insurance
Discounted UK Tiffany
mbt shoes
Many people have been choose a pair of shoes, suit oneself to let his own feet comfortable, but now this pair of shoes, that is, it is a pair of mbt shoesboth healthy and good wear shoes, you want to ask where I can buy? Doesn’t worry about it, now in many mbt shoes sale think you can buy, with good shoes, this is to find a good Chanel bag, and that is, I'm sure you'll like this bag, because this is the best?
Swiss replica handbags watch
Has a louis vuitton beautiful
http://www.butterry.com
I love hermes birkin is what nike shoes for me. In my opinion, I always believe that Abercrombie and Fitch is the top choice. grils who want to dress themselves natural and temperament, we all should choice unique design and simple style hermes bag, then If you are worried about which gift you sent to your friend, abercrombie clothing can reduce your troubles.
http://www.vibrambazaar.com
“ Whilst most diners nodded
“ Whilst most diners nodded replica watches in appreciation of the great wine, fake watches one of them protested its fake rolex authenticity. He was from the estate and declared that replica rolex the wine was not what was purported on the label. breitling It was a Petrus but from a lesser vintage (that of course cost less).
But unless one drank Petrus
In case we thought that
Women in summer would like to
replicahandbags
The important features of the manufacturing specialties include:1. Placement of small Zirconia diamonds at the hours and minutes marker.2. Crystal sapphire Alain Silberstein for sale glass at the top is free from all scratches. It adds sparkling beauty to these Christian Dior watches.3. Complete waterproof4. Presence of the luminescent markers makes these Breitling replica dazzle even at the darkest part of the night.5. The stainless steel case is another feature of these croum replica. The case is very heavy, dependable, and strong. It protects the machine place inside it.All occasion IWC for sale:The Hermes replica is called an “all time and all-occasion” movado watches.
hp laptop ac adapter
I want to make her take a
I want to make her take a rest. And links of london I want to grow up. I can not be the child and the baby. Nobody can accompany you for ever. This is a true principle. I want to have myself business. I want to set up links of london jewellery a store. The links of london rings name is Links of London store. I want to devise Links of London necklace, Links of London ring, Links of London bracelet and Links of London charm
mbt shoes
Welcome to buy Supra Shoes,
Links of London Jewellery Let Me Knowing That He is only my frie
Bovet still buy hublot