Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] LVM groups not visible
@ 2006-11-10  9:48 J.L. Blom
  2006-11-10 15:27 ` Jonathan E Brassow
  0 siblings, 1 reply; 6+ messages in thread
From: J.L. Blom @ 2006-11-10  9:48 UTC (permalink / raw)
  To: LVM general discussion and development

Hi,
I'm rather new to LVM and I have a - I think - simple question.
I have a removable disk (USB) with several volumegroups on it created
with one system (linux 2.6.18-1.2200.fc5). I wanted to use it to backup
from another system (linux 2.6.14-386: ubuntu) the W2000 partition.
WHen I connect the disk it is seen as usbdisk on /dev/sda1 and the
content is displayed.
However, lvdisplay says: " no volume groups found"
lvscan says: " no volume groups found"
pvscan says: " no matching physical volumes found"
But the content is visible in nautilus and I can write and read.
Hope somebody can clarify and help me.
Joep

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

* Re: [linux-lvm] LVM groups not visible
  2006-11-10  9:48 [linux-lvm] LVM groups not visible J.L. Blom
@ 2006-11-10 15:27 ` Jonathan E Brassow
  2006-11-10 16:00   ` J.L. Blom
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan E Brassow @ 2006-11-10 15:27 UTC (permalink / raw)
  To: LVM general discussion and development, jlblom

I can't imagine putting LVM on a USB drive...  Are you sure LVM is even 
involved here?

You can type 'mount' or 'df' at the command prompt.  That will tell you 
how the usbdisk is mounted.  If it is mounted from /dev/sda1 - then 
there is no LVM in the mix.

  brassow

On Nov 10, 2006, at 3:48 AM, J.L. Blom wrote:

> Hi,
> I'm rather new to LVM and I have a - I think - simple question.
> I have a removable disk (USB) with several volumegroups on it created
> with one system (linux 2.6.18-1.2200.fc5). I wanted to use it to backup
> from another system (linux 2.6.14-386: ubuntu) the W2000 partition.
> WHen I connect the disk it is seen as usbdisk on /dev/sda1 and the
> content is displayed.
> However, lvdisplay says: " no volume groups found"
> lvscan says: " no volume groups found"
> pvscan says: " no matching physical volumes found"
> But the content is visible in nautilus and I can write and read.
> Hope somebody can clarify and help me.
> Joep
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

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

* Re: [linux-lvm] LVM groups not visible
  2006-11-10 15:27 ` Jonathan E Brassow
@ 2006-11-10 16:00   ` J.L. Blom
  2006-11-10 19:03     ` Jonathan E Brassow
  2006-11-10 19:22     ` Lamont R. Peterson
  0 siblings, 2 replies; 6+ messages in thread
From: J.L. Blom @ 2006-11-10 16:00 UTC (permalink / raw)
  To: Jonathan E Brassow; +Cc: LVM general discussion and development

On Fri, 2006-11-10 at 09:27 -0600, Jonathan E Brassow wrote:
> I can't imagine putting LVM on a USB drive...  Are you sure LVM is even 
> involved here?
> 
> You can type 'mount' or 'df' at the command prompt.  That will tell you 
> how the usbdisk is mounted.  If it is mounted from /dev/sda1 - then 
> there is no LVM in the mix.
> 
>   brassow

Jonathan,
Thanks for your reply. 
I didn't know that an USB disk couldn't be used for logical volumes as
pvcreate and lvcreate did not complain.
However, when I now do a lvscan it gives me:
_______________________________________
[root@laguna ~]# lvscan
  Couldn't find device with uuid
'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
  Couldn't find all physical volumes for volume group VolGroup00.
  Couldn't find device with uuid
'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
  Couldn't find all physical volumes for volume group VolGroup00.
  Volume group "VolGroup00" not found
  ACTIVE            '/dev/VolGroup01/LogVol00' [9.75 GB] inherit
  ACTIVE            '/dev/VolGroup01/LogVol02' [9.75 GB] inherit
  ACTIVE            '/dev/VolGroup01/LogVol03' [4.88 GB] inherit
  ACTIVE            '/dev/VolGroup01/LogVol04' [9.75 GB] inherit
  ACTIVE            '/dev/VolGroup01/LogVol05' [9.75 GB] inherit
  ACTIVE            '/dev/VolGroup01/LogVol01' [9.75 GB] inherit
_________________________________________________________________
As VolGroup00 is on the USB disk which I just had connected.

df gives:
_____________________________________
/dev/mapper/VolGroup01-LogVol00
                       9903432   1035860   8356392  12% /
/dev/hda1                99043     25640     68289  28% /boot
tmpfs                   512492         0    512492   0% /dev/shm
/dev/mapper/VolGroup01-LogVol02
                       9903432   1789628   7602624  20% /home
/dev/mapper/VolGroup01-LogVol03
                       4951688   4137648    558452  89% /usr
/dev/mapper/VolGroup01-LogVol04
                       9903432    342224   9050028   4% /usr/local
/dev/mapper/VolGroup01-LogVol05
                       9903432    761312   8630940   9% /var

/dev/sda1            240362656  38037368 190115488  17% /media/disk
___________________________________________________

and fdisk says:
_____________________________________________________
The number of cylinders for this disk is set to 30400.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by
w(rite)

Command (m for help): p

Disk /dev/sda1: 250.0 GB, 250056705024 bytes
255 heads, 63 sectors/track, 30400 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System

Command (m for help): q
______________________________________
So I'm at a loss how this is possible. The disk can be reached but
neither lvm nor fdisk can tell me what's on the disk,
Can you perhaps shine some light on it?
(sorry for the long mail).
Joep

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

* Re: [linux-lvm] LVM groups not visible
  2006-11-10 16:00   ` J.L. Blom
