linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] after vgreduce --remove-missing, *no* lvm commands work correctly
@ 2006-08-20 17:34 Andrew Jones
  2006-08-23 14:29 ` Alasdair G Kergon
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jones @ 2006-08-20 17:34 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

I'm at the end of my rope on this one.  I added a new RAID array to a
system, started a pvmove, then hardware failure forced me to abort it.
"pvmove --abort" didn't appear to do anything, so I attempted to move on
with "vgreduce --remove-missing vg0".

Now, absolutely no commands work on the vg0 group.  Attached the output
of vgscan -v -v and vgchange -a y -v -v, but all commands have very
similar output, with the same old error of "Couldn't find volume
'pvmove0' for segment 'start_extent'."



[-- Attachment #2: vgscan.out --]
[-- Type: text/plain, Size: 5354 bytes --]

Script started on Sun Aug 20 13:27:05 2006
root@Amnesiac#vgscan -v -v
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
    Wiping cache of LVM-capable devices
    Wiping internal VG cache
  Reading all physical volumes.  This may take a while...
    Finding all volume groups
      /dev/ram0: size is 16384 sectors
      /dev/ram0: size is 16384 sectors
      /dev/ram0: No label detected
      /dev/hda: size is 240121728 sectors
      /dev/md0: size is 937744896 sectors
      /dev/md0: size is 937744896 sectors
      /dev/md0: lvm2 label detected
      /dev/hdc: size is 58633344 sectors
      /dev/ram1: size is 16384 sectors
      /dev/ram1: size is 16384 sectors
      /dev/ram1: No label detected
      /dev/hda1: size is 240121665 sectors
      /dev/hda1: size is 240121665 sectors
      /dev/md1: size is 480242944 sectors
      /dev/md1: size is 480242944 sectors
      /dev/md1: lvm2 label detected
      /dev/hdc1: size is 4192902 sectors
      /dev/hdc1: size is 4192902 sectors
      /dev/hdc1: No label detected
      /dev/ram2: size is 16384 sectors
      /dev/ram2: size is 16384 sectors
      /dev/ram2: No label detected
      /dev/md2: size is 937729536 sectors
      /dev/md2: size is 937729536 sectors
      /dev/md2: lvm2 label detected
      /dev/hdc2: size is 208845 sectors
      /dev/hdc2: size is 208845 sectors
      /dev/hdc2: No label detected
      /dev/ram3: size is 16384 sectors
      /dev/ram3: size is 16384 sectors
      /dev/ram3: No label detected
      /dev/hdc3: size is 2 sectors
      /dev/ram4: size is 16384 sectors
      /dev/ram4: size is 16384 sectors
      /dev/ram4: No label detected
      /dev/hdc4: size is 38588130 sectors
      /dev/hdc4: size is 38588130 sectors
      /dev/hdc4: No label detected
      /dev/ram5: size is 16384 sectors
      /dev/ram5: size is 16384 sectors
      /dev/ram5: No label detected
      /dev/hdc5: size is 15631182 sectors
      /dev/hdc5: size is 15631182 sectors
      /dev/hdc5: No label detected
      /dev/ram6: size is 16384 sectors
      /dev/ram6: size is 16384 sectors
      /dev/ram6: No label detected
      /dev/ram7: size is 16384 sectors
      /dev/ram7: size is 16384 sectors
      /dev/ram7: No label detected
      /dev/ram8: size is 16384 sectors
      /dev/ram8: size is 16384 sectors
      /dev/ram8: No label detected
      /dev/ram9: size is 16384 sectors
      /dev/ram9: size is 16384 sectors
      /dev/ram9: No label detected
      /dev/ram10: size is 16384 sectors
      /dev/ram10: size is 16384 sectors
      /dev/ram10: No label detected
      /dev/ram11: size is 16384 sectors
      /dev/ram11: size is 16384 sectors
      /dev/ram11: No label detected
      /dev/ram12: size is 16384 sectors
      /dev/ram12: size is 16384 sectors
      /dev/ram12: No label detected
      /dev/ram13: size is 16384 sectors
      /dev/ram13: size is 16384 sectors
      /dev/ram13: No label detected
      /dev/ram14: size is 16384 sectors
      /dev/ram14: size is 16384 sectors
      /dev/ram14: No label detected
      /dev/ram15: size is 16384 sectors
      /dev/ram15: size is 16384 sectors
      /dev/ram15: No label detected
      Locking /var/lock/lvm/V_vg1 RB
    Finding volume group "vg1"
      /dev/md2: lvm2 label detected
      /dev/md2: lvm2 label detected
  Found volume group "vg1" using metadata type lvm2
      Unlocking /var/lock/lvm/V_vg1
      Locking /var/lock/lvm/V_vg0 RB
    Finding volume group "vg0"
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
      /dev/ram0: No label detected
      /dev/md0: lvm2 label detected
      /dev/ram1: No label detected
      /dev/md1: lvm2 label detected
      /dev/hdc1: No label detected
      /dev/ram2: No label detected
      /dev/md2: lvm2 label detected
      /dev/hdc2: No label detected
      /dev/ram3: No label detected
      /dev/ram4: No label detected
      /dev/hdc4: No label detected
      /dev/ram5: No label detected
      /dev/hdc5: No label detected
      /dev/ram6: No label detected
      /dev/ram7: No label detected
      /dev/ram8: No label detected
      /dev/ram9: No label detected
      /dev/ram10: No label detected
      /dev/ram11: No label detected
      /dev/ram12: No label detected
      /dev/ram13: No label detected
      /dev/ram14: No label detected
      /dev/ram15: No label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
  Volume group "vg0" not found
      Unlocking /var/lock/lvm/V_vg0
root@Amnesiac#^D\b\b
Script done on Sun Aug 20 13:27:11 2006

[-- Attachment #3: vgchange.out --]
[-- Type: text/plain, Size: 5325 bytes --]

Script started on Sun Aug 20 13:26:42 2006
root@Amnesiac#vgscan -\b^[[K\b\b^[[K\b^[[K\b^[[K\b^[[Kchange -a -y\b^[[K\b^[[Ky -v -v 
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
    Finding all volume groups
      /dev/ram0: No label detected
      /dev/md0: lvm2 label detected
      /dev/ram1: No label detected
      /dev/md1: lvm2 label detected
      /dev/hdc1: No label detected
      /dev/ram2: No label detected
      /dev/md2: lvm2 label detected
      /dev/hdc2: No label detected
      /dev/ram3: No label detected
      /dev/ram4: No label detected
      /dev/hdc4: No label detected
      /dev/ram5: No label detected
      /dev/hdc5: No label detected
      /dev/ram6: No label detected
      /dev/ram7: No label detected
      /dev/ram8: No label detected
      /dev/ram9: No label detected
      /dev/ram10: No label detected
      /dev/ram11: No label detected
      /dev/ram12: No label detected
      /dev/ram13: No label detected
      /dev/ram14: No label detected
      /dev/ram15: No label detected
      Locking /var/lock/lvm/V_vg1 RB
    Finding volume group "vg1"
      /dev/md2: lvm2 label detected
      /dev/md2: lvm2 label detected
  0 logical volume(s) in volume group "vg1" now active
      Unlocking /var/lock/lvm/V_vg1
      Locking /var/lock/lvm/V_vg0 RB
    Finding volume group "vg0"
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
    Wiping cache of LVM-capable devices
      /dev/ram0: size is 16384 sectors
      /dev/ram0: size is 16384 sectors
      /dev/ram0: No label detected
      /dev/hda: size is 240121728 sectors
      /dev/md0: size is 937744896 sectors
      /dev/md0: size is 937744896 sectors
      /dev/md0: lvm2 label detected
      /dev/hdc: size is 58633344 sectors
      /dev/ram1: size is 16384 sectors
      /dev/ram1: size is 16384 sectors
      /dev/ram1: No label detected
      /dev/hda1: size is 240121665 sectors
      /dev/hda1: size is 240121665 sectors
      /dev/md1: size is 480242944 sectors
      /dev/md1: size is 480242944 sectors
      /dev/md1: lvm2 label detected
      /dev/hdc1: size is 4192902 sectors
      /dev/hdc1: size is 4192902 sectors
      /dev/hdc1: No label detected
      /dev/ram2: size is 16384 sectors
      /dev/ram2: size is 16384 sectors
      /dev/ram2: No label detected
      /dev/md2: size is 937729536 sectors
      /dev/md2: size is 937729536 sectors
      /dev/md2: lvm2 label detected
      /dev/hdc2: size is 208845 sectors
      /dev/hdc2: size is 208845 sectors
      /dev/hdc2: No label detected
      /dev/ram3: size is 16384 sectors
      /dev/ram3: size is 16384 sectors
      /dev/ram3: No label detected
      /dev/hdc3: size is 2 sectors
      /dev/ram4: size is 16384 sectors
      /dev/ram4: size is 16384 sectors
      /dev/ram4: No label detected
      /dev/hdc4: size is 38588130 sectors
      /dev/hdc4: size is 38588130 sectors
      /dev/hdc4: No label detected
      /dev/ram5: size is 16384 sectors
      /dev/ram5: size is 16384 sectors
      /dev/ram5: No label detected
      /dev/hdc5: size is 15631182 sectors
      /dev/hdc5: size is 15631182 sectors
      /dev/hdc5: No label detected
      /dev/ram6: size is 16384 sectors
      /dev/ram6: size is 16384 sectors
      /dev/ram6: No label detected
      /dev/ram7: size is 16384 sectors
      /dev/ram7: size is 16384 sectors
      /dev/ram7: No label detected
      /dev/ram8: size is 16384 sectors
      /dev/ram8: size is 16384 sectors
      /dev/ram8: No label detected
      /dev/ram9: size is 16384 sectors
      /dev/ram9: size is 16384 sectors
      /dev/ram9: No label detected
      /dev/ram10: size is 16384 sectors
      /dev/ram10: size is 16384 sectors
      /dev/ram10: No label detected
      /dev/ram11: size is 16384 sectors
      /dev/ram11: size is 16384 sectors
      /dev/ram11: No label detected
      /dev/ram12: size is 16384 sectors
      /dev/ram12: size is 16384 sectors
      /dev/ram12: No label detected
      /dev/ram13: size is 16384 sectors
      /dev/ram13: size is 16384 sectors
      /dev/ram13: No label detected
      /dev/ram14: size is 16384 sectors
      /dev/ram14: size is 16384 sectors
      /dev/ram14: No label detected
      /dev/ram15: size is 16384 sectors
      /dev/ram15: size is 16384 sectors
      /dev/ram15: No label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
      /dev/md0: lvm2 label detected
      /dev/md1: lvm2 label detected
  Couldn't find volume 'pvmove0' for segment 'start_extent'.
  Couldn't read all logical volumes for volume group vg0.
  Unable to find volume group "vg0"
      Unlocking /var/lock/lvm/V_vg0
root@Amnesiac#^D\b\bexit

Script done on Sun Aug 20 13:26:50 2006

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] after vgreduce --remove-missing, *no* lvm commands work correctly
  2006-08-20 17:34 [linux-lvm] after vgreduce --remove-missing, *no* lvm commands work correctly Andrew Jones
@ 2006-08-23 14:29 ` Alasdair G Kergon
  2006-08-23 15:18   ` [linux-lvm] Partitioning remotely Jim Morgan
  0 siblings, 1 reply; 5+ messages in thread
From: Alasdair G Kergon @ 2006-08-23 14:29 UTC (permalink / raw)
  To: LVM general discussion and development

On Sun, Aug 20, 2006 at 01:34:54PM -0400, Andrew Jones wrote:
> I'm at the end of my rope on this one.  

Resort to vgcfgrestore to put your metadata back how it was.
[edit backup file by hand if necessary first to remove things that have gone]

Evidently vgreduce --removemissing doesn't handle active pvmoves.

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [linux-lvm] Partitioning remotely
  2006-08-23 14:29 ` Alasdair G Kergon
