Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Tru64, advfs, LSM; filesystem size reduction

Matt Hearn
Regular Advisor

Tru64, advfs, LSM; filesystem size reduction

I have a couple Tru64 v5.1B boxes for a new customer, and I'm not very familiar with the OS (I'm an HP-UX guy). Right now we're trying to restore a copy of our production database to a test environment, but because of some changes to production the data won't fit unless I can rearrange some space.

We have a lot of space in one filesystem that I can swipe and move to another (if possible), but I'm not sure how to do it. All of the domains are single volume domains, and I think LSM was used to create the volumes; I don't care about any data on the FSes because I'm just going to vrestore a backup from production.

I keep seeing things that say I can't reduce an advfs filesystem by using volassist; I can't tell if that's just because it would corrupt the FS (like lvreduce does in HP-UX-land), or what. I don't care if it corrupts the data on the disk because I'm replacing it, I just don't know how to rebuild the FS.

In HP-UX, of course, I'd just wipe out the lvols and rebuild them, and do a newfs; I can't figure out how to do that here. Do I need to remove the domain, use volassist to resize the volumes, and then rebuild the domain? I'm way out of my element. The two volumes are located on separate disks, I'm not sure if that makes a difference; theoretically I could reduce the size of one volume and use the space to make a small (say 2GB) volume and just put it on the other domain with addvol, right? Shouldn't matter that it's on different disks.

Thanks!!!
3 REPLIES
Matt Hearn
Regular Advisor

Re: Tru64, advfs, LSM; filesystem size reduction

After a little fiddling, here's what I'm thinking I might try. I have the following fileset I want to shrink:

Filesystem 1024-blocks Used Available Capacity Mounted on
refresh01#refresh01 46137344 12666985 33465024 28% /refresh01

Id Date Created LogPgs Version Domain Name
469b9b35.000b602d Mon Jul 16 12:22:13 2007 512 4 refresh01

Vol 512-Blks Free % Used Cmode Rblks Wblks Vol Name
1L 92274688 66930048 27% on 512 512 /dev/vol/rootdg/v-refresh01


I want to get it down to about 42MB so I can add that 4GB to another volume, or create a new volume with it to add to another directory. I know that if I use "volassist shrinkto" it'll make the directory useless, so I figure I'll just rebuild the fileset afterwards. Here's my plan:

volassist -f 42GB v-refresh01
mkfset refresh01 refresh01

Will that rebuild the advfs fileset and make it usable? Thanks!!!
Matt Hearn
Regular Advisor

Re: Tru64, advfs, LSM; filesystem size reduction

Whoops, that should be:
volassist -f shrinkto 42GB v-refresh01
Matt Hearn
Regular Advisor

Re: Tru64, advfs, LSM; filesystem size reduction

I resolved it; basically I removed the fileset, and then removed the domain. Then I used volassist to shrink the FS (although I had the options in the wrong order above; it should be "volassist -f shrinkto v-refresh01 40g") and then rebuild the domain and fileset on that volume.

I had a little difficulty moving the space to the other fileset; since it was on a separate disk, I couldn't just use volassist to expand the volume, but had to create a second volume and add it. I'm all set!