@ 2006-11-10 19:03     ` Jonathan E Brassow
  2006-11-10 19:22     ` Lamont R. Peterson
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan E Brassow @ 2006-11-10 19:03 UTC (permalink / raw)
  To: jlblom; +Cc: LVM general discussion and development

Hmmm, did you ever add your usb device to a volume group using 
'vgextend'?  (If so, that probably wasn't a good idea. :)  Otherwise, I 
suppose you might have had the USB drive plugged in when you installed 
your system... leading it to believe it was an internal drive perhaps, 
thus including it in a volume group...

I'm not exactly sure what's going on here.  Perhaps you want to take a 
look at the contents of your lvm backup files, located in 
/etc/lvm/backup.  This way, you can see what the USB device is included 
with (if anything).

  brassow

On Nov 10, 2006, at 10:00 AM, J.L. Blom wrote:

> On Fri, 2006-11-10 at 09:27 -0600, Jonathan E Brassow wrote:
>> I can't imagine putting LVM on a USB drive...  Are you sure LVM is 
>> even
>> involved here?
>>
>> You can type 'mount' or 'df' at the command prompt.  That will tell 
>> you
>> how the usbdisk is mounted.  If it is mounted from /dev/sda1 - then
>> there is no LVM in the mix.
>>
>>   brassow
>
> Jonathan,
> Thanks for your reply.
> I didn't know that an USB disk couldn't be used for logical volumes as
> pvcreate and lvcreate did not complain.
> However, when I now do a lvscan it gives me:
> _______________________________________
> [root@laguna ~]# lvscan
>   Couldn't find device with uuid
> 'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
>   Couldn't find all physical volumes for volume group VolGroup00.
>   Couldn't find device with uuid
> 'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
>   Couldn't find all physical volumes for volume group VolGroup00.
>   Volume group "VolGroup00" not found
>   ACTIVE            '/dev/VolGroup01/LogVol00' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol02' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol03' [4.88 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol04' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol05' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol01' [9.75 GB] inherit
> _________________________________________________________________
> As VolGroup00 is on the USB disk which I just had connected.
>
> df gives:
> _____________________________________
> /dev/mapper/VolGroup01-LogVol00
>                        9903432   1035860   8356392  12% /
> /dev/hda1                99043     25640     68289  28% /boot
> tmpfs                   512492         0    512492   0% /dev/shm
> /dev/mapper/VolGroup01-LogVol02
>                        9903432   1789628   7602624  20% /home
> /dev/mapper/VolGroup01-LogVol03
>                        4951688   4137648    558452  89% /usr
> /dev/mapper/VolGroup01-LogVol04
>                        9903432    342224   9050028   4% /usr/local
> /dev/mapper/VolGroup01-LogVol05
>                        9903432    761312   8630940   9% /var
>
> /dev/sda1            240362656  38037368 190115488  17% /media/disk
> ___________________________________________________
>
> and fdisk says:
> _____________________________________________________
> The number of cylinders for this disk is set to 30400.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., old versions of LILO)
> 2) booting and partitioning software from other OSs
>    (e.g., DOS FDISK, OS/2 FDISK)
> Warning: invalid flag 0x0000 of partition table 4 will be corrected by
> w(rite)
>
> Command (m for help): p
>
> Disk /dev/sda1: 250.0 GB, 250056705024 bytes
> 255 heads, 63 sectors/track, 30400 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>      Device Boot      Start         End      Blocks   Id  System
>
> Command (m for help): q
> ______________________________________
> So I'm at a loss how this is possible. The disk can be reached but
> neither lvm nor fdisk can tell me what's on the disk,
> Can you perhaps shine some light on it?
> (sorry for the long mail).
> Joep
>
>
>

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

