Re: Pendrive corrupted filesystem

2006-05-17 Thread Rodolfo Medina
Rodolfo Medina wrote:

>> I used `parted', and the pendrive filesystem seems to be 
>> recovered now.  I inserted the pendrive into the usb port, and:
>> 
>> # parted
>> 
>> [...]
>>
>> Disk geometry for /dev/sda: 0.000-241.500 megabytes
>> Disk label type: msdos
>> MinorStart   End Type  Filesystem  Flags
>> 1  0.016241.250  primary   fat16   boot
>> (parted) rm 1
>> (parted) p
>> Disk geometry for /dev/sda: 0.000-241.500 megabytes
>> Disk label type: msdos
>> MinorStart   End Type  Filesystem  Flags
>> (parted) mkpartfs primary fat16 0.000 241.500
>> (parted) p
>> Disk geometry for /dev/sda: 0.000-241.500 megabytes
>> Disk label type: msdos
>> MinorStart   End Type  Filesystem  Flags
>> 1  0.031235.327  primary   fat16



Owen Heisler <[EMAIL PROTECTED]> writes:

> Looks fine to me, except that FAT32 would be more preferable than FAT16.
> I think that FAT16 is less efficient; there are probably other
> disadvantages too.


I used fat16 simply because `parted' detected a fat16 partition in the
pendrive, and I wanted to restore the previous pendrive status.

Thanks, cheers,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-15 Thread Chris Howie
Owen Heisler wrote:
> On Sat, 2006-05-13 at 06:56 -0700, Tony Godshall wrote:
> [...]
> 
>>A side note/tip:  It can be good to mount these types of
>>drives with -o sync.  I've pulled out my usb flash drive by
>>mistake before it was really done because without option
>>sync cp and mv would return as soon as the operation was 
>>queued.
> 
> Unless you want significant better performance.  I really like being
> able to work off of floppies and usb drives quickly with async set.  You
> can mess around all you want, and then when you're done unmount and
> watch Linux throw it all on!

Unless you're like me, and you're mounting a volume to put one large file on it
and actually want to see a progress bar while the thing writes so you can go do
something else.

(That was a lot of clauses.)

-- 
Chris Howie
http://www.chrishowie.com

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCS/IT d-(--) s:- a--->? C++(+++)$> UL P$ L+++> E---
W++ N o++ K? w--$ O M- V- PS--(---) PE++ Y+ PGP++ t+ 5? X-
R(+)>- tv-(--) b- DI+> D++ G>+++ e>++ h(--)>--- !r>+++ y->+++
--END GEEK CODE BLOCK--


signature.asc
Description: OpenPGP digital signature


Re: Pendrive corrupted filesystem

2006-05-15 Thread Christopher Nelson
On Sat, May 13, 2006 at 11:49:49AM -0500, Owen Heisler wrote:
> On Sat, 2006-05-13 at 06:56 -0700, Tony Godshall wrote:
> [...]
> > 
> > A side note/tip:  It can be good to mount these types of
> > drives with -o sync.  I've pulled out my usb flash drive by
> > mistake before it was really done because without option
> > sync cp and mv would return as soon as the operation was 
> > queued.
> Unless you want significant better performance.  I really like being
> able to work off of floppies and usb drives quickly with async set.  You
> can mess around all you want, and then when you're done unmount and
> watch Linux throw it all on!

You also minimize writes to the device with async--which can be an issue
in the lifespan of some older/cheaper drives I've heard.

-- 
Christopher Nelson -- [EMAIL PROTECTED]
---
Earn cash in your spare time -- blackmail your friends.


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



Re: Pendrive corrupted filesystem

2006-05-14 Thread Rodolfo Medina
Rodolfo Medina <[EMAIL PROTECTED]> writes:

> When I try to remove a certain directory from my pendrive,
> the following error message appears:
>
> $ rm -vr to-be-removed
> rm: WARNING: Circular directory structure.
> This almost certainly means that you have a corrupted file system.
> NOTIFY YOUR SYSTEM MANAGER.
> The following directory is part of the cycle:
>   `to-be-removed/News/to-be-removed/News'
>
> . Do I have to throw it away, or is there a way to repair it?


Tony Godshall wrote:

> You can try formatting it, e.g. mkfs.vfat /dev/mypendrive



Owen Heisler <[EMAIL PROTECTED]> wrote:

> You certainly don't need to throw away the drive (just use fdisk to
> repartition and mkdosfs to format it)



Ron Johnson <[EMAIL PROTECTED]> wrote:

> Install dosfstools, umount the
> partition and fsck it.


I used `parted', and the pendrive filesystem seems to be 
recovered now.  I inserted the pendrive into the usb port, and:


