Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-11-01 Thread Ben Hutchings
John L Fjellstad wrote:
William Ballard [EMAIL PROTECTED] writes:

I have an external USB 2.0 2.5 hard drive, shows up as /dev/sda, with 
an ReiserFS partition.  If I yank it with it mounted ReiserJS panics.
I have the fstab entry marked as sync, rw.

I think it might be because reiserfs is a journaling filesystem. I know
I sometimes forget and remove my usbkey (which has FAT) without
unmounting, and don't see the problems you see.  Even ext2 should be
fine.
Absolutely not.  The point of keeping a journal is to preserve the 
integrity of the filesystem even in an operation is unexpectedly 
interrupted (whether by a crash or a power failure).  This should 
provide resilience to disconnection, too, but that doesn't mean 
disconnection without warning would be safe: the integrity of the 
filesystem is not the same as the integrity of every file within it.

If an ext2 filesystem is not cleanly unmounted then there is no 
guarantee that it will be consistent or quickly repairable.  It must 
generally be fully scanned and repaired by e2fsck.  If the filesystem is 
not mounted with metadata ordering enabled, even that won't necessarily 
work.

FAT isn't resilient to interruption either.  FAT filesystem 
implementations tend to be extremely conservative in ordering of 
changes, which may make it relatively safe to disconnect a FAT 
filesystem without unmounting it.  However, there's no way of telling 
whether a FAT filesystem has been cleanly umounted or not, so filesystem 
damage can easily go unnoticed for some time, giving a false sense of 
the safety of this practice.

Ben.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-11-01 Thread John L Fjellstad
Ben Hutchings [EMAIL PROTECTED] writes:

 Absolutely not.  The point of keeping a journal is to preserve the
 integrity of the filesystem even in an operation is unexpectedly
 interrupted (whether by a crash or a power failure).  This should
 provide resilience to disconnection, too, but that doesn't mean
 disconnection without warning would be safe: the integrity of the
 filesystem is not the same as the integrity of every file within it.

That's not what we're talking about here, though, if you follow the
thread.  You expect some corruption when you yank out a disk without
proper unmounting, if you are unlucky.  You don't expect a kernel panic
when you do. Well, at least I don't.  When I'm talking about it would be
'fine' to yank out a usbkey formated in FAT or ext2 without unmounting it
first, I'm talking about the fact it won't cause a kernel panic (again,
the context would have been apparent if you followed the thread).

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-31 Thread John L Fjellstad
William Ballard [EMAIL PROTECTED] writes:

 [XP-Focused things]
 -Install and run multi-GB map software and games in WinXP
 -Keep CD images such as Visual Studio and Map software on it,
  so they'll always be available (XP Only)
 -Treat it as a general data store for Ripped DVDs, Install Programs,
  my document store, and transferring large projects; (XP/Linux/Both)

 [Linux-focused things]
 -Keep VMWare images on it (used in Linux)
 -Keep Partimage images of XP O/S partition on it (used in Linux)
 -Keep a music library on it (used in Linux)

Looking at your usage, I would probably go with ext2 or xfs.  XFS is
supposed to be the best filesystem for big files.  Then again, I'm not
sure you need a journaled filesystem if you only read from the system
(but someone can probably correct me on that).

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-29 Thread Ron Johnson
On Thu, 2004-10-28 at 23:05 -0400, William Ballard wrote:
 On Thu, Oct 28, 2004 at 09:12:40PM -0500, Ron Johnson wrote:
  Floppy disk, CD-Rs  flash drives are a big step down from a multi-
  dozen GB-sized HDD.
 
 He's testing it on HDs, but getting a lot of feedback about how fat and 
 ReiserFs don't support sync, and if they did support sync it would be 
 slow as the dickens.  There is a suggestion to use a fastusb command 
 option which would transparently remount as async for the duration of a 
 command, and remount sync when done [1].  As long as you don't yank 
 during an async op, you shouldn't expect data loss.
 
 Pretty fascinating project -- just started 2 days ago.  Look at the 
 usbmount thread on [EMAIL PROTECTED]
 
 [1] Pretty sure XPSP2 does somethin like this, async/sync hybrid with 
 more aggressive flushes, when things settle down.  You used to have to 
 manually stop a mass storage device, bad things would happen if you 
 didn't, but that's less true now.