* Re: [linux-lvm] LVM groups not visible
  2006-11-10 16:00   ` J.L. Blom
  2006-11-10 19:03     ` Jonathan E Brassow
@ 2006-11-10 19:22     ` Lamont R. Peterson
  2006-11-10 23:05       ` J.L. Blom
  1 sibling, 1 reply; 6+ messages in thread
From: Lamont R. Peterson @ 2006-11-10 19:22 UTC (permalink / raw)
  To: LVM

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

On Friday 10 November 2006 09:00am, J.L. Blom wrote:
> On Fri, 2006-11-10 at 09:27 -0600, Jonathan E Brassow wrote:
> > I can't imagine putting LVM on a USB drive...  Are you sure LVM is even
> > involved here?
> >
> > You can type 'mount' or 'df' at the command prompt.  That will tell you
> > how the usbdisk is mounted.  If it is mounted from /dev/sda1 - then
> > there is no LVM in the mix.
> >
> >   brassow
>
> Jonathan,
> Thanks for your reply.
> I didn't know that an USB disk couldn't be used for logical volumes as
> pvcreate and lvcreate did not complain.
> However, when I now do a lvscan it gives me:
> _______________________________________
> [root@laguna ~]# lvscan
>   Couldn't find device with uuid
> 'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
>   Couldn't find all physical volumes for volume group VolGroup00.
>   Couldn't find device with uuid
> 'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
>   Couldn't find all physical volumes for volume group VolGroup00.
>   Volume group "VolGroup00" not found
>   ACTIVE            '/dev/VolGroup01/LogVol00' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol02' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol03' [4.88 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol04' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol05' [9.75 GB] inherit
>   ACTIVE            '/dev/VolGroup01/LogVol01' [9.75 GB] inherit
> _________________________________________________________________
> As VolGroup00 is on the USB disk which I just had connected.

Looks like the USB device wasn't plugged in when the box was booted, perhaps?

> df gives:
> _____________________________________
> /dev/mapper/VolGroup01-LogVol00
>                        9903432   1035860   8356392  12% /
> /dev/hda1                99043     25640     68289  28% /boot
> tmpfs                   512492         0    512492   0% /dev/shm
> /dev/mapper/VolGroup01-LogVol02
>                        9903432   1789628   7602624  20% /home
> /dev/mapper/VolGroup01-LogVol03
>                        4951688   4137648    558452  89% /usr
> /dev/mapper/VolGroup01-LogVol04
>                        9903432    342224   9050028   4% /usr/local
> /dev/mapper/VolGroup01-LogVol05
>                        9903432    761312   8630940   9% /var
>
> /dev/sda1            240362656  38037368 190115488  17% /media/disk
> ___________________________________________________
>
> and fdisk says:

Next time, try running "fdisk -l /dev/sda" (or just "fdisk -l" to see all of 
them).

> _____________________________________________________
> The number of cylinders for this disk is set to 30400.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., old versions of LILO)
> 2) booting and partitioning software from other OSs
>    (e.g., DOS FDISK, OS/2 FDISK)

Standard thing to see.  It's a mostly stupid warning these days, as every 
desktop & notebook motherboard made in the past 8 years (or so) has LBA 
support out of the box, so it isn't an issue.  In other words, you can just 
ignore that.

> Warning: invalid flag 0x0000 of partition table 4 will be corrected by
> w(rite)

That sometimes happens when the partition table was initially created by some 
other tool (like Windows, or Partition Magic), as they don't all do exactly 
the same thing with some parts of it.  Given that the "offending" flag's 
value was 0x0000, I think it be that it was just never set by the other tool.

