Hi,
I recently installed centos for the first time and I like it!
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
* What could be the source for those messages? * Should I worry about them (writing into the created LV's seems to work)? * If yes, how to fix them?
[root@frodo pilpel10]# uname -a Linux frodo 2.6.9-34.0.1.ELsmp #1 SMP Wed May 24 05:28:30 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Using lvm2 2.02.01-1.3
Thanks in advance, Itay
<quote> [root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2 /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Volume group "VGe1" successfully created [root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error PV /dev/sdc2 VG VGe1 lvm2 [296.13 GB / 296.13 GB free] PV /dev/sda2 VG VG00 lvm2 [232.78 GB / 1.78 GB free] Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ] [root@frodo pilpel10]# lvcreate -L 202G -n LVbiogateBAK_home VGe1 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Logical volume "LVbiogateBAK_home" created </quote>
On Thu, 2006-07-06 at 15:36 +0300, itayf@nospammail.net wrote:
Hi,
I recently installed centos for the first time and I like it!
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
- What could be the source for those messages?
- Should I worry about them (writing into the created LV's seems to work)?
- If yes, how to fix them?
[root@frodo pilpel10]# uname -a Linux frodo 2.6.9-34.0.1.ELsmp #1 SMP Wed May 24 05:28:30 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Using lvm2 2.02.01-1.3
Thanks in advance, Itay
<quote> [root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2
Did you do pvcreate?
/dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Volume group "VGe1" successfully created [root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error PV /dev/sdc2 VG VGe1 lvm2 [296.13 GB / 296.13 GB free] PV /dev/sda2 VG VG00 lvm2 [232.78 GB / 1.78 GB free] Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ] [root@frodo pilpel10]# lvcreate -L 202G -n LVbiogateBAK_home VGe1 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Logical volume "LVbiogateBAK_home" created
</quote> _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
From: William L. Maltby BillsCentOS@triad.rr.com
From: Itay itayf@nospammail.net
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
[snip]
[root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2
Did you do pvcreate?
As far as I remember -- yes. When I return to my office, at the beginning of next week, I'll look at the terminal session to see the exact command sequence. But my conviction is reinforced by the output of pvscan and pvdisplay (wasn't in the original message) below.
/dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error
[snip]
Volume group "VGe1" successfully created
[root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
[snip]
PV /dev/sdc2 VG VGe1 lvm2 [296.13 GB / 296.13 GB free] PV /dev/sda2 VG VG00 lvm2 [232.78 GB / 1.78 GB free] Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ]
[root@frodo ~]# pvdisplay /dev/sdc2 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error --- Physical volume --- PV Name /dev/sdc2 VG Name VGe1 PV Size 296.13 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 75810 Free PE 24098 Allocated PE 51712 PV UUID Ue56s5-nkax-csIU-6iBX-l4eb-hIJ1-nxJLgl
Thanks, Itay
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
From: Itay itayf@nospammail.net
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
[snip]
[root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2
Did you do pvcreate?
As far as I remember -- yes. When I return to my office, at the beginning of next week, I'll look at the terminal session to see the exact command sequence. But my conviction is reinforced by the output of pvscan and pvdisplay (wasn't in the original message) below.
/dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error
[snip]
Volume group "VGe1" successfully created
[root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
[snip]
PV /dev/sdc2 VG VGe1 lvm2 [296.13 GB / 296.13 GB free] PV /dev/sda2 VG VG00 lvm2 [232.78 GB / 1.78 GB free] Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ]
[root@frodo ~]# pvdisplay /dev/sdc2 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error --- Physical volume --- PV Name /dev/sdc2 VG Name VGe1 PV Size 296.13 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 75810 Free PE 24098 Allocated PE 51712 PV UUID Ue56s5-nkax-csIU-6iBX-l4eb-hIJ1-nxJLgl
Thanks, Itay
We are about to exceed my knowledge, as I have never used USB for anything other than thumb drives on MS Win*. I believe I asked about partitioning? If you do
sfdisk -l /dev/sdc
what does it show? If you do a
dd if=/dev/sdc2 of=/dev/null
do you get I/O errors? If so, my guess is it's not an LVM problem.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
[snip]
[root@frodo ~]# pvdisplay /dev/sdc2 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error --- Physical volume --- PV Name /dev/sdc2 VG Name VGe1 PV Size 296.13 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 75810 Free PE 24098 Allocated PE 51712 PV UUID Ue56s5-nkax-csIU-6iBX-l4eb-hIJ1-nxJLgl
We are about to exceed my knowledge, as I have never used USB for anything other than thumb drives on MS Win*. I believe I asked about partitioning? If you do
sfdisk -l /dev/sdc
what does it show? If you do a
dd if=/dev/sdc2 of=/dev/null
[root@frodo ~]# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sdc1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdc2 255 38912 38658 310520385 83 Linux /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty
** I note that the file system on /dev/sdc2 is 'Linux' and not 'Linux LVM'. This is what I got, eventhough I created it with parted /dev/sdc mkpart ...
[root@frodo ~]# dd if=/dev/sdc2 of=/dev/null 12747056+0 records in 12747056+0 records out
** The above output is after letting dd running for few minutes; after that I killed the process because I was afraid it will take it too long.
Thank you for your help, Itay
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
[snip]
<snip>
We are about to exceed my knowledge, as I have never used USB for anything other than thumb drives on MS Win*. I believe I asked about partitioning? If you do
sfdisk -l /dev/sdc
what does it show? If you do a
dd if=/dev/sdc2 of=/dev/null
[root@frodo ~]# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdc2 255 38912 38658 310520385 83 Linux /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty
** I note that the file system on /dev/sdc2 is 'Linux' and not 'Linux LVM'. This is what I got, eventhough I created it with parted /dev/sdc mkpart ...
There's your problem I think. In my first post, I *guessed* that type needed to be 86. I'm sure 83 is NG - that's a standard Linux part. With fdisk and it's variations, there is a command to change partition type. Do that and select the one that shows LVM 986 I think). Write and (possibly) reboot or sfdisk -R /dev/sdc (which re-reads the partition info. If it shows *LVM* as the type, do you pvcreate, vgcreate, etc. and I bet you are OK.
[root@frodo ~]# dd if=/dev/sdc2 of=/dev/null 12747056+0 records in 12747056+0 records out
** The above output is after letting dd running for few minutes; after that I killed the process because I was afraid it will take it too long.
Yes. The purpose was to see that partition size is OK (doesn't run off end of device). If you add blksize= with 4096, 8192 or 16384 or ... it goes much faster. But I think no need now, it's your partition type I think.
Thank you for your help,
Us n00bs have to stick together here! :-)
Itay
<snip sig stuff>
HTH
On Sat, 2006-07-08 at 14:13 -0400, William L. Maltby wrote:
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
[snip]
<snip>
Do that and select the one that shows LVM 986 I think). Write and
s/986/86/ # TYPO
<snip>
On Sat, 2006-07-08 at 14:13 -0400, William L. Maltby wrote:
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
<snip>
Us n00bs have to stick together here! :-)
And being n00bs, we are permitted to expound at length with guesses about what might be going on, giving the wizened cranky old pros someone to pick on and soothe their savage egos! ;-) I've not read any devel docs yet, so there may be a lot more going on.
From rom my reading, I think the device mapper (?) needs to see a partition 86 to know to look inside the partition for the meta-data (placed there by pvcreate/lvcreate?) that is used to generate the devices. My *guess* is if no type 86 is found it means no pvdata is garnered and no /dev/mapper/VolGroup* and no /dev/VolGroup* symlinks are made (or wrong ones are made or left over from elsewhere?).
I think if it finds one or more type 86 partitions, it builds all the /dev/mapper lvms and symlinks it needs. This includes proper association of minor device to vg so you don have multiple physical vols switching places on you every time you boot.
Anyway, that's my SWAG (Scientific Wild-Assed Guess) about what's going on.
<snip sig stuff>
When it's all working, be sure and post with a "[SOLVED]" added to the subject and a summary of your fixes as a courtesy to other list members and future searchers.
On Sat, Jul 08, 2006 at 02:35:51PM -0400, William L. Maltby enlightened us:
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
<snip>
Us n00bs have to stick together here! :-)
And being n00bs, we are permitted to expound at length with guesses about what might be going on, giving the wizened cranky old pros someone to pick on and soothe their savage egos! ;-) I've not read any devel docs yet, so there may be a lot more going on.
From rom my reading, I think the device mapper (?) needs to see a partition 86 to know to look inside the partition for the meta-data (placed there by pvcreate/lvcreate?) that is used to generate the devices. My *guess* is if no type 86 is found it means no pvdata is garnered and no /dev/mapper/VolGroup* and no /dev/VolGroup* symlinks are made (or wrong ones are made or left over from elsewhere?).
Type 86 is "NTFS volume set". I think you mean 8e which is "Linux LVM".
Matt
On Sat, 2006-07-08 at 14:38 -0400, Matt Hyclak wrote:
On Sat, Jul 08, 2006 at 02:35:51PM -0400, William L. Maltby enlightened us:
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com <snip><snip>
Type 86 is "NTFS volume set". I think you mean 8e which is "Linux LVM".
Thanks! I knew I wasn't sure of the type. I don't know why 86 stuck in my head.
Matt
On Sat, 2006-07-08 at 14:13 -0400, William L. Maltby wrote:
On Sat, 2006-07-08 at 21:01 +0300, Itay wrote:
On Sat, 2006-07-08 at 19:48 +0300, Itay wrote:
From: William L. Maltby BillsCentOS@triad.rr.com
<snip>
Us n00bs have to stick together here! :-)
Yup!
And being n00bs, we are permitted to expound at length with guesses about what might be going on, giving the wizened cranky old pros someone to pick on and soothe their savage egos! ;-) I've not read any devel docs yet, so there may be a lot more going on.
From rom my reading, I think the device mapper (?) needs to see a partition 86 to know to look inside the partition for the meta-data (placed there by pvcreate/lvcreate?) that is used to generate the devices. My *guess* is if no type 86 is found it means no pvdata is garnered and no /dev/mapper/VolGroup* and no /dev/VolGroup* symlinks are made (or wrong ones are made or left over from elsewhere?).
I think if it finds one or more type 86 partitions, it builds all the /dev/mapper lvms and symlinks it needs. This includes proper association of minor device to vg so you don have multiple physical vols switching places on you every time you boot.
Anyway, that's my SWAG (Scientific Wild-Assed Guess) about what's going on.
This is far-far better than my guess. I understand very little of all this volume management and device mapping.
When it's all working, be sure and post with a "[SOLVED]" added to the subject and a summary of your fixes as a courtesy to other list members and future searchers.
Sure.
Itay
[root@frodo ~]# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdc2 255 38912 38658 310520385 83 Linux /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty
** I note that the file system on /dev/sdc2 is 'Linux' and not 'Linux LVM'. This is what I got, eventhough I created it with parted /dev/sdc mkpart ...
There's your problem I think. In my first post, I *guessed* that type needed to be 86. I'm sure 83 is NG - that's a standard Linux part. With fdisk and it's variations, there is a command to change partition type. Do that and select the one that shows LVM 986 I think). Write and (possibly) reboot or sfdisk -R /dev/sdc (which re-reads the partition info. If it shows *LVM* as the type, do you pvcreate, vgcreate, etc. and I bet you are OK.
Had to wait until I came back to work and could reboot the machine. Using William's instructions, modulus using 8e as Matt Hyclak pointed out, seems to solve the problem. Everything seems to work fine: lvcreation, writing files, etc.
The only odd thing is in regard to the output of sfdisk. Note the warning when 'sfdisk -l' is invoked without a device argument. According to the man page this is a legitimate call that should produce output similar in nature to 'fdisk -l' (which works as expected).
<man> The second type of invocation: sfdisk -l [options] device will list the partitions on this device. If the device argument is omitted, the partitions on all hard disks are listed. % sfdisk -l /dev/hdc </man>
I am quite sure that this is an 'sfdisk' issue unrelated to the problem I needed to solve. But I would like to be careful before I declare [RESOLVED].
Perhaps I will try sfdisk with a different machine to see if there is a difference.
Thanks, Itay
<transcript> [root@frodo ~]# sfdisk -l
Disk /dev/sda: 30401 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sda1 * 0+ 12 13- 104391 83 Linux /dev/sda2 13 30400 30388 244091610 8e Linux LVM /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this]
[root@frodo ~]# sfdisk -l /dev/sda Disk /dev/sda: 30401 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sda1 * 0+ 12 13- 104391 83 Linux /dev/sda2 13 30400 30388 244091610 8e Linux LVM /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty
[root@frodo ~]# sfdisk -l /dev/sdb Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdb2 255 38912 38658 310520385 8e Linux LVM /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty </transcript>
On Mon, 2006-07-10 at 17:09 +0300, itayf@nospammail.net wrote:
[root@frodo ~]# sfdisk -l /dev/sdc
<snip>
Had to wait until I came back to work and could reboot the machine. Using William's instructions, modulus using 8e as Matt Hyclak pointed out, seems to solve the problem. Everything seems to work fine: lvcreation, writing files, etc.
The only odd thing is in regard to the output of sfdisk. Note the warning when 'sfdisk -l' is invoked without a device argument. According to the man page this is a legitimate call that should produce output similar in nature to 'fdisk -l' (which works as expected).
<man> The second type of invocation: sfdisk -l [options] device will list the partitions on this device. If the device argument is omitted, the partitions on all hard disks are listed. % sfdisk -l /dev/hdc </man>
I am quite sure that this is an 'sfdisk' issue unrelated to the problem I needed to solve. But I would like to be careful before I declare [RESOLVED].
My workstation, in use for over a year now, shows the same warning message (start=63...) as your transcript. Further, having used sfdisk for a *long* time for some fairly rigorous applications, I have complete confidence in it. Reread the man sections on the "+" and "-" suffix and you get your first clue. The run sfdisk again and add "-uS" and I think you will be OK with it.
It will also give warning messages if the true geometry of a drive appears to be other than what is shown in the disk label (often called MBR).
Although I have faith in the software, the doc (as is normal?) is not so trustworthy. You'll see only 1 HD in my transcript at the end of this reply, but look at this.
[root@wlmlfs08 ~]# sfdisk -l -uS /dev/hdd
Disk /dev/hdd: 7297 cylinders, 255 heads, 63 sectors/track Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System /dev/hdd1 * 63 208844 208782 83 Linux /dev/hdd2 208845 117226304 117017460 8e Linux LVM /dev/hdd3 0 - 0 0 Empty /dev/hdd4 0 - 0 0 Empty
There is a conflict in the man page: the prototype shows device is not optional if options are provided but the paragraph you high-lighted says it has a behavior that makes it optional. On my machine, the missing device specification does not produce the documented behavior. I conclude that if options are given, device is not optional *unless* you accept undefined behavior as acceptable! =>:-O
Perhaps I will try sfdisk with a different machine to see if there is a difference.
I don't think you'll see any difference if the config is similar. I've attached my transcript below.
Thanks, Itay
<snip>
============================================================= [root@wlmlfs08 ~]# sfdisk -l
Disk /dev/hda: 12161 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 12 13- 104391 83 Linux /dev/hda2 13 2445 2433 19543072+ 8e Linux LVM /dev/hda3 2446 4876 2431 19527007+ 8e Linux LVM /dev/hda4 0 - 0 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this]
[root@wlmlfs08 ~]# sfdisk -l -uS
Disk /dev/hda: 12161 cylinders, 255 heads, 63 sectors/track Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System /dev/hda1 * 63 208844 208782 83 Linux /dev/hda2 208845 39294989 39086145 8e Linux LVM /dev/hda3 39294990 78349004 39054015 8e Linux LVM /dev/hda4 0 - 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this] [root@wlmlfs08 ~]# ============================================================================
On Mon, 10 Jul 2006 11:13:42 -0400 William L. Maltby BillsCentOS@triad.rr.com wrote:
I am quite sure that this is an 'sfdisk' issue unrelated to the problem I needed to solve. But I would like to be careful before I declare [RESOLVED].
My workstation, in use for over a year now, shows the same warning message (start=63...) as your transcript. Further, having used sfdisk for a *long* time for some fairly rigorous applications, I have complete confidence in it. Reread the man sections on the "+" and "-" suffix and you get your first clue. The run sfdisk again and add "-uS" and I think you will be OK with it.
[snip]
Perhaps I will try sfdisk with a different machine to see if there is a difference.
I don't think you'll see any difference if the config is similar. I've attached my transcript below.
Indeed your example (below) confirms that this is an sfdisk issue, unrelated to my LVM problem which I now consider resolved.
Well, this is what I call 2 (or 3) at the price of one. Thanks for the extra education!
Itay
============================================================= [root@wlmlfs08 ~]# sfdisk -l
Disk /dev/hda: 12161 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 12 13- 104391 83 Linux /dev/hda2 13 2445 2433 19543072+ 8e Linux LVM /dev/hda3 2446 4876 2431 19527007+ 8e Linux LVM /dev/hda4 0 - 0 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this]
[root@wlmlfs08 ~]# sfdisk -l -uS
Disk /dev/hda: 12161 cylinders, 255 heads, 63 sectors/track Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System /dev/hda1 * 63 208844 208782 83 Linux /dev/hda2 208845 39294989 39086145 8e Linux LVM /dev/hda3 39294990 78349004 39054015 8e Linux LVM /dev/hda4 0 - 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this] [root@wlmlfs08 ~]#
============================================================================
On Mon, 2006-07-10 at 17:09 +0300, itayf@nospammail.net wrote:
[root@frodo ~]# sfdisk -l /dev/sdc
<snip>
Disk /dev/sda: 30401 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 12 13- 104391 83 Linux /dev/sda2 13 30400 30388 244091610 8e Linux LVM /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this]
<snip>
BTW: I wanted to mention for folks that may not know. If your disk is not to be booted, you can *choose* to not partition it, with little concern. Further, even bootable HDs need not be partitioned.
Since a "cylinder" (in the typical LBA world) is 8MB, you may want to gain that 8MB, if you are really tight about things. You can avoid partitioning altogether or you can start your first partition right after the disk label (MBR) or on the track following. Long ago and far away, this used to have performance implications. No more.
But be careful and know what else you are using that may affect you. Some MS stuff uses extra blocks; I also hear that some HD-related software uses "assumed" free space in the first cylinder, etc.
But if you do just Linux, you *can* skip the partitions. Even with LVM. Or start right after the MBR (disk label).
Be sure you consider various fall-back processes for "less than disaster" recovery. Partitions might still be useful on one or more of your HDs to have backup boot partitions, finer-grained LVM PV allocations, etc.
As with writing ext2 instead of ISO file systems to CD, it can be useful but be sure you don't thoughtlessly give up useful compatibility or transportability.
itayf@nospammail.net spake the following on 7/10/2006 7:09 AM:
[root@frodo ~]# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdc2 255 38912 38658 310520385 83 Linux /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty
** I note that the file system on /dev/sdc2 is 'Linux' and not 'Linux LVM'. This is what I got, eventhough I created it with parted /dev/sdc mkpart ...
There's your problem I think. In my first post, I *guessed* that type needed to be 86. I'm sure 83 is NG - that's a standard Linux part. With fdisk and it's variations, there is a command to change partition type. Do that and select the one that shows LVM 986 I think). Write and (possibly) reboot or sfdisk -R /dev/sdc (which re-reads the partition info. If it shows *LVM* as the type, do you pvcreate, vgcreate, etc. and I bet you are OK.
Had to wait until I came back to work and could reboot the machine. Using William's instructions, modulus using 8e as Matt Hyclak pointed out, seems to solve the problem. Everything seems to work fine: lvcreation, writing files, etc.
The only odd thing is in regard to the output of sfdisk. Note the warning when 'sfdisk -l' is invoked without a device argument. According to the man page this is a legitimate call that should produce output similar in nature to 'fdisk -l' (which works as expected).
<man> The second type of invocation: sfdisk -l [options] device will list the partitions on this device. If the device argument is omitted, the partitions on all hard disks are listed. % sfdisk -l /dev/hdc </man>
Since programmers are notorious for putting off the documentation, it is very common to have man pages not completely in sync with a program.
On Mon, 2006-07-10 at 14:07 -0700, Scott Silva wrote:
itayf@nospammail.net spake the following on 7/10/2006 7:09 AM:
<snip>
Since programmers are notorious for putting off the documentation, it is very common to have man pages not completely in sync with a program.
s/(notorious).*with a program/\1./
Since I was/are one, I can state that with impunity... I *hope*. ;-)
Scott Silva wrote:
Since programmers are notorious for putting off the documentation, it is very common to have man pages not completely in sync with a program.
That's one area where OpenBSD is far superior to Linux... the man pages are considered to be *the* authoritative documentation for any program. Any inaccuracies or incompleteness is considered to be a serious bug in the program.
Barry
Barry L. Kline spake the following on 7/10/2006 2:39 PM:
Scott Silva wrote:
Since programmers are notorious for putting off the documentation, it is very common to have man pages not completely in sync with a program.
That's one area where OpenBSD is far superior to Linux... the man pages are considered to be *the* authoritative documentation for any program. Any inaccuracies or incompleteness is considered to be a serious bug in the program.
Barry
That is why so much code is ported from the BSD's, at least in the early days. Even Microsoft got most of it's TCP/IP stack from BSD.
On Thu, 2006-07-06 at 15:36 +0300, itayf@nospammail.net wrote:
Hi,
I recently installed centos for the first time and I like it!
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
- What could be the source for those messages?
- Should I worry about them (writing into the created LV's seems to work)?
- If yes, how to fix them?
[root@frodo pilpel10]# uname -a Linux frodo 2.6.9-34.0.1.ELsmp #1 SMP Wed May 24 05:28:30 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Using lvm2 2.02.01-1.3
Thanks in advance, Itay
<quote> [root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2
I guess I ought to be more thoughtful about this. Is it partitioned? Type 86(IIRC)? Have you reviewed any docs so that you understand the complexity, options and necessities of this system?
/dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Volume group "VGe1" successfully created [root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 54460416: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 216895782912: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 61203218432: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error PV /dev/sdc2 VG VGe1 lvm2 [296.13 GB / 296.13 GB free] PV /dev/sda2 VG VG00 lvm2 [232.78 GB / 1.78 GB free] Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ] [root@frodo pilpel10]# lvcreate -L 202G -n LVbiogateBAK_home VGe1 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Logical volume "LVbiogateBAK_home" created
</quote> _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, 6 Jul 2006, itayf@nospammail.net wrote:
Date: Thu, 6 Jul 2006 15:36:06 +0300 (IDT) From: itayf@nospammail.net
Also, I just started working with lvm. The following warnings are genertated whenever I run one of lvm commands on the external usb disk (MyBook by Western Digital).
<quote> [root@frodo pilpel10]# vgcreate VGe1 /dev/sdc2 /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
[snip]
Volume group "VGe1" successfully created [root@frodo pilpel10]# pvscan /dev/dm-11: read failed after 0 of 4096 at 5242814464: Input/output error /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
[snip]
Total: 2 [528.91 GB] / in use: 2 [528.91 GB] / in no VG: 0 [0 ] [root@frodo pilpel10]# lvcreate -L 202G -n LVbiogateBAK_home VGe1 /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error /dev/dm-12: read failed after 0 of 4096 at 0: Input/output error /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error /dev/dm-14: read failed after 0 of 4096 at 0: Input/output error Logical volume "LVbiogateBAK_home" created
</quote>
The original sin was creating the physical, group, and logical volumes in a partition whose file system descriptor was Linux (Id=83) and not Linux LVM (Id=8e), the '/dev/sdc2' line below. The (undocumented) behavior of 'parted DEVICE mkpart ...' is to create an ex2 fs if non is specified.
The confusing part for me was, that most of lvm operations were executed, and I was able to create on the LVs a seemingly-healthy file system (see above).
Anyway, the solution was to change the fs ID, and (to be on the safe side) recreate the physical, group, and logical volumes.
Below is a summary of my actions.
Huge thanks to Bill Maltby for all the help and education, and to Matt Hyclak for his short and crucial comment.
Itay
# Hard drive state before fix
[root@frodo ~]# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sdc1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdc2 255 38912 38658 310520385 83 Linux /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty
# Is partition size OK?
[root@frodo ~]# dd if=/dev/sdc2 of=/dev/null 12747056+0 records in 12747056+0 records out
# As an extra safety, anticipate the next command's arguments
[root@frodo ~]# sfdisk --print-id /dev/sdc 2 83
# Now change the partition's file-system descriptor to Linux LVM
[root@frodo ~]# sfdisk --change-id /dev/sdc 2 8e Done
# Reread partitions on the fly
[root@frodo ~]# sfdisk -R /dev/sdc BLKRRPART: Device or resource busy This disk is currently in use. ...
# Hmmmm... Reboot and relist partitions. # The harddrive is usb so its identifier changed from c to b. # Note the '/dev/sdb2/' line -- its Linux LVM -- and compare to # '/dev/sdc2' above.
[root@frodo ~]# sfdisk -l /dev/sdb
Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 254 255- 2048256 c W95 FAT32 (LBA) /dev/sdb2 255 38912 38658 310520385 8e Linux LVM /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty
# From here, [pv|gv|lv]create, and other lvm operations went # smoothly, with no warnings.