public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BLKBSZSET still not working on 2.4.18 ?
@ 2003-01-10 15:32 Ludovic Drolez
  2003-01-10 16:13 ` Andries Brouwer
  2003-01-10 17:08 ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Ludovic Drolez @ 2003-01-10 15:32 UTC (permalink / raw)
  To: linux-kernel

Hi !

I'm trying to backup a partition on an IDE drive which has an odd number 
of sectors (204939). With a stock open/read you cannot access the last 
sector, and that why I tried the BLKBSZSET ioctl to set the basic read 
block size to 512 bytes. I verified the writen value with BLKBSZGET 
ioctl, but I still cannot read this last sector !

I've tried also this:
- FreeBSD : works but it don't want to port all my software to it
- raw devices: can't read the last sector:

# raw  /dev/raw1 /dev/hda2
# dd if=/dev/raw1 of=C bs=512
dd: reading `/dev/raw1': No such device or address
204938+0 records in
204938+0 records out


What can it do ? Wait for a patch in 2.5.xxx ?

TIA,

    Ludovic Drolez.


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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 15:32 BLKBSZSET still not working on 2.4.18 ? Ludovic Drolez
@ 2003-01-10 16:13 ` Andries Brouwer
  2003-01-13 11:28   ` Ludovic Drolez
  2003-01-10 17:08 ` Alan Cox
  1 sibling, 1 reply; 8+ messages in thread
From: Andries Brouwer @ 2003-01-10 16:13 UTC (permalink / raw)
  To: Ludovic Drolez; +Cc: linux-kernel

On Fri, Jan 10, 2003 at 04:32:51PM +0100, Ludovic Drolez wrote:

> I'm trying to backup a partition on an IDE drive which has an odd number 
> of sectors (204939). With a stock open/read you cannot access the last 
> sector
> 
> What can I do ? Wait for a patch in 2.5.xxx ?

Hmm - I recall fixing this both for 2.4 and 2.5.

If that patch is not part of current 2.4, then probably this should be
regarded as a known deficiency of 2.4. If I were to maintain a stable
2.4 I would not accept such changes.

You can test 2.5. If it is wrong there I must submit a patch.

Andries

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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 15:32 BLKBSZSET still not working on 2.4.18 ? Ludovic Drolez
  2003-01-10 16:13 ` Andries Brouwer
@ 2003-01-10 17:08 ` Alan Cox
  2003-01-10 17:08   ` John Bradford
  1 sibling, 1 reply; 8+ messages in thread
From: Alan Cox @ 2003-01-10 17:08 UTC (permalink / raw)
  To: Ludovic Drolez; +Cc: Linux Kernel Mailing List

On Fri, 2003-01-10 at 15:32, Ludovic Drolez wrote:
> I'm trying to backup a partition on an IDE drive which has an odd number 
> of sectors (204939). With a stock open/read you cannot access the last 
> sector, and that why I tried the BLKBSZSET ioctl to set the basic read 
> block size to 512 bytes. I verified the writen value with BLKBSZGET 
> ioctl, but I still cannot read this last sector !

Its a known 2.4 limitation. The last odd sector isnt normally used by
anything so it has never been a big issue (except with EFI partition
data). There is a patch to allow the last sector to be recovered but
its quite ugly so never went mainstream.



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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 17:08 ` Alan Cox
@ 2003-01-10 17:08   ` John Bradford
  2003-01-10 18:14     ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: John Bradford @ 2003-01-10 17:08 UTC (permalink / raw)
  To: Alan Cox; +Cc: ludovic.drolez, linux-kernel

> > I'm trying to backup a partition on an IDE drive which has an odd number 
> > of sectors (204939). With a stock open/read you cannot access the last 
> > sector, and that why I tried the BLKBSZSET ioctl to set the basic read 
> > block size to 512 bytes. I verified the writen value with BLKBSZGET 
> > ioctl, but I still cannot read this last sector !
> 
> Its a known 2.4 limitation. The last odd sector isnt normally used by
> anything so it has never been a big issue (except with EFI partition
> data).

Didn't some really obscure IBM drives use it for something internally,
and shortly after everybody else had to stop using it incase they
overwrote the custom data at the end of an IBM disk, or am I thinking
of something else?

John.

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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 18:14     ` Alan Cox
@ 2003-01-10 17:40       ` Andries Brouwer
  0 siblings, 0 replies; 8+ messages in thread
