ExamNotes.net  -  IT certification portal

ForumsCertResearchTop sitesNewslettersFree email
HomeRegister


Exams Notes
Practice exams
Exam games
Questions by email
Online training
Training videos
College degrees
Boot camps
Book store
Links directory
Tell a friend
For webmasters




General discussions > Public newsgroups > alt.os.linux > LVM: Trying to run pvcreate on a disk.

Show a Printable Version
Email This Page to Someone!
Receive updates to this thread



Author LVM: Trying to run pvcreate on a disk.
Jack Choy
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
LVM: Trying to run pvcreate on a disk.

What am I doing wrong? Linux seems to be really finicky with LVM compared
to other OS's:

I run this to zero out the first couple of bytes on the disk (i.e. no
partition table info):

dd if=/dev/zero of=/dev/sdb bs=512 count=1

Then I try to pvcreate the whole disk:

/sbin/pvcreate /dev/sdb

and I get the following error:
pvcreate -- device "/dev/sdb" has a partition table

Why's that?! I just zeroed the beginning part of the disk!

fdisk /dev/sdb shows:
Disk /dev/sdb: 64 heads, 32 sectors, 34732 cylinders
Units = cylinders of 2048 * 512 bytes


Any ideas would be appreciated. Please reply to this group. I've had
enough of spammers.

Jack

Report this post to a moderator

Old Post 12-05-02 01:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Sybren Stuvel
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

In article <Xns92DAAFEBEB432test@204.127.199.17>, Jack Choy wrote:
> dd if=/dev/zero of=/dev/sdb bs=512 count=1
>
> and I get the following error:
> pvcreate -- device "/dev/sdb" has a partition table
>
> Why's that?! I just zeroed the beginning part of the disk!


The bootloader is in the first 512 bytes, the partition table itself is
a bit further on the disk. Why use an over-economical count of 1 when
you can use count=128 and be sure the entire partition table has been
eradicated?

Sybren
-- [colo
r=darkred]
>>> RUNNING A MICROSOFT GAME USING WINE <<<
[/color]
sybren@sybren:Mechwarrior Mercenaries$ wine MW4Mercs.exe
INSTR_IDT_Emulate Evil attempt to exploit win9x system security flaws detected
INSTR_IDT_Emulate UNIX system security is too strong, can't emulate properly

Report this post to a moderator

Old Post 12-05-02 02:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
Sybren Stuvel
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

In article <Xns92DB6021C89FDtest@204.127.199.17>, J wrote:
> I tried count=10000 and it still gave me the same results.


Have you tried running fdisk on the disk and removing the partitions by
hand? You never know...

Sybren
-- [colo
r=darkred]
>>> RUNNING A MICROSOFT GAME USING WINE <<<
[/color]
sybren@sybren:Mechwarrior Mercenaries$ wine MW4Mercs.exe
INSTR_IDT_Emulate Evil attempt to exploit win9x system security flaws detected
INSTR_IDT_Emulate UNIX system security is too strong, can't emulate properly

Report this post to a moderator

Old Post 12-05-02 08:25 PM
Reply w/Quote Edit/Delete Message IP: Logged
J
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

Sybren Stuvel <sybrenUSE@YOURthirdtower.imagination.com> wrote in
news:slrnauvchs.3ci.sybrenUSE@sybren.thirdtower.com:

> In article <Xns92DB6021C89FDtest@204.127.199.17>, J wrote:
>> I tried count=10000 and it still gave me the same results.

>
> Have you tried running fdisk on the disk and removing the partitions by
> hand? You never know...
>
> Sybren


fdisk doesn't see any partition tables. I even did a dd if=/dev/sdb
of=somefile and the file showed all zeroes.

BTW, this is RedHat 8

Report this post to a moderator

Old Post 12-05-02 10:25 PM
Reply w/Quote Edit/Delete Message IP: Logged
Sybren Stuvel
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

In article <Xns92DB8D45B9209test@204.127.202.16>, J wrote:
> fdisk doesn't see any partition tables. I even did a dd if=/dev/sdb
> of=somefile and the file showed all zeroes.