Interesting.  I wonder if the same issues occur on/with firewire 
drives (that's what I have).

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

Experience hath shewn, that even under the best forms [of
government] those entrusted with power have, in time, and by slow
operations, perverted it into tyranny.
Thomas Jefferson



signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-29 Thread Henrique de Moraes Holschuh
On Thu, 28 Oct 2004, Ron Johnson wrote:
 On Thu, 2004-10-28 at 17:21 -0300, Henrique de Moraes Holschuh wrote:
  It has little to do with USB. It has all to do with the hotplug kernel
  interface, though.
 
 That's interesting.
   CONFIG_HOTPLUG=y
   # CONFIG_HOTPLUG_PCI is not set
   CONFIG_USB_STORAGE_JUMPSHOT=y
 
 Note how on my system, HOTPLUG is enabled, but HOTPLUG_PCI is not.
 Yet, USB hotplugging works like a charm.

As it should.  What I meant is that *user space* hotplug handles BOTH
because the interface to the kernel is the _same_ AFAIK.  Not that you need
PCI hotplug in the kernel for USB hotplug to work.  In fact, you probably
don't need it even for CardBus, since there is a legacy interface for that
one I think...

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-29 Thread John L Fjellstad
William Ballard [EMAIL PROTECTED] writes:

 I have an external USB 2.0 2.5 hard drive, shows up as /dev/sda, with 
 an ReiserFS partition.  If I yank it with it mounted ReiserJS panics.
 I have the fstab entry marked as sync, rw.

I think it might be because reiserfs is a journaling filesystem. I know
I sometimes forget and remove my usbkey (which has FAT) without
unmounting, and don't see the problems you see.  Even ext2 should be
fine. Never tried with a journaled filesystem.  Like someone else
mentioned in this thread, it might be because the journal hasn't been
updated yet.  Probably is a bug in reiserfs too (it should recover more
gracefully).

BTW, checking the manual for mount(8), only ext2, ext3 and ufs supports
the sync keyword).

-- 
John L. Fjellstad
web: http://www.fjellstad.org/  Quis custodiet ipsos custodes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-29 Thread William Ballard
On Fri, Oct 29, 2004 at 10:38:15AM -0700, John L Fjellstad wrote:
 I think it might be because reiserfs is a journaling filesystem. I know
 I sometimes forget and remove my usbkey (which has FAT) without
 unmounting, and don't see the problems you see.  Even ext2 should be
 fine. Never tried with a journaled filesystem.  Like someone else

Switching gears to what would you do:
It's an 80GB hd @ 4200RPM, available after upgrading my laptop to 60GB @ 
7200RPM.  Would like to do the following with the external HD, in no 
particular order of priority:

[XP-Focused things]
-Install and run multi-GB map software and games in WinXP
-Keep CD images such as Visual Studio and Map software on it,
 so they'll always be available (XP Only)
-Treat it as a general data store for Ripped DVDs, Install Programs,
 my document store, and transferring large projects; (XP/Linux/Both)

[Linux-focused things]
-Keep VMWare images on it (used in Linux)
-Keep Partimage images of XP O/S partition on it (used in Linux)
-Keep a music library on it (used in Linux)

Ideally, I'd format the whole 80GB as a giant Fat32 partition, but
you can't make it that big.  So I settled on 50GB NTFS for XP to
write to and Linux to read from, and 30GB Reiserfs for Linux to
write to and XP to read from.  Thus I get the benefits of small
clusters and no wasted space in both.

Would I be better off using the 30GB as Ext2; to allow safe yanking;
or are the benefits of ReiserFS such greater as to keep it the way
it is and hope autofs gets fixed in sid.

My inclination is to keep it the way it is and wait for autofs to
start working again.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread William Ballard
On Wed, Oct 27, 2004 at 06:39:30PM -0400, Peter Hsu wrote:
 I think you missed the point.  As Ron Johnson pointed out, you need to 
 use umount before you unplug the device.  If you unplug without using 
 umount, then you should EXPECT your system to puke.  For practical 
 purposes, you should consider time elapsed since you last wrote to the 

Get off your soapbox.  There have been these things called floppies 
for a hell of a long time and they can be yanked without the kernel 
barfing.

If I mark it Sync, I can yank the damn thing.  Just look what this guy 
is doing with the usbmount script.