From: Andries Brouwer @ 2003-01-10 17:40 UTC (permalink / raw)
  To: Alan Cox; +Cc: John Bradford, ludovic.drolez, Linux Kernel Mailing List

On Fri, Jan 10, 2003 at 06:14:51PM +0000, Alan Cox wrote:

> On Fri, 2003-01-10 at 17:08, John Bradford wrote:
> > Didn't some really obscure IBM drives use it for something internally,
> > and shortly after everybody else had to stop using it incase they
> > overwrote the custom data at the end of an IBM disk, or am I thinking
> > of something else?

> Something else - EFI uses the last sector for partitioning as one example.
> Drives do have protected private areas but they are shielded from normal
> use for obvious reasons

There is also a much older matter. In the distant past IBM used the
last cylinder for testing. That means that many FDISK versions and many
BIOSes subtract one from the number of available cylinders.
There are several ways to ask the BIOS for the size of a disk,
and some of these calls may invoke others, and then subtract one.
I have seen disks that had lost three cylinders that way.

Andries

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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 17:08   ` John Bradford
@ 2003-01-10 18:14     ` Alan Cox
  2003-01-10 17:40       ` Andries Brouwer
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2003-01-10 18:14 UTC (permalink / raw)
  To: John Bradford; +Cc: ludovic.drolez, Linux Kernel Mailing List

On Fri, 2003-01-10 at 17:08, John Bradford wrote:
> Didn't some really obscure IBM drives use it for something internally,
> and shortly after everybody else had to stop using it incase they
> overwrote the custom data at the end of an IBM disk, or am I thinking
> of something else?

Something else - EFI uses the last sector for partitioning as one example.
Drives do have protected private areas but they are shielded from normal
use for obvious reasons

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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-10 16:13 ` Andries Brouwer
@ 2003-01-13 11:28   ` Ludovic Drolez
  2003-01-13 15:26     ` Andries Brouwer
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Drolez @ 2003-01-13 11:28 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

Andries Brouwer wrote:
> You can test 2.5. If it is wrong there I must submit a patch.
> Andries

It seems to work perfectly with 2.5.56 even without using the BLKBSZSET 
ioctl.
But, I'm still reluctant to use an unstable kernel for backuping a 
partition. But maybe the 2.5 is stable enough to read blocks from 
IDE/SCSI drives, and send them over NFSv2 / IPv4 ?

Cheers,

-- 
Ludovic DROLEZ                                       Free&ALter Soft
152, rue de Grigy - Technopole Metz 2000                  57070 METZ
tel : 03 87 75 55 21                            fax : 03 87 75 19 26


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

* Re: BLKBSZSET still not working on 2.4.18 ?
  2003-01-13 11:28   ` Ludovic Drolez
@ 2003-01-13 15:26     ` Andries Brouwer
  0 siblings, 0 replies; 8+ messages in thread
From: Andries Brouwer @ 2003-01-13 15:26 UTC (permalink / raw)
  To: Ludovic Drolez; +Cc: linux-kernel

On Mon, Jan 13, 2003 at 12:28:36PM +0100, Ludovic Drolez wrote:

> >You can test 2.5. If it is wrong there I must submit a patch.

> It seems to work perfectly with 2.5.56

Excellent.

> But, I'm still reluctant to use an unstable kernel for backuping a 
> partition. But maybe the 2.5 is stable enough to read blocks from 
> IDE/SCSI drives, and send them over NFSv2 / IPv4 ?

Stable / unstable is not a binary decision. Some things are broken
in 2.4. Many things are broken in 2.5. Still I use 2.5.recent
on a daily basis without meeting bad problems (if I refrain from
inserting and removing USB devices).
Try, and if it works for you, fine.  But no guarantees given.

Andries

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

end of thread, other threads:[~2003-01-13 15:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 15:32 BLKBSZSET still not working on 2.4.18 ? Ludovic Drolez
2003-01-10 16:13 ` Andries Brouwer
2003-01-13 11:28   ` Ludovic Drolez
2003-01-13 15:26     ` Andries Brouwer
2003-01-10 17:08 ` Alan Cox
2003-01-10 17:08   ` John Bradford
2003-01-10 18:14     ` Alan Cox
2003-01-10 17:40       ` Andries Brouwer

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