@ 2006-08-23 15:18   ` Jim Morgan
  2006-08-23 17:21     ` Luca Berra
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Morgan @ 2006-08-23 15:18 UTC (permalink / raw)
  To: LVM general discussion and development

Hi all,

I've just inherited a server which sits about 2000 miles away in a 
data centre. If I make any changes to it, therefore, I have to be 
really sure that its not going to mess up.

So, with that in mind, the server was set up with two 160Gb hard 
disks in a Software RAID 1 configuration. Within the RAID config 
there is a boot partition, a swap partition and the rest of the disk 
is dedicated to / . (config details attached below). I want to resize 
the main partition to 50GB, and move /home onto one partition of 50Gb 
and then set up another partition for /var.

I've been reading around the internet to see if I can resize the 
partitions on the disk and/or in the LVM. There seems to be 
conflicting advice on the subject and I don't want to make a move 
before I'm absolutely sure. My choices seem to be

a) resize physical disk partition using parted, then resize RAID 
partition using lvreduce etc. (ref article in gentoo documentation )

b) The converse of this: resize RAID partition first, then resize physical disk
(ref parted manual, specifically:
"You usually resize the file system at the same times as you resize 
your virtual device. If you are growing the file system and virtual 
device, you should grow the device first (with the RAID or LVM 
tools), and then grow the file system. If you are shrinking the file 
system and virtual device, you should shrink the file system first, 
and then the virtual device afterwards.

To resize the file system in Parted, use the resize command. For example:

(parted) select /dev/md0"

c) Forget about the physical disk: just do everything in RAID LVM

