Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Quick File Deletions?

7 views
Skip to first unread message

Larry Anta

unread,
Aug 31, 2005, 12:02:58 PM8/31/05
to
Is there a way to quickly delete all files in a filesystem? A recursive rm
is much too slow on a filesystem that contains hundreds of thousands of
files. Thanks.

Larry Anta


Hajo Ehlers

unread,
Aug 31, 2005, 12:32:20 PM8/31/05
to
Delete and recreate the filesystem ?

Hajo

Dan Foster

unread,
Aug 31, 2005, 12:34:39 PM8/31/05
to

Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, remount.

Doesn't get any quicker than that. :)

-Dan

Larry Anta

unread,
Aug 31, 2005, 12:48:37 PM8/31/05
to
"Hajo Ehlers" <ser...@metamodul.com> wrote in message
news:1125505940.8...@g44g2000cwa.googlegroups.com...

> Delete and recreate the filesystem ?
>
> Hajo

I was thinking of that, but would there then be a way to put the filesystem
back in its original location? rmfs will remove the lv as the last step. I
would then have to recreate the lv and then the fs, if I wanted to retain
the same pps on the same pvs. I could do this, but it would be messy. I
was hoping for something simpler, such as:

(1) A way to speed up rm itself (temporarily disabling jfs logging?), or
(2) The equivalent of Solaris's newfs command, where you simply
umount/newfs/mount and you're done!


Dan Foster

unread,
Aug 31, 2005, 12:54:15 PM8/31/05
to
In article <df4prr$f1c$1...@news.ryerson.ca>, Larry Anta <la...@ryerson.ca> wrote:
>
> I was thinking of that, but would there then be a way to put the filesystem
> back in its original location? rmfs will remove the lv as the last step. I
> would then have to recreate the lv and then the fs, if I wanted to retain
> the same pps on the same pvs. I could do this, but it would be messy. I
> was hoping for something simpler, such as:

Don't use rmfs.

Just re-do the crfs command on the LV.

That essentially reformats the LV and re-prepares it for filesystem
usage, without messing around with recreation of the LV.

> (1) A way to speed up rm itself (temporarily disabling jfs logging?), or
> (2) The equivalent of Solaris's newfs command, where you simply
> umount/newfs/mount and you're done!

crfs is equivalent to option '2'.

-Dan

Larry Anta

unread,
Aug 31, 2005, 1:07:04 PM8/31/05
to
Excellent. Thanks!

"Dan Foster" <use...@evilphb.org> wrote in message
news:slrndhbo5n...@zappy.catbert.org...

scott_...@johnlewis.co.uk

unread,
Sep 1, 2005, 10:56:57 AM9/1/05
to

I didnt think this would work, so I tried unmounting and then
recreating the FS thru smit. It didnt work and it said

crfs: 0506-909 /scott file system already exists.

Are there flags I need to the crfs to overwrite the exisitng FS.

Scott

aixa...@gmail.com

unread,
Sep 1, 2005, 2:36:34 PM9/1/05
to


How about removing that entry in /etc/filesystem?

Jason Liang

scott_...@johnlewis.co.uk

unread,
Sep 2, 2005, 3:09:17 AM9/2/05
to

Yes - that works.

Ta,
Scott

No Body

unread,
Sep 2, 2005, 10:53:32 PM9/2/05
to
umount/mkfs/mount

mkfs is just the 'format' part of crfs...

-r

<scott_...@johnlewis.co.uk> wrote in message
news:1125586617.5...@g43g2000cwa.googlegroups.com...

0 new messages