To save the bdf information on all mounted directories

Hi,

I want to write a script to save all the bdf information (disk usage) on all mounted directories in a file. Then I want to compare saved bdf info to current system within 5%. Please help me on this. I am using HP-UX.

Actually there is data center move and I need to run the script before moving and again I need to run the script after moving to new place.

# run on old machine
bdf > filetokeep
# new machine
bdf> nextfiletokeep

If you can explain what compare to 5% means, then we can help you with that.

I think OP means acceptable diff percentage between new one and the old one :o

yes. I mean acceptable diff percentage between new one and the old one

yes. I mean acceptable diff percentage between new one and the old one

please help on this.

Hi,

I want to get the bdf information on all mounted directories in unix server.
Actually there is a data center move and I wanted to write a script to compare the bdf information before data center move and after data center move. If the differnece is 5% then I can ignore and if the differnce is more than 5% it should notify. Please suggest me on this.

No double posting, choose which one you want closed now

please reply this one. I didnt get any response for previous one properly so I posted this.

What wrong with Jims answer?

If you find the answers unsatifactory perhaps it comes from you not explaining correctly what you wish to do and give the details no?
1) What do you call a data center move:
a) moving it to another box
aa) but keeping the actual storage (we are on san...)
etc...
b) adding disks in new VG and trying to optimize using stripping:
bb) but creating same size FS
c) or ....
etc...

From what we know the only logical answer has already been given to you...

Here clearly I am explaining my requirement.

Data center move means all the mounted unix file system is going to be moved to differnt place. So I want to write a script which will give the bdf information before movement and after movement of unix file system.

e.g:- before moving I will give bdf>bdf_info.
After moving I will give bdf>bdf_info1
Now I want to compare the % difference between the disk usage from both the files.

Please help me on this. Sorry if i made any confusion.

QUOTE=vbe;302247773]What wrong with Jims answer?

If you find the answers unsatifactory perhaps it comes from you not explaining correctly what you wish to do and give the details no?
1) What do you call a data center move:
a) moving it to another box
aa) but keeping the actual storage (we are on san...)
etc...
b) adding disks in new VG and trying to optimize using stripping:
bb) but creating same size FS
c) or ....
etc...

From what we know the only logical answer has already been given to you...
[/quote]

Sorry for repeating,

Im not sure you understand the confusion, from what point of vue are you talking about?
a users perspective or a systems administrator?
Me beeing sysadmin understand :
Data is stored on a file system, this file system is mounted on a mount point knowing that this is transparent for a user, he sees his data in a directory...

So for me, unmounting and mounting elsewhere has not changed the filesystem and so the size would be the same

Now moving for me, would be creating new filesystems and moving (or copying / then erase) the data from the first to second would then change things:
the second filesystem was empty now it has data in it ...
and bdf would show the changes , but then what are you trying to compare?
Since the filesystems arent the same there is nothing to compare but the occupancy on the new filesystem, and since it was a new FS, and you copied in one go it woulndnt have fragmentation and so it will quite surely occupy less space

vbe is right - suppose the "old" filesystem was on a 50GB disk. New system is on a 100GB disk. Comparing free space on old vs free space on new makes no sense. So what are we trying to compare?

Are you worried you will lose files? If tar doesn't have errors you lost no files. If it does your new filesystem will have problems. And you will have to redo the operation. I really do not see what you are gaining by "5%" comparsion of anything. If you really want something useful try a checksum or a one-way hash on the "before" and the "after" datafiles, ignore the directories for now... if they match precisely, you won, if not you lose and have to try again.