If I yank it at the wrong time, I fully expect to lose data.  I do not 
expect the kernel to panic.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread William Ballard
On Wed, Oct 27, 2004 at 11:23:07AM -0500, Ron Johnson wrote:
  Anything promising using the PCI hotplug facility?
 
 Just out of curiosity, but why should *PCI* hotplug have anything
 to do with USB?

# lspci | grep USB
:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
UHCI #1 (rev 02)
:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
UHCI #2 (rev 02)
:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
UHCI #3 (rev 02)
:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
UHCI #4 (rev 02)
:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 
EHCI Controller (rev 02)

USB and SCSI play very well together.  Different components can be used 
for purposes very differently from that for which they were originally 
intended.

Could you cut me a break?  All your answers have been very 
argumentative.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread Ron Johnson
On Thu, 2004-10-28 at 12:22 -0400, William Ballard wrote: 
 On Wed, Oct 27, 2004 at 11:23:07AM -0500, Ron Johnson wrote:
   Anything promising using the PCI hotplug facility?
  
  Just out of curiosity, but why should *PCI* hotplug have anything
  to do with USB?
 
 # lspci | grep USB
 :00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
 UHCI #1 (rev 02)
 :00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
 UHCI #2 (rev 02)
 :00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
 UHCI #3 (rev 02)
 :00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB 
 UHCI #4 (rev 02)
 :00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 
 EHCI Controller (rev 02)
 
 USB and SCSI play very well together.  Different components can be used 
 for purposes very differently from that for which they were originally 
 intended.
 
 Could you cut me a break?  All your answers have been very 
 argumentative.

I prefer to think of my responses as probing.

The question about PCI hotplug was very honest, since PCI hotplug
refers to pulling PCI cards out of live systems, and that, to my
understanding, has nothing to do with USB (which is hotplug by
definition).

Note, though, that the hotplug package includes support for PCI,
Cardbus (PCMCIA), USB and Firewire devices  and can automatically
configure network interfaces.

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

python -c 'print len(str(2**30))'
90309




signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread Henrique de Moraes Holschuh
On Thu, 28 Oct 2004, Ron Johnson wrote:
 On Thu, 2004-10-28 at 12:22 -0400, William Ballard wrote: 
  On Wed, Oct 27, 2004 at 11:23:07AM -0500, Ron Johnson wrote:
Anything promising using the PCI hotplug facility?

Cardbus is PCI hotplug, AFAIK.

 The question about PCI hotplug was very honest, since PCI hotplug
 refers to pulling PCI cards out of live systems, and that, to my
 understanding, has nothing to do with USB (which is hotplug by
 definition).

It has little to do with USB. It has all to do with the hotplug kernel
interface, though.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread William Ballard
On Thu, Oct 28, 2004 at 01:18:11PM -0500, Ron Johnson wrote:
 The question about PCI hotplug was very honest, since PCI hotplug
 refers to pulling PCI cards out of live systems, and that, to my
 understanding, has nothing to do with USB (which is hotplug by
 definition).

I actually think the problem lies in ReiserFS: that's the module that 
Panics when you yank the drive.  The USB subsystem deals with the loss 
of it just fine.  The system doesn't actually freeze: you get a panic 
from the ReiserFS module (which is builtin for me), about being unable 
to write to the journal.  Meanwhile all other apps continue to work just 
fine -- you just cannot halt or reboot the system, it hangs the TTY 
then, but you can change to another TTY and keep working.

Since this is the status quo, and the system is still responsive after 
this ReiserFS panic, is it still possible to cleanly shutdown and reboot 
the system in case I accidentally do it?  Right now I have to cold kill 
the system without a shutdown, which tends to cause further data 
corruption on my ReiserFS HD parts.

Do me a favor and if you think it's a dumb question just don't answer 
instead of telling me it's a dumb or poorly asked question.  Thanks.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread Ron Johnson
On Thu, 2004-10-28 at 17:21 -0300, Henrique de Moraes Holschuh wrote:
 On Thu, 28 Oct 2004, Ron Johnson wrote:
  On Thu, 2004-10-28 at 12:22 -0400, William Ballard wrote: 
   On Wed, Oct 27, 2004 at 11:23:07AM -0500, Ron Johnson wrote:
 Anything promising using the PCI hotplug facility?
 
 Cardbus is PCI hotplug, AFAIK.
 
  The question about PCI hotplug was very honest, since PCI hotplug
  refers to pulling PCI cards out of live systems, and that, to my
  understanding, has nothing to do with USB (which is hotplug by
  definition).
 
 It has little to do with USB. It has all to do with the hotplug kernel
 interface, though.