# parted
GNU Parted 1.6.21 with HFS shrink patch 16
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Using /dev/sda
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
MinorStart   End Type  Filesystem  Flags
1  0.016241.250  primary   fat16   boot
(parted) rm 1
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
MinorStart   End Type  Filesystem  Flags
(parted) mkpartfs primary fat16 0.000 241.500
(parted) p
Disk geometry for /dev/sda: 0.000-241.500 megabytes
Disk label type: msdos
MinorStart   End Type  Filesystem  Flags
1  0.031235.327  primary   fat16


. Then I copied all the files and directories again, and


$ df /mnt/sda1
Filesystem   1K-blocks  Used Available Use% Mounted on
/dev/sda1   240688179036 61652  75% /mnt/sda1






. Thanks to all who provided help.
Do you think it is all right now?
Cheers,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-13 Thread Ron Johnson
On Sat, 2006-05-13 at 18:48 +0200, Rodolfo Medina wrote:
> Ron Johnson <[EMAIL PROTECTED]> writes:
> 
> >> > We need more information.  Show us the results of
> >> >
> >> > $ ls -aFl to-be-removed
> >
> > [...]
> >
> > How about:
> > $ ls -aFl to-be-removed/News
> 
> 
> Here's the whole situation:
> 
> $ ls -aFl /mnt/sda1
> total 52
> drwxr-xr-x   8 rodolfo rodolfo 16384 1970-01-01 01:00 ./
[snip]
> drwxr-xr-x   2 rodolfo rodolfo 4096 2006-05-06 14:31 math_and_other_stuff/
> drwxr-xr-x   7 rodolfo rodolfo 4096 2006-05-12 23:39 News/
> drwxr-xr-x   2 rodolfo rodolfo 4096 2006-04-15 19:40 Outlook/
> drwxr-xr-x   3 rodolfo rodolfo 4096 2006-04-15 19:48 to-be-removed/

Hmmm.  vfat or ext2?  Irrelevant.  Install dosfstools, umount the
partition and fsck it.

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA

"A good plan today is better than a perfect plan tomorrow."
General George S. Patton


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



Re: Pendrive corrupted filesystem

2006-05-13 Thread Rodolfo Medina
Ron Johnson <[EMAIL PROTECTED]> writes:

>> > We need more information.  Show us the results of
>> >
>> > $ ls -aFl to-be-removed
>
> [...]
>
> How about:
> $ ls -aFl to-be-removed/News


Here's the whole situation:

$ ls -aFl /mnt/sda1
total 52
drwxr-xr-x   8 rodolfo rodolfo 16384 1970-01-01 01:00 ./
drwxr-xr-x   4 rootroot 4096 2006-05-12 10:34 ../
drwxr-xr-x   4 rodolfo rodolfo  8192 2006-05-12 12:37 howto/
drwxr-xr-x  44 rodolfo rodolfo  8192 2006-05-12 23:38 Mail/
drwxr-xr-x   2 rodolfo rodolfo  4096 2006-05-06 14:31 math_and_other_stuff/
drwxr-xr-x   7 rodolfo rodolfo  4096 2006-05-12 23:39 News/
drwxr-xr-x   2 rodolfo rodolfo  4096 2006-04-15 19:40 Outlook/
drwxr-xr-x   3 rodolfo rodolfo  4096 2006-04-15 19:48 to-be-removed/

$ rm -vr to-be-removed
rm: cannot remove `to-be-removed': No such file or directory
[EMAIL PROTECTED]:~$ rm -vr /mnt/sda1/to-be-removed
rm: WARNING: Circular directory structure.
This almost certainly means that you have a corrupted file system.
NOTIFY YOUR SYSTEM MANAGER.
The following directory is part of the cycle:
  `/mnt/sda1/to-be-removed/News/to-be-removed/News'

$ ls -aFl /mnt/sda1/to-be-removed
total 20
drwxr-xr-x  3 rodolfo rodolfo  4096 2006-04-15 19:48 ./
drwxr-xr-x  8 rodolfo rodolfo 16384 1970-01-01 01:00 ../
drwxr-xr-x  0 rodolfo rodolfo 0 2006-04-15 19:01 News/

