vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| In article <df4n68$8ee$1@news.ryerson.ca>, Larry Anta <lanta@ryerson.ca> wrote: > 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. Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, remount. Doesn't get any quicker than that. -Dan |
| |||
| "Hajo Ehlers" <service@metamodul.com> wrote in message news:1125505940.819781.168090@g44g2000cwa.googlegr oups.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! |
| |||
| In article <df4prr$f1c$1@news.ryerson.ca>, Larry Anta <lanta@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 |
| |||
| Excellent. Thanks! "Dan Foster" <usenet@evilphb.org> wrote in message news:slrndhbo5n.4gu.usenet@zappy.catbert.org... > In article <df4prr$f1c$1@news.ryerson.ca>, Larry Anta <lanta@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 |
| |||
| Dan Foster wrote: > In article <df4n68$8ee$1@news.ryerson.ca>, Larry Anta <lanta@ryerson.ca> wrote: > > 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. > > Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, remount. > > Doesn't get any quicker than that. > > -Dan 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 |
| |||
| scott_doyland@johnlewis.co.uk wrote: > Dan Foster wrote: > > In article <df4n68$8ee$1@news.ryerson.ca>, Larry Anta <lanta@ryerson.ca> wrote: > > > 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. > > > > Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, remount. > > > > Doesn't get any quicker than that. > > > > -Dan > > 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 How about removing that entry in /etc/filesystem? Jason Liang |
| |||
| aixadmins@gmail.com wrote: > scott_doyland@johnlewis.co.uk wrote: > > Dan Foster wrote: > > > In article <df4n68$8ee$1@news.ryerson.ca>, Larry Anta <lanta@ryerson.ca> wrote: > > > > 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. > > > > > > Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, remount. > > > > > > Doesn't get any quicker than that. > > > > > > -Dan > > > > 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 > > > How about removing that entry in /etc/filesystem? > > Jason Liang Yes - that works. Ta, Scott |
| ||||
| umount/mkfs/mount mkfs is just the 'format' part of crfs... -r <scott_doyland@johnlewis.co.uk> wrote in message news:1125586617.564531.291950@g43g2000cwa.googlegr oups.com... > > Dan Foster wrote: >> In article <df4n68$8ee$1@news.ryerson.ca>, Larry Anta <lanta@ryerson.ca> >> wrote: >> > 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. >> >> Sure. Sounds odd, but: unmount the filesystem, remake the filesystem, >> remount. >> >> Doesn't get any quicker than that. >> >> -Dan > > 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 > |