That's interesting.

  $ uname -r
  2.6.8
  $ 
  $ 
  $ zcat /proc/config.gz | grep HOT
  CONFIG_HOTPLUG=y
  # CONFIG_HOTPLUG_PCI is not set
  CONFIG_USB_STORAGE_JUMPSHOT=y

Note how on my system, HOTPLUG is enabled, but HOTPLUG_PCI is not.
Yet, USB hotplugging works like a charm.

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

What has a tiny brain, a big mouth, and an opinion nobody cares
about? You!
from Murphy Brown



signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread Ron Johnson
On Thu, 2004-10-28 at 18:20 -0400, William Ballard wrote:
 On Thu, Oct 28, 2004 at 01:18:11PM -0500, Ron Johnson wrote:
  The question about PCI hotplug was very honest, since PCI hotplug
  refers to pulling PCI cards out of live systems, and that, to my
  understanding, has nothing to do with USB (which is hotplug by
  definition).
 
 I actually think the problem lies in ReiserFS: that's the module that 
 Panics when you yank the drive.  The USB subsystem deals with the loss 
 of it just fine.  The system doesn't actually freeze: you get a panic 
 from the ReiserFS module (which is builtin for me), about being unable 
 to write to the journal.  Meanwhile all other apps continue to work just 
 fine -- you just cannot halt or reboot the system, it hangs the TTY 
 then, but you can change to another TTY and keep working.

/ and /boot are formatted ReiserFS?

The warm feeling that I get from ext2 is why /  /boot are ext3
on my system.  (/home is reiserfs, though.)

 Since this is the status quo, and the system is still responsive after 
 this ReiserFS panic, is it still possible to cleanly shutdown and reboot 
 the system in case I accidentally do it?  Right now I have to cold kill 
 the system without a shutdown, which tends to cause further data 
 corruption on my ReiserFS HD parts.

So a shutdown -t1 -now -r on another console TTY just sits there?

A cold kill (aka hitting the BRS, to us oldsters) should not
damage ReiserFS partitions.  That's what journaling is for, after
all.  What kernel are you running?

 Do me a favor and if you think it's a dumb question just don't answer 
 instead of telling me it's a dumb or poorly asked question.  Thanks.

You must be thinking of someone else.  I went back and checked 
all of my responses on this thread and nowhere does it mention
dumb or poorly asked.  It doesn't even infer them, IMO.

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

It isn't necessary to be rich and famous to be happy. It's only
necessary to be rich.
Alan Alda



signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread William Ballard
On Thu, Oct 28, 2004 at 06:12:18PM -0500, Ron Johnson wrote:
 / and /boot are formatted ReiserFS?

Yah, so I get what I deserve I guess.

 So a shutdown -t1 -now -r on another console TTY just sits there?

Yes, as does halt and reboot and Ctrl+Alt+Delete.  Halt and reboot 
say they are doing things then nothing happens.  Control returns to that 
bash prompt, and you can still Alt+F2 to another TTY.

Ctrl+Alt+Delete says the system is going down now then that TTY 
becomes unresponsive, but you can Alt+F2 to another TTY.

 A cold kill (aka hitting the BRS, to us oldsters) should not
 damage ReiserFS partitions.  That's what journaling is for, after
 all.  What kernel are you running?

I get ReiserFS corruption from time to time.  I have always assumed that 
it was due to rudely killing the system without a clean shutdown -- 
particuarly if some disk activity was occurring at the time.  For 
instance sometimes I will get corruption under /var/log, since there is 
a lot of activity there.  My big partition will get some recoverable 
corruption from time to time.  I always run the latest kernel.  It 
hasn't happened in a while, but I haven't rudely killed the system much 
lately until this USB HD Reiserfs panic issue.  I will just not do 
that as you suggest.  I just asked in case anyone knew anything.

 You must be thinking of someone else.  I went back and checked 
 all of my responses on this thread and nowhere does it mention
 dumb or poorly asked.  It doesn't even infer them, IMO.

Okay, I don't want to get into an argument about this either.  I said 
how can I yank a mounted partition and you said it's stupid to yank a 
mounted partition or even think you should be able to meanwhile another 
guy has in the same timeframe written a script called usbmount that lets 
you yank a mounted partition!