d) You can't do anything. The partition you want to resize contains 
the OS, and you need to umount it first.

So, can anyone tell me the definitive way to do this? I guess I'm 
having a hard time working out the relationship between the LVM and 
the physical disk. If the server were in front of me, I'd just plough 
in there and try things out. However its not, and if I mess up, I mess up big.

Thanks. Dazed and confused.

Jim

=============================================================

Here are some config details:

[root@server ~]# cat /etc/fstab
==========================================================
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/md2 / ext3 defaults 1 1
/dev/md0 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/md1 swap swap defaults 0 0

(parted) print
=====================================================
Disk geometry for /dev/sda: 0.000-152627.835 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot, raid
2 101.975 2149.321 primary linux-swap raid
3 2149.321 152625.344 primary ext3 raid
(parted) select /dev/sdb
Using /dev/sdb
(parted) print
Disk geometry for /dev/sdb: 0.000-152627.835 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot, raid
2 101.975 2149.321 primary linux-swap raid
3 2149.321 152625.344 primary ext3 raid

[root@server ~]# mdadm --misc --detail /dev/md0
===========================================================
/dev/md0:
Version : 00.90.01
Creation Time : Mon Aug 7 22:41:35 2006
Raid Level : raid1
Array Size : 104320 (101.88 MiB 106.82 MB)
Device Size : 104320 (101.88 MiB 106.82 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Tue Aug 8 03:00:22 2006
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0


Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
UUID : 62655ecf:e3ceaaf4:
Events : 0.23

[root@server ~]# cat /proc/mdstat
=================================================================
Personalities : [raid1]
md1 : active raid1 sdb2[1] sda2[0]
2096384 blocks [2/2] [UU]

md2 : active raid1 sdb3[1] sda3[0]
154087360 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

unused devices: <none> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Partitioning remotely
  2006-08-23 15:18   ` [linux-lvm] Partitioning remotely Jim Morgan
@ 2006-08-23 17:21     ` Luca Berra
  2006-08-25  5:10       ` Jim Morgan
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Berra @ 2006-08-23 17:21 UTC (permalink / raw)
  To: linux-lvm

On Wed, Aug 23, 2006 at 11:18:03PM +0800, Jim Morgan wrote:
>I've been reading around the internet to see if I can resize the 
>partitions on the disk and/or in the LVM. There seems to be 
>conflicting advice on the subject and I don't want to make a move 
>before I'm absolutely sure. My choices seem to be

you are not using LVM

>d) You can't do anything. The partition you want to resize contains 
>the OS, and you need to umount it first.

d is the correct answer

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Partitioning remotely
  2006-08-23 17:21     ` Luca Berra
@ 2006-08-25  5:10       ` Jim Morgan
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Morgan @ 2006-08-25  5:10 UTC (permalink / raw)
  To: LVM general discussion and development

At 24/08/2006 01:21, you wrote:
>>I've been reading around the internet to see if I can resize the 
>>partitions on the disk and/or in the LVM. There seems to be 
>>conflicting advice on the subject and I don't want to make a move 
>>before I'm absolutely sure. My choices seem to be
>
>you are not using LVM

Thanks Luca. With that one comment you have clarified several days of 
confusion. My mistake, of course, was to assume that LVM was an 
integral part of software RAID, whereas it is a separate and 
complimentary entity.

It doesn't solve my problem, but now at least I understand what the 
problem is! :-)

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-25  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-20 17:34 [linux-lvm] after vgreduce --remove-missing, *no* lvm commands work correctly Andrew Jones
2006-08-23 14:29 ` Alasdair G Kergon
2006-08-23 15:18   ` [linux-lvm] Partitioning remotely Jim Morgan
2006-08-23 17:21     ` Luca Berra
2006-08-25  5:10       ` Jim Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).