A quick search on google revealed:
http://lists.suse.com/archive/suse-...1-Jun/0280.html

+--------------------------------------------------------------------+
The problem is another one, it took me some fiddling around to find out
what exactly is going on ;-).

Of course a "dd if=/dev/zero of=/dev/sdc bs=1k count=1" destroys the
partition table on the disk. But the kernel does not know about that
command and therefore thinks the partitions that were present on
/dev/sdc before the dd command still exist. pvcreate looks at
/proc/partitions to look for partitions on the disk and in
/proc/partitions the partitions are still present even after the dd
command. So a simple dd command command is not enough to let the kernel
know the partitions on a given disk are gone. The kernel needs to be
informed that he has to re-read the partition table. This is for example
done by the command blockdev --rereadpt <diskname>.
+--------------------------------------------------------------------+

Read the rest of the article and "man blockdev" before continuing ;-)

Sybren
-- [colo
r=darkred]
>>> RUNNING A MICROSOFT GAME USING WINE <<<
[/color]
sybren@sybren:Mechwarrior Mercenaries$ wine MW4Mercs.exe
INSTR_IDT_Emulate Evil attempt to exploit win9x system security flaws detected
INSTR_IDT_Emulate UNIX system security is too strong, can't emulate properly

Report this post to a moderator

Old Post 12-06-02 12:24 AM
Reply w/Quote Edit/Delete Message IP: Logged
J
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

Thanks for the heads-up. I ended up rebooting the machine instead
to fix that problem. Now things seem to working ok.

Thanx!

Jack

Sybren Stuvel <sybrenUSE@YOURthirdtower.imagination.com> wrote in
news:slrnauvphq.3v7.sybrenUSE@sybren.thirdtower.com:

> In article <Xns92DB8D45B9209test@204.127.202.16>, J wrote:
>> fdisk doesn't see any partition tables. I even did a dd if=/dev/sdb
>> of=somefile and the file showed all zeroes.

>
> A quick search on google revealed:
> http://lists.suse.com/archive/suse-...1-Jun/0280.html
>
> +--------------------------------------------------------------------+
> The problem is another one, it took me some fiddling around to find out
> what exactly is going on ;-).
>
> Of course a "dd if=/dev/zero of=/dev/sdc bs=1k count=1" destroys the
> partition table on the disk. But the kernel does not know about that
> command and therefore thinks the partitions that were present on
> /dev/sdc before the dd command still exist. pvcreate looks at
> /proc/partitions to look for partitions on the disk and in
> /proc/partitions the partitions are still present even after the dd
> command. So a simple dd command command is not enough to let the kernel
> know the partitions on a given disk are gone. The kernel needs to be
> informed that he has to re-read the partition table. This is for

example
> done by the command blockdev --rereadpt <diskname>.
> +--------------------------------------------------------------------+
>
> Read the rest of the article and "man blockdev" before continuing ;-)
>
> Sybren


Report this post to a moderator

Old Post 12-06-02 11:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
Sybren Stuvel
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: LVM: Trying to run pvcreate on a disk.

In article <Xns92DC986A4DA13test@204.127.199.17>, J wrote:
> Thanks for the heads-up. I ended up rebooting the machine instead
> to fix that problem. Now things seem to working ok.


Good. I hope you've also learned that a quicky on google can help you a
lot ;-)

Sybren
-- [colo
r=darkred]
>>> RUNNING A MICROSOFT GAME USING WINE <<<
[/color]
sybren@sybren:Mechwarrior Mercenaries$ wine MW4Mercs.exe
INSTR_IDT_Emulate Evil attempt to exploit win9x system security flaws detected
INSTR_IDT_Emulate UNIX system security is too strong, can't emulate properly

Report this post to a moderator

Old Post 12-08-02 09:24 PM
Reply w/Quote Edit/Delete Message IP: Logged
All times are GMT.
Post new thread   Post reply


Forum Jump:
Rate This Thread:
Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF.
 

ExamNotes forum archive


Powered by: vBulletin 2.2.8
Copyright ©2000, Jelsoft Enterprises Limited.

  Free Braindumps | mcse braindumps