But we can move on past that now, I'm not feeling touchy or anything.  
What I'm doing now is messing with autofs which has its own problems, 
but would probably work for me (it automatically unmounts parts after 
disuse for n seconds, but the current version in sid is broken and never 
unmounts *anything* (bug #278076).  When autofs is working, then I'll 
use that and be happy as a tick.

Thanks Ron for the dialog.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread Ron Johnson
On Thu, 2004-10-28 at 20:13 -0400, William Ballard wrote:
 On Thu, Oct 28, 2004 at 06:12:18PM -0500, Ron Johnson wrote:
  / and /boot are formatted ReiserFS?

 Yah, so I get what I deserve I guess.

Jeez, touchy.  I was only asking for verification purposes.

If / and /boot were something else, and reiserfs were a
module, then *maybe* you could rmmod/insmod it and the system
wouldn't have to die.

Oh well.  (I'm not going to test that either...)

  So a shutdown -t1 -now -r on another console TTY just sits there?
 
 Yes, as does halt and reboot and Ctrl+Alt+Delete.  Halt and reboot 
 say they are doing things then nothing happens.  Control returns to that 
 bash prompt, and you can still Alt+F2 to another TTY.

Interesting.  Good to know, though.

[snip]
  You must be thinking of someone else.  I went back and checked 
  all of my responses on this thread and nowhere does it mention
  dumb or poorly asked.  It doesn't even infer them, IMO.
 
 Okay, I don't want to get into an argument about this either.  I said 
 how can I yank a mounted partition and you said it's stupid to yank a 
 mounted partition or even think you should be able to meanwhile another 
 guy has in the same timeframe written a script called usbmount that lets 
 you yank a mounted partition!

Floppy disk, CD-Rs  flash drives are a big step down from a multi-
dozen GB-sized HDD.

ReiserFS is also a heck of a lot more complicated than FAT.

 But we can move on past that now, I'm not feeling touchy or anything.  
 What I'm doing now is messing with autofs which has its own problems, 
 but would probably work for me (it automatically unmounts parts after 
 disuse for n seconds,

That would do the trick

   but the current version in sid is broken and never 
 unmounts *anything* (bug #278076).

If it worked. :)

When autofs is working, then I'll 
 use that and be happy as a tick.

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

The main reason that M$ gets bashed is that they persist in
writing bad code, on top of bad code As many have said, there
is NO PERFECT OS. The better OS though, IMHO, is the one that
will openly deal with issues, both major, and minor. Microsoft
still needs a lot of work in this area.
http://www.securityfocus.com/columnists/202/comment/24104#MSG



signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-28 Thread William Ballard
On Thu, Oct 28, 2004 at 09:12:40PM -0500, Ron Johnson wrote:
 Floppy disk, CD-Rs  flash drives are a big step down from a multi-
 dozen GB-sized HDD.

He's testing it on HDs, but getting a lot of feedback about how fat and 
ReiserFs don't support sync, and if they did support sync it would be 
slow as the dickens.  There is a suggestion to use a fastusb command 
option which would transparently remount as async for the duration of a 
command, and remount sync when done [1].  As long as you don't yank 
during an async op, you shouldn't expect data loss.

Pretty fascinating project -- just started 2 days ago.  Look at the 
usbmount thread on [EMAIL PROTECTED]

[1] Pretty sure XPSP2 does somethin like this, async/sync hybrid with 
more aggressive flushes, when things settle down.  You used to have to 
manually stop a mass storage device, bad things would happen if you 
didn't, but that's less true now.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-27 Thread Carl Fink
On Wed, Oct 27, 2004 at 06:39:30PM -0400, Peter Hsu wrote:

 This is not a bug or quirk in Debian.  It's a refusal on the part of 
 the operating system to compensate for failure to follow procedure.

No, it's a bug in Linux (as distributed by Debian).  I'm using Linux in the
sense of the kernel and closely associated stuff.

It is, not acceptable, but perhaps understandable that yanking the drive
could cause drive corruption and data loss.  For it to freeze the system is
simply silly.
--  
Carl Fink [EMAIL PROTECTED]
Jabootu's Minister of Proofreading
http://www.jabootu.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-27 Thread William Ballard
On Tue, Oct 26, 2004 at 11:45:48PM -0500, Ron Johnson wrote:
 ReiserFS expected it to be there, can't find it, and pukes.  A bit
 (no, a lot) ungraceful, but totally understandable.  After all,
 some process might be trying to write to the device...

I kuh-now, I kuh-now.  But that's what the SYNC option is before.
If I yank it within say 20 seconds of having used it, that's on me.

Windows actually deals with this better than it used to.  Windows
used to have serious problems if you lost a HD casually, but I can
just yank it now with no ill effects (if I haven't used it in,
a while).  Just flush a little more aggressively, that's all.

Some people used autofs, it seems.

Anything promising using the PCI hotplug facility?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-27 Thread Ron Johnson
On Wed, 2004-10-27 at 03:23 -0400, William Ballard wrote:
 On Tue, Oct 26, 2004 at 11:45:48PM -0500, Ron Johnson wrote:
  ReiserFS expected it to be there, can't find it, and pukes.  A bit
  (no, a lot) ungraceful, but totally understandable.  After all,
  some process might be trying to write to the device...
 
 I kuh-now, I kuh-now.  But that's what the SYNC option is before.
 If I yank it within say 20 seconds of having used it, that's on me.
 
 Windows actually deals with this better than it used to.  Windows
 used to have serious problems if you lost a HD casually, but I can
 just yank it now with no ill effects (if I haven't used it in,
 a while).  Just flush a little more aggressively, that's all.

sync, rw.

Did you lose any data when whined about being inappropriately
yanked.

 Some people used autofs, it seems.

There is that.

 Anything promising using the PCI hotplug facility?

Just out of curiosity, but why should *PCI* hotplug have anything
to do with USB?

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

Go not unto the Usenet for advice, for you will be told both
yea and nay (and quite a few things that just have nothing at
all to do with the question).
Unknown



signature.asc
Description: This is a digitally signed message part


Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-27 Thread Peter Hsu
I think you missed the point.  As Ron Johnson pointed out, you need to 
use umount before you unplug the device.  If you unplug without using 
umount, then you should EXPECT your system to puke.  For practical 
purposes, you should consider time elapsed since you last wrote to the 
device irrelevant.  Simply because Windows does a better job of 
compensating for novice users who fail to unmount a device prior to 
yanking doesn't mean that's proper procedure.

This is not a bug or quirk in Debian.  It's a refusal on the part of 
the operating system to compensate for failure to follow procedure.

Peter
On Oct 27, 2004, at 3:23 AM, William Ballard wrote:
On Tue, Oct 26, 2004 at 11:45:48PM -0500, Ron Johnson wrote:
ReiserFS expected it to be there, can't find it, and pukes.  A bit
(no, a lot) ungraceful, but totally understandable.  After all,
some process might be trying to write to the device...
I kuh-now, I kuh-now.  But that's what the SYNC option is before.
If I yank it within say 20 seconds of having used it, that's on me.
Windows actually deals with this better than it used to.  Windows
used to have serious problems if you lost a HD casually, but I can
just yank it now with no ill effects (if I haven't used it in,
a while).  Just flush a little more aggressively, that's all.
Some people used autofs, it seems.
Anything promising using the PCI hotplug facility?
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact 
[EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-26 Thread William Ballard
I have an external USB 2.0 2.5 hard drive, shows up as /dev/sda, with 
an ReiserFS partition.  If I yank it with it mounted ReiserJS panics.
I have the fstab entry marked as sync, rw.

I don't have PCI Hotplugging installed, but I do a lot of USB 
hotplugging.

Has anyone had any experience with this?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Yanking a USB Hard Drive/ReiserFS causes Kernel Panic

2004-10-26 Thread Ron Johnson
On Tue, 2004-10-26 at 23:22 -0400, William Ballard wrote:
 I have an external USB 2.0 2.5 hard drive, shows up as /dev/sda, with 
 an ReiserFS partition.  If I yank it with it mounted ReiserJS panics.
 I have the fstab entry marked as sync, rw.
 
 I don't have PCI Hotplugging installed, but I do a lot of USB 
 hotplugging.
 
 Has anyone had any experience with this?

I'm not surprised.  You're yanking out a *mounted* device.  That's
what the umount command is for.

ReiserFS expected it to be there, can't find it, and pukes.  A bit
(no, a lot) ungraceful, but totally understandable.  After all,
some process might be trying to write to the device...

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B

I prefer the most unfair peace to the most righteous war.
Marcus T Cicero



signature.asc
Description: This is a digitally signed message part