However, that's not why this is happening in this case (read the next bit to 
see what's up).

> Command (m for help): p
>
> Disk /dev/sda1: 250.0 GB, 250056705024 bytes
> 255 heads, 63 sectors/track, 30400 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>      Device Boot      Start         End      Blocks   Id  System
>
> Command (m for help): q

This is blank because you are trying to read a partition table from the 1st 
partition.  You ran "fdisk /dev/sda1" not "fdisk /dev/sda" as it should have 
been.  I hate it when I do that :) .

> ______________________________________
> So I'm at a loss how this is possible. The disk can be reached but
> neither lvm nor fdisk can tell me what's on the disk,

Since it's a USB disk, I would guess that it wasn't inserted when you booted 
your box.  So, when LVM was being set up by /etc/rc.sysinit, it didn't find 
that device.  If you did another "pvscan" after inserting the USB disk, it 
might find it.

I already covered the problem with fdisk.

> Can you perhaps shine some light on it?

OK.  Overall, I wouldn't bother trying to use LVM with a removable drive 
(USB/Firewire hard drives, keychain drives, etc.).  I can think of one 
possibly viable way of doing it, but I still probably wouldn't even in that 
case, because it wouldn't really give you any benefits.

So, if you have already included the USB drive into your VG(s), get everything 
plugged in, make sure pvdisplay, vgdisplay, lvscan and friends are all happy, 
then run "pvmove /dev/sda1".  This will move any data you may have on there 
to other drives (the one built in to your box).

In this thread, everyone has been *assuming* that your USB disk is /dev/sda.  
If your main hard drive is SATA or SCSI, it very well could be /dev/sda and 
your USB drive could be /dev/sdb or some other device; i.e., the last letter 
in the device name could be 'a', 'b', 'c', etc.  Run "fdisk -l" to see a list 
of all the hard drives your system currently sees without the USB drive 
plugged in, then plug it in and re-run "fdisk -l" and the extra one the 
second time is your USB drive.  Make sure you use the correct device name in 
your pvmove command.

Once the pvmove command is finished, you can safely "redo" your USB device.  
If it's a hard drive, format it with ext3 or reiserfs or jfs or xfs (as you 
prefer).  If it's a flash device, I would recommend that you look at using 
JFFS2 for the filesystem.  Either way, make sure that the "type" (i.e. System 
ID) of the partition on your USB device is "83" (for regular Linux 
filesystems) and not "8e" (which is for Linux LVM PVs).

> (sorry for the long mail).

np.  HTH.

[snip]
-- 
Lamont Peterson <peregrine@OpenBrainstem.net>
Founder [ http://blog.OpenBrainstem.net/peregrine/ ]
GPG Key fingerprint: 0E35 93C5 4249 49F0 EC7B  4DDD BE46 4732 6460 CCB5
  ___                   ____            _           _
 / _ \ _ __   ___ _ __ | __ ) _ __ __ _(_)_ __  ___| |_ ___ _ __ ___
| | | | '_ \ / _ \ '_ \|  _ \| '__/ _` | | '_ \/ __| __/ _ \ '_ ` _ \
| |_| | |_) |  __/ | | | |_) | | | (_| | | | | \__ \ ||  __/ | | | | |
 \___/| .__/ \___|_| |_|____/|_|  \__,_|_|_| |_|___/\__\___|_| |_| |_|
      |_|               Intelligent Open Source Software Engineering
                              [ http://www.OpenBrainstem.net/ ]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [linux-lvm] LVM groups not visible
  2006-11-10 19:22     ` Lamont R. Peterson
@ 2006-11-10 23:05       ` J.L. Blom
  0 siblings, 0 replies; 6+ messages in thread
From: J.L. Blom @ 2006-11-10 23:05 UTC (permalink / raw)
  To: LVM general discussion and development

On Fri, 2006-11-10 at 12:22 -0700, Lamont R. Peterson wrote:

> 
> Looks like the USB device wasn't plugged in when the box was booted, perhaps?
> 
Lamont,
Thanks very much for your detailed explanation.
Yes, I did plug it in after I had started 
> Standard thing to see.  It's a mostly stupid warning these days, as every 
> desktop & notebook motherboard made in the past 8 years (or so) has LBA 
> support out of the box, so it isn't an issue.  In other words, you can just 
> ignore that.

I agree. It's a very old remark. Apparently nobody bothers to remove it
when upgrading the package.
> 
> > Warning: invalid flag 0x0000 of partition table 4 will be corrected by
> > w(rite)
> 
> That sometimes happens when the partition table was initially created by some 
> other tool (like Windows, or Partition Magic), as they don't all do exactly 
> the same thing with some parts of it.  Given that the "offending" flag's 
> value was 0x0000, I think it be that it was just never set by the other tool.
> 
> However, that's not why this is happening in this case (read the next bit to 
> see what's up).
> 

> This is blank because you are trying to read a partition table from the 1st 
> partition.  You ran "fdisk /dev/sda1" not "fdisk /dev/sda" as it should have 
> been.  I hate it when I do that :) .
> 
Yes! Sorry my own stupidity. 

