1847009 Members
4509 Online
110258 Solutions
New Discussion

Mount Size Increase

 
SOLVED
Go to solution
David Barkman
Occasional Advisor

Mount Size Increase

Hello all,
I am in the process of upgrading from a D330 (10.20) to an RP5470 (L3000) (11.00). I have one mount on the old server that takes up about 22 gigs. When I moved it to the new server, I split it into two mounts. Then end result was one mount on the new server being about 2.5 gigs, and the other using up about 35 gigs:
From:
/dev/vg01/lvol10 24576000 22275315 2156906 91% /optim
To:
/dev/vg01/lvol1 20480000 2538236 17661664 13% /optim
/dev/vg01/lvol3 40960000 34694176 6216920 85% /optim/trans

Here is the VGDisplay on the D server:
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 12
Act PV 12
Max PE per PV 1024
VGDA 24
PE Size (Mbytes) 4
Total PE 12276
Alloc PE 12000
Free PE 276
Total PVG 1

Here is VGDisplay from the new server:
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 6
Act PV 6
Max PE per PV 8683
VGDA 12
PE Size (Mbytes) 4
Total PE 52086
Alloc PE 32500
Free PE 19586
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

We can't figure out what could cause this. We are going to install Online JFS soon and try defraging the new mount to see if the size comes down some. Thanks in advance for any help!
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Mount Size Increase

Depending on how you moved the data, what were links to a common file may now be multiple files or very likely sparse files were copied and during the copy wghat was sparse is now fully allocated. A sparse file can be created by writing 1 byte at offset 0 and then doing an lseek to offset 1,000,000 and writing a single byte. You have just created a file that will be reported by ls as 1,000,000 bytes but will occupy at most 2 extents UNTIL it is copied.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Mount Size Increase

Depending on how you moved the data, what were links to a common file may now be multiple files or very likely sparse files were copied.
If it ain't broke, I can fix that.
Judy Traynor
Valued Contributor
Solution

Re: Mount Size Increase

I agree with Clay -
whenever migrating, I usually do somthing like this

go on newer faster system
mkdir /mnt
mount oldserver:/filesystem /mnt
(assuming you exported the filesystem on oldserver in /etc/exports) and ran nfs.server start where /etc/rc.config.d/nfsconf had the server set to 1.

cd /mnt

Now the command line

find . -depth -print | cpio -pd /newdirectory

Now - before you do anything, look at a man page on cpio, since you may want to do something like

find . -depth -print | cpio -pdlmv /newdirectory.

Note that file sizes will rarely be the exact same, since initial block sizes on differently sized disks are not the same.
Sail With the Wind
Domenico_5
Respected Contributor

Re: Mount Size Increase

when you have run newfs for create the two new partition wich option have you used??

block size??? mmmmmm
James R. Ferguson
Acclaimed Contributor

Re: Mount Size Increase

Hi:

As Clay has indicated, the presence of sparse files, depending upon the method of copy, could easily inflate the filesystem space.

Using 'cpio' or 'fbackup' to copy preserves the "sparseness". Using 'cp' will *not*. Sparse files so copied will grow in size. Consider a 2MB sparse file viewed with 'ls' and 'du'.

# ls -l /tmp/sparse
-rw-r----- 3 root sys 2097156 Nov 15...
# du /tmp/sparse
2 /tmp/sparse

After the file is copied with 'cp':

# ls -l /tmp/sparse.cp
-rw-r----- 3 root sys 2097156 Nov 15...
# du /tmp/sparse.cp
4098 /tmp/dummydir/sparse.cp

Remember that 'du' reports in blocks of 512 bytes.

An acceptable method for replicating whole directories of regular files while preserving "sparseness" (along with permissions and modification timestamps) is this:

# cd /olddir || exit 1
# find . -depth ???print | cpio -pudlmv /newdir

Regards!

...JRF...
David Barkman
Occasional Advisor

Re: Mount Size Increase

Thanks for the help so far. I'm not sure I understand sparse files. Is there a way I can check for these, are they named sparse, or can any file with any name be a sparse file. Anyone know of a doc I could read about them.

When I created the File System I used the following command for each:
newfs -F vxfs /dev/vg01/rlvol1

To move the data, the first time I used "rcp -pr". The second time, we created a tar tape of the old system using tar cv, then recovered it onto the new system using tar xv. A funny thing about that, is we used a 24 gig tape and when it was put on the system, as above, it became 35 gigs. Could that be realted to the sparse files?

Thanks again!
James R. Ferguson
Acclaimed Contributor