-5

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.

edwin
  • 1
  • 2
  • 1
    From the [help center](http://serverfault.com/help/dont-ask): 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 Answers1

0

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
Dennis Kaarsemaker
  • 18,793
  • 2
  • 43
  • 69
  • /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
  • well I was asked this question in an interview last day, so I am sorry I can not paste the output you asked. Thanks for your time mate – edwin Jul 13 '13 at 14:00
  • Ugh. Read the FAQ, that is entirely off-topic here. – Dennis Kaarsemaker Jul 13 '13 at 14:02