Re: Problems with SanDisk USB stick



On Mon, 10 Jul 2006 22:31:46 -0500, Dances With Crows wrote:

On Tue, 11 Jul 2006 02:59:08 GMT, Steven Jones staggered into the Black
Sun and said:
Dances With Crows wrote:
Steven Jones wrote:
4 GB SanDisk Cruzer Mini USB stick. I can mount it fine as an ext2
filesystem. If I create a directory D on the drive, the directory
seems to be created with no problems. I can then copy stuff to D, and
everything still seems to be OK. I now [umount] it, and a while later
I mount it again.
OK, did you wait until umount returned before unplugging the device?
When you umount a removable storage device, all pending writes are
flushed. If you remove the device while writes are being flushed, you
can get Undefined Behavior.
The only thing that I do is unmount it. It remains plugged in all the
time.

OK, that's weird. What happens if you leave it mounted? If it's plugged
in all the time, is there any reason to umount it?

Well, the fact the it is plugged all the time does not mean that it
has to. At some I will have to unplug it, anyway :-)

?---rw---- 12336 808464432 808464432 808464432 1995-08-14 22:27 D
What is going on? Why is D so thoroughly messed up?
Impossible to say without more information. Are there any weird things
in the output from dmesg wrt the USB subsystem?
EXT2-fs error (device sda1): ext2_free_blocks: Freeing blocks in system
zones - Block = 819694, count = 6
[snip]
EXT2-fs warning: mounting fs with errors, running e2fsck is recommended

Right, did you umount the device and fsck it? This is not something you
should be seeing.

I did unmount it, and then I reformatted it couple of times. I have not
fsck'ed it yet though.

I am using a 2.6.16.22 kernel under Slackware 10.2.

Is this a vanilla kernel, or a distro-patched kernel? I've seen far too
many weird problems with distro-patched kernels to trust them for
anything other than getting the system up and running.

It's a kernel I built myself. This kernel works fine - in particular,
other USB sticks (Lexar) work fine under it.



What do you mean the device ID? Is that the output from lspci, or
lsusb, or something else?

I mean the output from lsusb. It's possible the device is weird in some
way, and it isn't in your kernel's unusual-devs.h file yet.

Consider using something other than ext2 on this device, because an
ext2 filesystem is a PITA to use on anything other than a Linux
system.
The device may also assume it's being used as a FAT filesystem, which
it shouldn't be doing, but
As it happens, I need something with more punch than FAT, for I would
like to use the stick for backups

??? What sort of backup strategy depends on a filesystem's features?
Does a DLT or DDS tape have a filesystem on it? Read the Unix Backup
and Recovery HOWTO, and the info page for tar, before you go any
further. Also check out partimage.
I need [this device to] support ownership and permissions. What could I
use other than ext2?

See above paragraph. And there's something wrong with this device or
your kernel's handling of this device. Zorch it and mkdosfs -F32 it,
then see if the errors reoccur when the thing's FAT32. If they do,
you've probably got a hardware problem. If not, the solution is
obvious--tar and split your backups. HTH,

I'll consider that.

.



Relevant Pages

  • Re: the umount() saga for regular linux desktop users
    ... I love linux and all the wonderfull ... > The following comments and suggestions about umount() stem from ... when attempting to umounta filesystem I receive ... > behaviour of the linux kernel. ...
    (Linux-Kernel)
  • the umount() saga for regular linux desktop users
    ... I am a linux desktop user. ... wish I understook how the kernel works) ... when attempting to umount() a filesystem I receive 'device is busy' ...
    (Linux-Kernel)
  • Re: Problems with SanDisk USB stick
    ... did you wait until umount returned before unplugging the device? ... or a distro-patched kernel? ... ext2 filesystem is a PITA to use on anything other than a Linux ... obvious--tar and split your backups. ...
    (comp.os.linux.misc)
  • Re: the umount() saga for regular linux desktop users
    ... > themselves to the filesystem concerned. ... The kernel should do it's best to satisfy ... > the umount request and cleanup. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • "umount: device is busy" when device is not in use?
    ... The reason being I have a stubborn NFS mount that refuses to unmount ... $ umount -f /mnt/data ... So the kernel obviously thinks the filesystem is in use, ...
    (Linux-Kernel)