ADSM-L

Re: [ADSM-L] Orphaned filespaces

2007-03-31 04:11:11
Subject: Re: [ADSM-L] Orphaned filespaces
From: David Bronder <david-bronder AT UIOWA DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 30 Mar 2007 23:26:39 -0500
David E Ehresman wrote:
>
> I've never quite figured out cross table queries.  Could someone give
> me a select statement that would list node_name,filespace_name entries
> that exist in the filespaces table but not in the occupancy table, i.e.
> filespaces that have no data stored.

I was beating my head against this one last month when trying to clean
up empty TDPO filespaces.

I spent a while (plus sought help from coworkers with better SQL smarts
than I have) trying to come up with a select statement that would give
me the very list you're asking for.  We eventually came up with one that
might have worked, but it looked like it was going to take hours to run.

Instead, I ran the two individual selects (one against the filespaces
table, one against the occupancy table), each output to separate files
on my AIX workstation (any Unix will do here).  Then after a little bit
of formatting cleanup on the files themselves, I pulled the ones from
filespaces file that weren't in the occupancy file (I think I used comm
but fgrep would do fine, too).  I just had to make sure the formatting
was identical in both files (including spacing).

Rather than many hours waiting for a select that may not have worked, it
took me just a few minutes.

I haven't gone back to semi-automate the process yet, unfortunately, but
it should be pretty easy to do.

=Dave

--
Hello World.                                    David Bronder - Systems Admin
Segmentation Fault                                     ITS-SPA, Univ. of Iowa
Core dumped, disk trashed, quota filled, soda warm.   david-bronder AT uiowa 
DOT edu

<Prev in Thread] Current Thread [Next in Thread>