$ ls -aFl /mnt/sda1/to-be-removed/News
total 32
drwxr-xr-x   4 rodolfo rodolfo 8192 2006-05-12 12:37 howto/
drwxr-xr-x  44 rodolfo rodolfo 8192 2006-05-12 23:38 Mail/
drwxr-xr-x   2 rodolfo rodolfo 4096 2006-05-06 14:31 math_and_other_stuff/
drwxr-xr-x   7 rodolfo rodolfo 4096 2006-05-12 23:39 News/
drwxr-xr-x   2 rodolfo rodolfo 4096 2006-04-15 19:40 Outlook/
drwxr-xr-x   3 rodolfo rodolfo 4096 2006-04-15 19:48 to-be-removed/

$ ls -aFl /mnt/sda1/to-be-removed/News/to-be-removed
total 20
drwxr-xr-x  3 rodolfo rodolfo  4096 2006-04-15 19:48 ./
drwxr-xr-x  8 rodolfo rodolfo 16384 1970-01-01 01:00 ../
drwxr-xr-x  0 rodolfo rodolfo 0 2006-04-15 19:01 News/

$ ls -aFl /mnt/sda1/to-be-removed/News/to-be-removed/News
total 32
drwxr-xr-x   4 rodolfo rodolfo 8192 2006-05-12 12:37 howto/
drwxr-xr-x  44 rodolfo rodolfo 8192 2006-05-12 23:38 Mail/
drwxr-xr-x   2 rodolfo rodolfo 4096 2006-05-06 14:31 math_and_other_stuff/
drwxr-xr-x   7 rodolfo rodolfo 4096 2006-05-12 23:39 News/
drwxr-xr-x   2 rodolfo rodolfo 4096 2006-04-15 19:40 Outlook/
drwxr-xr-x   3 rodolfo rodolfo 4096 2006-04-15 19:48 to-be-removed/


... and so on.

Cheers,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-13 Thread Owen Heisler
On Sat, 2006-05-13 at 06:56 -0700, Tony Godshall wrote:
[...]
> 
> A side note/tip:  It can be good to mount these types of
> drives with -o sync.  I've pulled out my usb flash drive by
> mistake before it was really done because without option
> sync cp and mv would return as soon as the operation was 
> queued.
Unless you want significant better performance.  I really like being
able to work off of floppies and usb drives quickly with async set.  You
can mess around all you want, and then when you're done unmount and
watch Linux throw it all on!


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



Re: Pendrive corrupted filesystem

2006-05-13 Thread Tony Godshall
According to Rodolfo Medina,
> Hi.
> 
> When I try to remove a certain directory from my pendrive,
> the following error message appears:
> 
> $ rm -vr to-be-removed
> rm: WARNING: Circular directory structure.
> This almost certainly means that you have a corrupted file system.
> NOTIFY YOUR SYSTEM MANAGER.
> The following directory is part of the cycle:
>   `to-be-removed/News/to-be-removed/News'
> 
> . Do I have to throw it away, or is there a way to repair it?
> Thanks,
> Rodolfo

You can try formatting it, e.g. mkfs.vfat /dev/mypendrive

A side note/tip:  It can be good to mount these types of
drives with -o sync.  I've pulled out my usb flash drive by
mistake before it was really done because without option
sync cp and mv would return as soon as the operation was 
queued.


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



Re: Pendrive corrupted filesystem

2006-05-12 Thread Ron Johnson
On Fri, 2006-05-12 at 19:26 +0200, Rodolfo Medina wrote:
> Rodolfo Medina wrote:
> 
> >> When I try to remove a certain directory from my pendrive,
> >> the following error message appears:
> >> 
> >> $ rm -vr to-be-removed
> >> rm: WARNING: Circular directory structure.
> >> This almost certainly means that you have a corrupted file system.
> >> NOTIFY YOUR SYSTEM MANAGER.
> >> The following directory is part of the cycle:
> >>   `to-be-removed/News/to-be-removed/News'
> >> 
> >> . Do I have to throw it away, or is there a way to repair it?
>
> Ron Johnson <[EMAIL PROTECTED]> writes:
> 
> > We need more information.  Show us the results of
> >
> > $ ls -aFl to-be-removed
> 
> 
> 
> Thanks. Here it is:
> 
> $ ls -aFl to-be-removed
> total 20
> drwxr-xr-x  3 rodolfo rodolfo  4096 2006-04-15 19:48 ./
> drwxr-xr-x  8 rodolfo rodolfo 16384 1970-01-01 01:00 ../
> drwxr-xr-x  0 rodolfo rodolfo 0 2006-04-15 19:01 News/

