Solaris Filesystem usage discrepancy after "copy"


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris Filesystem usage discrepancy after "copy"
# 1  
Old 11-02-2012
Solaris Filesystem usage discrepancy after "copy"

I have a query someone may be able to shed some light on...

We have a Solaris 10 OS Sun V490 server Sparc.

I have a SAN attached EMC Clarrion LUN which we have app data stored on.
Pseudo name=emcpower0a
CLARiiON ID=CK200070300470

Due to storage requirements - I need to migrate this data onto a SAN attached DMX Symmetrix volume.
Pseudo name=emcpower1a
Symmetrix ID=000290103149

I have the existing Clariion disk attached and configured, labelled, partitioned as normal and mounted under /emc.

I took the newly presented DMX storage disk and made this visible to format (devfsadm & cfgadm commands) and then labelled and partitioned this disk also. This is now mounted as /NEWemc.

* At this point - I discovered that Solaris has nuances with regards to direct copying of symbolic links so I have chosen to not use a straightforward...

Code:
"cp -rp /emc/* /NEWemc/"

I had attempted this firstly but this posed issues for us as rather than copying the symbolic link - actual files were fetched for the copy. I believe there is a '-H' switch that can be incorporated but I did not get this to work properly for me.

Instead what I chose to do was perform a tar direct input/output compress/extract.