> Since it's a USB disk, I would guess that it wasn't inserted when you booted 
> your box.  So, when LVM was being set up by /etc/rc.sysinit, it didn't find 
> that device.  If you did another "pvscan" after inserting the USB disk, it 
> might find it.
> 
Well, no. When I did a pvscan it reported only the already installed
devices but pvscan -n gave what I think is the culprit:
______________________
 pvscan -n
  WARNING: only considering physical volumes in no volume group
  Couldn't find device with uuid
'G6vIxd-bp54-0zd0-PKzf-WI31-xPmr-qoeFAT'.
  No matching physical volumes found
___________________________________________
Apparently the mentioned uuid is from the pv on the USB disk and for
some reason he cannot see it.
What would happen if I unmount the device and then do a pvscan? 
> I already covered the problem with fdisk.
> 

> 
> OK.  Overall, I wouldn't bother trying to use LVM with a removable drive 
> (USB/Firewire hard drives, keychain drives, etc.).  I can think of one 
> possibly viable way of doing it, but I still probably wouldn't even in that 
> case, because it wouldn't really give you any benefits.
> 
I understand and had thought it would better to remove it.
> So, if you have already included the USB drive into your VG(s), get everything 
> plugged in, make sure pvdisplay, vgdisplay, lvscan and friends are all happy, 
> then run "pvmove /dev/sda1".  This will move any data you may have on there 
> to other drives (the one built in to your box).
But isn't that a problem as the removable disks has > 100 GB backup data
and the fixed disks together are smaller (and have > 50 % occupied)
> 
> In this thread, everyone has been *assuming* that your USB disk is /dev/sda.  
> If your main hard drive is SATA or SCSI, it very well could be /dev/sda and 
> your USB drive could be /dev/sdb or some other device; i.e., the last letter 
> in the device name could be 'a', 'b', 'c', etc.  Run "fdisk -l" to see a list 
> of all the hard drives your system currently sees without the USB drive 
> plugged in, then plug it in and re-run "fdisk -l" and the extra one the 
> second time is your USB drive.  Make sure you use the correct device name in 
> your pvmove command.
> 
> Once the pvmove command is finished, you can safely "redo" your USB device.  
> If it's a hard drive, format it with ext3 or reiserfs or jfs or xfs (as you 
> prefer).  If it's a flash device, I would recommend that you look at using 
> JFFS2 for the filesystem.  Either way, make sure that the "type" (i.e. System 
> ID) of the partition on your USB device is "83" (for regular Linux 
> filesystems) and not "8e" (which is for Linux LVM PVs).
> 
My fixed disks are IDE so the USB disk is /dev/sda.
I have had a look at JFFS but haven't used it do I have to know more of
it before I can use it.
One curious point when I run fdisk -l it gives my logical volumes
as /dev/dm-(1-5) but cannot find any meaningful information (which I
think is understandable).
Lamont, thanks again for your explanation and maybe you can clarify the
pvmove in this case as I think I don't have enough diskspace for that
exercise.
Joep 
> np.  HTH.
> 
> [snip]
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

end of thread, other threads:[~2006-11-10 23:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10  9:48 [linux-lvm] LVM groups not visible J.L. Blom
2006-11-10 15:27 ` Jonathan E Brassow
2006-11-10 16:00   ` J.L. Blom
2006-11-10 19:03     ` Jonathan E Brassow
2006-11-10 19:22     ` Lamont R. Peterson
2006-11-10 23:05       ` J.L. Blom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox