Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to know the best way to implement the snapshot of root partition "/" on a kvm guest. What I have is as follows

1-

 /dev/vda  ..... 10G free 
-- /dev/vda1      boot partition (ext - 83)
-- /dev/vda2      / parition     (Linux LVM format - 8e)

No space in volume group.

2-

/dev/sda .....  10G free (iscsi drive)
--/dev/sda1     being used for nfs clustered file system

This node is a part of nfs 3 nodes cluster.

My question is to create a space in volume group on this node

  1. Should I increase the size of / (/dev/vda2) -- then pvresize ... then vgextend ....and then create a snapshop of root lvm?

  2. Should I create another lvm partition on iscsi drive (/dev/sda) -- then add it to pvcreate ... then vgextend ..... and then create a snapshot of root lvm?

Many thanks.

share|improve this question

closed as off-topic by Dennis Kaarsemaker, sysadmin1138 Jul 13 '13 at 16:30

  • This question does not appear to be about professional server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
From the help center: You should only ask practical, answerable questions based on actual problems that you face. Interview questions that lack all needed detail are thus off-topic here. –  Dennis Kaarsemaker Jul 13 '13 at 14:04

1 Answer 1

up vote 0 down vote accepted

You say:

/dev/vda2 / parition (LVM)

This is utterly impossible. Either it is a partition created for /, or a partition that is an LVM pv, which you added to a vg, on which you created an lv for /.

I'm guessing it's the latter, based on your other info (in which you get terminology about LVM wrong again and again, but the text is sort of understandable). If the "free space" on /dev/vda is simply unpartitioned space: create a new partition, make it a pv and add it to your vg. Then you can snapshot.

If this is not the case, add the output of the following comands to your question:

fdisk -l
pvs
vgs
lvs
share|improve this answer
    
/dev/vda2 / parition (LVM) ... means Linux LVM file system. So yes this is a partition that is an LVM pv, which you added to a vg, on which you created an lv for /. –  edwin Jul 13 '13 at 13:50
1  
Uhh, that comment makes even less sense than your question... –  Dennis Kaarsemaker Jul 13 '13 at 13:51
    
I have edited the original question. What is making you confused when you say (in which you get terminology about LVM wrong again and again, but the text is sort of understandable)? –  edwin Jul 13 '13 at 13:55
    
You keep misusing LVM terminology, which means vital information is not there. Just run those commands I gave and add the output to your question. –  Dennis Kaarsemaker Jul 13 '13 at 13:57
    
what if we don't have space in /dev/vda? Is it sensible approach to create a partition on iscsi drive and then add to pv and then extend the vg? –  edwin Jul 13 '13 at 13:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.