How about:
$ ls -aFl to-be-removed/News

-- 
-
Ron Johnson, Jr.
Jefferson, LA USA

If 1/2 of all US marriages end in divorce, and there are a good
number of 3rd, 4th, etc marriages, then more than 1/2 of all 1st
marriages will be permanent.


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



Re: Pendrive corrupted filesystem

2006-05-12 Thread Rodolfo Medina
Rodolfo Medina wrote:

>> When I try to remove a certain directory from my pendrive,
>> the following error message appears:
>> 
>> $ rm -vr to-be-removed
>> rm: WARNING: Circular directory structure.
>> This almost certainly means that you have a corrupted file system.
>> NOTIFY YOUR SYSTEM MANAGER.
>> The following directory is part of the cycle:
>>   `to-be-removed/News/to-be-removed/News'
>> 
>> . Do I have to throw it away, or is there a way to repair it?




Owen Heisler <[EMAIL PROTECTED]> writes:

> You certainly don't need to throw away the drive (just use fdisk to
> repartition and mkdosfs to format it), but I don't know about the data
> on the filesystem now.




The data are safe at the moment.
All the directories different from `to-be-removed' seem all right.
I'll be trying fdisk and mkdosfs as you suggest.

Thanks,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-12 Thread Rodolfo Medina
Rodolfo Medina wrote:

>> When I try to remove a certain directory from my pendrive,
>> the following error message appears:
>> 
>> $ rm -vr to-be-removed
>> rm: WARNING: Circular directory structure.
>> This almost certainly means that you have a corrupted file system.
>> NOTIFY YOUR SYSTEM MANAGER.
>> The following directory is part of the cycle:
>>   `to-be-removed/News/to-be-removed/News'
>> 
>> . Do I have to throw it away, or is there a way to repair it?



Ron Johnson <[EMAIL PROTECTED]> writes:

> We need more information.  Show us the results of
>
> $ ls -aFl to-be-removed



Thanks. Here it is:

$ ls -aFl to-be-removed
total 20
drwxr-xr-x  3 rodolfo rodolfo  4096 2006-04-15 19:48 ./
drwxr-xr-x  8 rodolfo rodolfo 16384 1970-01-01 01:00 ../
drwxr-xr-x  0 rodolfo rodolfo 0 2006-04-15 19:01 News/


Cheers,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-12 Thread Rodolfo Medina
Rodolfo Medina wrote:

>> When I try to remove a certain directory from my pendrive,
>> the following error message appears:
>> 
>> $ rm -vr to-be-removed
>> rm: WARNING: Circular directory structure.
>> This almost certainly means that you have a corrupted file system.
>> NOTIFY YOUR SYSTEM MANAGER.
>> The following directory is part of the cycle:
>>   `to-be-removed/News/to-be-removed/News'
>> 
>> . Do I have to throw it away, or is there a way to repair it?




Owen Heisler <[EMAIL PROTECTED]> writes:

> You certainly don't need to throw away the drive (just use fdisk to
> repartition and mkdosfs to format it), but I don't know about the data
> on the filesystem now.




The data are safe at the moment.
All the directories different from `to-be-removed' seem all right.
I'll be trying fdisk and mkdosfs as you suggest.

Thanks,
Rodolfo


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



Re: Pendrive corrupted filesystem

2006-05-12 Thread Ron Johnson
On Fri, 2006-05-12 at 11:13 +0200, Rodolfo Medina wrote:
> Hi.
> 
> When I try to remove a certain directory from my pendrive,
> the following error message appears:
> 
> $ rm -vr to-be-removed
> rm: WARNING: Circular directory structure.
> This almost certainly means that you have a corrupted file system.
> NOTIFY YOUR SYSTEM MANAGER.
> The following directory is part of the cycle:
>   `to-be-removed/News/to-be-removed/News'
> 
> . Do I have to throw it away, or is there a way to repair it?

We need more information.  Show us the results of

$ ls -aFl to-be-removed


-- 
-
Ron Johnson, Jr.
Jefferson, LA USA

"Knowledge should be free for all."
Harcourt Fenton Mudd, Star Trek:TOS, "I, Mudd"


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