cd /emc
tar -cfp - ./* | (cd /NEWemc/; tar -xvfp -)

This works very effectively and all files/directories/symbolic links appear to come across from the old disk to the new as expected.

** However! **
Both du and df filesystem usage commands are reporting a very different sitaution

Inquiry into 'old' disk filesystem
Code:
root@server:/emc> df -k /emc
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/emcpower0a  61756540 12339844 48799131    21%    /emc
root@server:/emc> df -h /emc
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/emcpower0a     59G    12G    47G    21%    /emc
root@server:/emc> du -sk /emc
12278596        /emc
root@server:/emc> find /emc/ | wc -l
   73289


Inquiry into 'NEW' disk filesystem
Code:
root@server:/emc> df -k /NEWemc/
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/emcpower1a  69586089 28531665 40358564    42%    /NEWemc
root@server:/emc> df -h /NEWemc/
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/emcpower1a     66G    27G    38G    42%    /NEWemc
root@server:/emc> du -sk /NEWemc/
28466121        /NEWemc
root@server:/emc> find /NEWemc/ | wc -l
   73289

I understand that du and df can sometimes display slightly skewed results but the discrepancy here is significantly different!
I have unmounted the /NEWemc filesystem and also rebooted the server - but the filesystem usage stats do not fall into line... which is what I would expect?

Anyone have any suggestions please?
Am I incorrect in my expectations?
# 2  
Old 11-02-2012
Maybe the AU is different, since that is one place where du and df differ. I think du thinks we still have 512 byte sectors. I recall that du multi-counts hard links, too. Find picks up directory hard links .. and ., running that line count up.
# 3  
Old 11-02-2012
Could you show us what gives
Code:
ls -ald /emc/*

and
Code:
ls -ald /NEWemc/*

?
# 4  
Old 11-02-2012
AU?

Hi DGPickett,

Thanks for responding.

I'm not familiar with the term AU at all - can you explain?

---------- Post updated at 06:33 PM ---------- Previous update was at 06:25 PM ----------

Hi ctsgnb,

Thanks - please see below. Not sure what that demonstrates though?

Code:
root@server:/emc> ls -ald /emc/*
drwxr-xr-x   6 root     root         512 Sep 11  2007 /emc/apps
-rw-r--r--   1 root     root         999 Apr  7  2011 /emc/format.out
-rw-r--r--   1 root     root        2063 Apr  7  2011 /emc/iostat.out
-rw-r--r--   1 root     root      208433 Apr  7  2011 /emc/Logs.zip
drwx------   2 root     root        8192 Oct 30  2007 /emc/lost+found
-rw-r--r--   1 root     root     2902448 Apr  7  2011 /emc/messages.out
-rw-r--r--   1 root     root         884 Apr  7  2011 /emc/metadb.out
-rw-r--r--   1 root     root        2703 Apr  7  2011 /emc/metastat.out
drwxr-xr-x   2 root     root         512 Nov  2 13:04 /emc/Red
drwxr-xr-x  15 gt      access       512 Feb  8  2012 /emc/t1
drwxr-xr-x   2 root     root         512 Sep 24 09:49 /emc/tmp
root@server:/emc> ls -ald /NEWemc/*
drwxr-xr-x   6 root     root         512 Sep 11  2007 /NEWemc/apps
-rw-r--r--   1 root     root         999 Apr  7  2011 /NEWemc/format.out
-rw-r--r--   1 root     root        2063 Apr  7  2011 /NEWemc/iostat.out
-rw-r--r--   1 root     root      208433 Apr  7  2011 /NEWemc/Logs.zip
drwx------   2 root     root        8192 Oct 30  2007 /NEWemc/lost+found
-rw-r--r--   1 root     root     2902448 Apr  7  2011 /NEWemc/messages.out
-rw-r--r--   1 root     root         884 Apr  7  2011 /NEWemc/metadb.out
-rw-r--r--   1 root     root        2703 Apr  7  2011 /NEWemc/metastat.out
drwxr-xr-x   2 root     root         512 Nov  2 13:04 /NEWemc/Red
drwxr-xr-x  15 gt      access       512 Feb  8  2012 /NEWemc/t1
drwxr-xr-x   2 root     root         512 Sep 24 09:49 /NEWemc/tmp

Regards
# 5  
Old 11-07-2012
Allocation unit, a genneral term for what size hunk is given out. Often, it is the page size, but it can be a multiple. If the au is 32K, a one byte file takes 32K, bu does not have to ask for more or seek until over 32k. du reports bytes used, not allocated, as I recall, and of course df deals with what is allocated. A file of 0 lengh is just an inode, but a sym link needs an au to store the path, and directories are just flat binary files with a different inode bit setting, so they also use one or more au. So space allocated is, in integer math and integer au: ( byte_size + au - 1 ) / au

BTW, with ls the -a is defeated by the -d and *, as * ignores .* and -d stops listing of directory content in favor of the directory itself. To see all files and dirs in a dir, "ls -la dirname". "find" is very good about inclusion, though, except when you push past hidden inodes with *, e.g. "find whatever* -options".

Last edited by DGPickett; 11-07-2012 at 05:38 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Solaris

ZFS flash install "Unable to create Filesystem error"

Hi, I am trying to get an HPz420 workstation instaled (zfs root pool) via a jump-start server. I have a zfs image (from this workstation) the Solaris release is 10 1/13 update 11. I use a sparc U25 install server, upgraded to the same solaris build 10 1/13. This server is configured to install... (8 Replies)
Discussion started by: sc0rpie
8 Replies

5. Solaris

Printer configuration Migration from Solaris 10 "LP" to Solaris 11 "CUPS"

Need to find a way to import an LP printers.conf file to CUPS. I have some new Solaris 11.1 boxes that need to have 300 printers added. (0 Replies)
Discussion started by: os2mac
0 Replies

6. Red Hat

eliminating "mounted filesystem" messages from syslog

Hello all, perhaps this is an odd request, but I have the requirement none the less. Every time I mount a filesystem (at least an ext4 filesystem), I get a line indicating such in the syslog: Oct 9 22:26:28 sulaco kernel: EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: I... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Solaris

Solaris escape my script from "-" to "/226"

Hello everyone. I beg your guys pardon please. I try to ls -al in many path/directories. So, I put the code in text file which look like below; ls -al / ls -al /etc ls -al /etc/default ... however, when I paste it to Solaris over SecureCRT, it seems the code was escaped from "-" to... (0 Replies)
Discussion started by: Smith
0 Replies

9. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question