General :: Create A Physical Volume First Before Creating LVM's?
Jul 13, 2010
WHat is the physical volume in LVM's? Why do we need to create a physical volume first before creating LVM's? I mean, LVM's are created from physical disks, so why do we need to specify it? Didnt get it. Anybody want to help me with this?
How to create multiple Logical Groups out of a single Physical Volume? Here is the Physical Volume I have created:
Code: # pvdisplay --- Physical volume --- PV Name /dev/sda9 VG Name myVG1 PV Size 54.88 MB / not usable 2.88 MB Allocatable yes PE Size (KByte) 4096 Total PE 13 Free PE 11 Allocated PE 2 PV UUID bon4Ao-vmgC-aP1h-EC9X-w3tN-YXNu-0N2dAw
This is how I am creating a Logical Group out of the above Physical Volume:
Code: # vgcreate myVG1 -s 4m /dev/sda9 Display:
Code: # vgdisplay --- Volume group --- VG Name myVG1 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size 52.00 MB PE Size 4.00 MB Total PE 13 Alloc PE / Size 2 / 8.00 MB Free PE / Size 11 / 44.00 MB VG UUID O6ljYC-bflz-EUTd-nf34-8gYe-Fh39-Bh3cOg
But I am unable to create one more Logical Group out of this Physical Volume. Can we accomplish it? Or do we always extend our current Logical Group to utilize the available space of a Physical Volume?
Let's assume I have a volume group (VG) with six physical volumens (PV) - sdb1, sdb2, sdb3, sdc1, sdc2, sdc3..I want to remove one of the PVs from the group in order to use its space elsewhere - how can I know if it's safe? How can I do that without losing data and without first "pvmove"ing it elsewhere?Reading a bit more, my guess is using the result of pvscan, but I thought I'd ask before removing keeping it safe as I'm not an LVM expert.
How do I find the OID code for a physical volume.I managed to get it to work with our snmp monitoring software to alert me when disk space was < 10% but the computer which was running the SNMP monitoring died.For the life of me I can't remeber how I got it to work.I have 4 partitions 1 has 88% free /etc/mapper/volgroup002 has 21% free /boot3 nfsd 0 bytes4 sunrpc 0 bytesHere is a copy of the OID I'm using 1.3.6.1.2.1.25.2.3.1.5.1 I change the last number to resemble the drive but i'm testing using 8% and they each return an error drive space low which is what the VB script tells it to do. I know the script works as I use it on Windows Servers no problems.I do an SNMPWALK on the server and it validates the above OID with HOST-RESOURCES-MIB::hrStorageSize so I know thats valid.But thats where I'm stuck. What value should I see if I were to use this OID 1.3.6.1.2.1.25.2.3.1.6.1 which is for free disk space.
how easy it would be to read the contents of a physical disk that was part of a larger logical volume. The disk contains a "Linux LVM" partition that spans its entire size. My problem is that one of my disks died, and I have to send it back for a warranty replacement. However, the disk is dead, and I can't zero it out. I'm just trying to assess how difficult it would be (or at least how likely it would be) for a tech that's checking out the disk to get at the data.
so i have f12 installed on my hd with lvm using the whole extent of the HD , i want to reduce it so i can dual boot it with a windows system, i managed to reduce the logical volume to free some space, but i cant seem to reduce the physical volume, is this possible and how ?
Could we create mirror of the existing volume in Linux. Is yes please let me know the procedure to create the mirror of existing Logical volume in Linux.
full snapshot of ArchLinux Repo for x86_64I want to use this as my restore backup should I need to reinstall Arch without network support.How do I build several *tar volumes of my /mount/my_repo to fit into 4.5GB DVDs ... the thing is 18 GB size...How do I extract all the *tar created to a folder later on...? is it the same as extracting a single *tar, will tar find all volumes in the same directory level so as to continue extracing or do I need to merge them in some way
I was running through a fairly routine Gentoo install on a 160G hard disk. My intention was to have two partitions on the disks: one for boot, and one to be an LVM physical volume. In a stroke of absent-mindedness, however, I forgot to create the boot partition and only created the LVM physical volumend didn't realize ituntil the end of the installation.Anyway, I just want to shrink the physical volume partition and add in another partition with fdisk. However, this doesn't seem to be working the way I intend. I ran
Code: livecd dev # pvresize --setphysicalvolumesize 159G /dev/hda1 WARNING: /dev/hda1: Overriding real size. You could lose data.
So I got a bad physical volume inisde my logical volume. I want to do this safely rather than tinkering around, how can I get the bad physical disk out and look at the data on the other 2 drives to see if I can save anything? Its just the standard fedora setup where it combines all the disks, nothing fancy.
I have the volume group activated as a partial, and now I just want to see the data on the other sections how could I mount that?
I have kind of test partition, but I need lv_root on it. So I have:
Code: Using physical volume(s) on command line PV VG Fmt Attr PSize PFree Start SSize LV Start Type PE Ranges /dev/sda6 VolGroup lvm2 a- 29.73g 440.00m 0 6859 lv_root 0 linear /dev/sda6:0-6858 /dev/sda6 VolGroup lvm2 a- 29.73g 440.00m 6859 128 lv_swap 0 linear /dev/sda6:6859-6986 /dev/sda6 VolGroup lvm2 a- 29.73g 440.00m 6987 512 lv_root 6859 linear /dev/sda6:6987-7498 /dev/sda6 VolGroup lvm2 a- 29.73g 440.00m 7499 2 lv_swap 128 linear /dev/sda6:7499-7500 /dev/sda6 VolGroup lvm2 a- 29.73g 440.00m 7501 110 0 free I want to move "lv_swap" to the end of VG. I want to delete its segment, and rest of VG to use for "lv_root".
I have a 500GB hard disk, /dev/sda. On it, there is /dev/sda1 for /boot, /dev/sda2 for an LVM PV (physical volume), and /dev/sda3 for another /boot (multiple Linux distros, one boot partition for grub legacy, another for grub2). so the LVM2 partition, /dev/sda2, is taking up ~465GiB. I want to add another OS (non-Linux), so I resized the *lvm2 physical volume* to 320GiB, successfully, using pvresize.
However, I now need to resize the partition so the lvm2 physical volume only just fits on it, ie to 320GiB. My plan of action is to use gparted (the partition table is GUID, so fdisk won't work), to first delete the partition from the partition table, then re-add it but this time with a smaller value (~320GiB). The problem is that I need to know exactly how many MiB/cylinders the physical volume is taking up. So, I run:
Code:
root@sysresccd /root % pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name vg0
[code]....
What one of these values do I need to set the new lvm2 replacement partition to?
When I installed Ubuntu, I created an 52 gb encrypted partition which shows up in the disk utility, and in the window that opens when I click on the "home folder" icon. I get my normal windows partition, and under that the 52 GB LVM2 partition. But when I try to access it, I get this error.
Unable to mount 52 GB LVM2 Physical Volume - not a mountable file system
This is what fdisk -l shows
Device Boot Start End Blocks Id System /dev/sda1 * 1 52 409600 27 Unknown Partition 1 does not end on cylinder boundary. /dev/sda2 52 30452 244193280 7 HPFS/NTFS
[Code]....
How can I fix this, and be able to access that 52gb partition? This is only my second day that I work with Ubuntu, so If more information is needed then let me know
I have a 7.9 TB logical volume I've created from 8 1 TB RAID 0 devices. The volume is formatted with XFS so I can resize when ready. However, I think I want to do something that is not possible. I have 2.5 TB free on my logical volume. I'd like to shrink the volume down to be 6 TB by getting rid of 2 of the 1 TB devices in the physical volume. However pvmove seems to require free extents in order to work. Do I need to add 6 TB of storage, pvmove everything onto it, and then decommission the original 8 1 TB physical devices from the volume?
I just installed linux fedora 14 on my hp probook 4320s with installation CD with this name: Fedora-14-x86_64-Live-Desktop. Then I installed it on the hard disk. During installation I chose to encrypt hard disk. When I try to access my hard disk it says "unable to mount 250GB LVM2 Physical Volume, Not a mountable file system". What can I do to get access to my hard disk?
I was trying to remove the physical volume from an old drive. So I opened gparted and told it to rewrite the partition table. The only problem is I targeted the wrong volume, I wiped the partition table on my 4tb raid5 array This 4tb array has everything! All my movies, tv shows, music. The only things I have backup up off site are my smaller files like documents. I was about to lose my whole media collection.
I did some research and found a solution that I will post here in the hopes that someone will google "I deleted the partition table on my lvm" and be find the solution.You should find in your filesystem a /etc/lvm/backup folder. LVM puts a copy of the crucial lvm information there every time you change the the volume group.
In this folder you will find a file for each volume group. In this file you will find the uuid for all of the physical volumes that make up that group.The first step is to recreate each physical volume with their original uuids. In my case I had only 1 physical volume, which was my raid5 array. My recreation command looked like this:
Now I have a physical volume with the same uuid it had before. It is essential that you correctly match up the uuids with the correct physical deviecs.The recreated pv is empty, the volume group needs to be recovered. This is done by using a special tool and the backup file. For me the command looked like this:
vgcfgrestore --file /etc/lvm/backup/raid5 raid5
This tells it to recreate the volume group using the information in the backup file. The backup files looks for the uuid of the PV, which now matches the correct volume. The coordinates in the backup file match up to the data on the array an suddenly everything is back!
When I deleted my LVM partition table I did not damage any of the actual volumes on the volume group, I just wiped out the table of contents. The backup file had the information needed to rewrite this table of contents.
creating template (phpldapadmin 1.2.0.5). I create new template where im creating User Account (possixAccount) but i need to create Generic: Ldap Alias that will be created in other ou than account and i need both in one template.
I can do:mkdir messages and then: touch messages/hello.txt Is there a command that will do both - create the directory if it doesn't exist, and then the empty file? Something like: touch -p messages/hello.txt
I'm installing Ubuntu to be used as an NFS storage server for my VMWare ESX servers. I've got a server that has two 2TB drives in it. The hardware raid controller isn't an option because it only sees up to 1TB of each drive. So, I'm trying to figure out to do this using either LVM or Parted. I don't know much about doing this, and LVM was the first thing I tried but it didn't seem to do much. It looks like it just created a smaller partition to install Ubuntu on. It didn't ask me what I wanted to do with the rest of the drive space. I've messed around with Parted and am not sure what to do, to be honest. I found a few blog posts but most started off assuming that I knew how to get to where they were starting from.
1) Why would I create a new volume group to add a new hard drive to a system, rather than add the drive to an existing volume group?
2) If I created a new volume group and added a new hard drive to it, would I see the total free space (I see 30 GB now via the file browser)? For example, if I have 30 GB free on the main drive (with the OS), and I add a new drive of say 40 GB in a new volume group (using LVM) would I see 70 GB of free space? That doesn't seem to happen.
Recently, I've tried to create a snapshot of my /root folder in 10.04 (I remember to have done so a couple of times without trouble).I used the commandHTML Code: Code: lvcreate -L10G -s -n rootsnapshot /dev/server/root Without a hint of HDD activity, Gnome (?) hangs up - I can move the mouse, and the clock is moving on, but I can't click on anything. No HDD activity, and this goes on forever (after a while, the whole system locks up). This happens each time when I try to create a snapshot.
I can cause the kernel to panic immediately with the following command. lvcreate --snapshot --name Snap --extents 100%FREE VolGroup00/LogVol00 The last line of the panic message is "<0>Kernel panic - not syncing: Fatal exception" If I create a snapshot of any other volume it works just fine. It only panics on LogVol00 which is my root fs.
I'm running 5.4 after update from 5.3. It didn't work with 5.3 either. This is a 32-bit guest running in VMWare Server 2.0.1 which is running on FC10 x86_64. I've tried the guest in both UP and SMP (2 cores) modes and observed no difference.
I am trying to create a cluster using conga and i am stuck at creating a fencing. I have no idea as what fencing device i have on my server or what fencing method to choose in creating the cluster. Can someone help me in this issue. I am trying to create cluster with 3 nodes (dell r910 machines with dell md3200 storage array )running redhat linux.