Pokazywanie postów oznaczonych etykietą lvm. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą lvm. Pokaż wszystkie posty

czwartek, 13 lutego 2014

LVM - manage

http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/

W skrócie

Nowy dysk
fdisk /dev/sdq
n
p
1
t 8e
w
-
pvcreate /dev/sdq1

vgdisplay
vgextend vgpool /dev/sdq1

lvextend -L+10G /dev/lvpool/root      ....  plus 10GB
lvextend -l +100%FREE /dev/lvpool/root   ..... cale wolne miejsce
resize2fs /dev/lvpool/root


In our previous article we told you what LVM is and what you may want to use it for, and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation.
As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID.
To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools.
Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following:
  • Physical Volume = pv
  • Volume Group = vg
  • Logical Volume = lv

wtorek, 7 maja 2013

LVM Attributes

http://www.tcpdump.com/kb/os/linux/lvm-attributes/intro.html


LVM AttributesPDFPrintE-mail

 
(10 votes, average 4.80 out of 5)
Written by Tom Hirt   
Thursday, 21 May 2009 19:30
Article Index
LVM Attributes
Volume Group Attributes
Physical Volume Attributes
All Pages

Attributes Overview


In this KB, we will explorer LVM display attributes.  The LVM display attributes will help provide some insight into the status of your logical volumes and assist with determine if they are functioning correctly.

Logical Volume Attributes (lv_attr)


The lvs display attributes or lv_attr provide details into the status of the logical volume.  These attributes will help you determine if your volume / mirror / snap is online and functioning correctly.  We have include a diagram and table of this information for your convenience.

lv_attr Diagram:

lvs attr

lv_attr Table:

[root@Linux01 ~]# lvs
LVVGAttrLSizeOriginSnap%MoveLogCopy%Convert
LogVol00VolGroup00-wi-ao1.00G
[root@Linux01 ~]#


Bit #1
  • (m)irrored
  • (M)irrored without initial sync
  • (o)rigin
  • (p)vmove
  • (s)napshot
  • (S)napshot invalid
  • (v)irtual
  • (i)mage mirror
  • (I)mage out-of-sync
  • (c)onversion in progress
Bit #2
  • (w)riteable
  • (r)ead-only
Bit #3
  • (c)ontiguous
  • (n)ormal
  • c(l)ing
  • (a)nywhere
  • (i)nherited
Bit #4
  • (m)inor
Bit #5
  • (a)ctive
  • (s)uspended
  • (I)nvalid snapshot
  • (S)uspended snapshot
  • (d)evice present without tables
  • (i)nactive table on present device
Bit #6
  • (o)pen 

From the above examples, we can see the lv_attr of '-wi-ao' tells us this logical volumes is:
  • Writeable
  • Inherited
  • Active
  • Open (mounted)

środa, 6 czerwca 2012

LVM2: vgscan fails to recreate lvmtab

LINK

I recently moved an LVM array from one server to another. When I tried to recreate the lvmtab with pvscan/vgscan, it successfully found my 3 disks, but do not recreate lvm tab.

# pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/sdb1 VG vg0 lvm2 [4.00 GiB / 0 free]
PV /dev/sdc1 VG vg0 lvm2 [4.00 GiB / 0 free]
PV /dev/sdd1 VG vg0 lvm2 [4.00 GiB / 0 free]
Total: 3 [11.99 GiB] / in use: 3 [11.99 GiB] / in no VG: 0 [0 ]


# vgscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Reading all physical volumes. This may take a while...
Finding all volume groups
Finding volume group "vg0"
Found volume group "vg0" using metadata type lvm2


# lvscan -v
Finding all logical volumes
inactive '/dev/vg0/opt' [11.99 GiB] inherit

At the end, I have no /dev/vg0 and no /etc/lvmtab.

Any ideas?

lvchange -ay /dev/vg0/opt
The volume is not activeated, with this command you actually activate it.

Ginekolog dr n. med. Piotr Siwek

Gabinet ginekologiczny specjalista ginekolog - położnik dr n. med. Piotr Siwek