Operating System - HP-UX
1831210 Members
3038 Online
110021 Solutions
New Discussion

Re: Script to generate files per mount point.

 
Gulam Mohiuddin
Regular Advisor

Script to generate files per mount point.

I need a script to generate a report showing names of files per mount point.

We have two PeopleSoft databases on the server. Those two Oracle databases are comprised of more than 300 data files spread across 45 different mount points, should be 250+ GB total in size.

I am trying to create a shell script which will generate a report showing data files on each mount point. This will be really useful during our re-organization or relocation.

Thanks,

Gulam
Everyday Learning.
3 REPLIES 3
RAC_1
Honored Contributor

Re: Script to generate files per mount point.

For all those mount points

find /mount_point -type f -name "*.dbf" -exec ll {} \; >> /tmp/mount_point.lst

run it when system is not at it's peak usage.
There is no substitute to HARDWORK
TwoProc
Honored Contributor

Re: Script to generate files per mount point.

well, I think all you need is an ls command...

ls /d*/data/PROD/*

or however you've got your data laid out...

ls /disk*/data/PROD/*

would give you all files on any disk mount point starting with the name /disk.

If you only want one mount point at a time...
ls /disk1/data/PROD/*
ls /disk2/data/PROD/*
etc...

We are the people our parents warned us about --Jimmy Buffett
TwoProc
Honored Contributor

Re: Script to generate files per mount point.

If you prefer to get your data from Oracle...

(from sqlplus)
select file_name from dba_data_files
order by file_name.

Or, bit more useful data...

(from sqlplus)
select file_name, tablespace_name, bytes
from dba_data_files
order by file_name;
We are the people our parents warned us about --Jimmy Buffett