Filesystem reduction size issue


 
Thread Tools Search this Thread
Operating Systems AIX Filesystem reduction size issue
# 1  
Old 05-08-2014
Filesystem reduction size issue

Hi,

Need help with following case. I am trying to shring filesystem size and reduce few luns from volume group. Situation looks like that :

Code:
# 
lsvg -l data1vg
data1vg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
data1            jfs2       3200    3200    4    open/syncd    /oracle/data1
data2            jfs2       3880    3880    5    open/syncd    /oracle/data2
loglv04             jfs2log    1       1       1    open/syncd    N/A

# lsvg -p data1vg
data1vg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdiskpower10      active            809         0           00..00..00..00..00
hdiskpower7       active            809         0           00..00..00..00..00
hdiskpower8       active            2023        662         44..405..175..00..38
hdiskpower9       active            1213        1157        243..187..242..242..243
hdiskpower0       active            4046        0           00..00..00..00..00

# lsvg -m rbddata2
rbddata2:/oracle/data2
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  1994 hdiskpower0       
[...]
1993  0470 hdiskpower10      
[...]   
2425  0395 hdiskpower7       
[...]     
2825  0986 hdiskpower8       
[...]
3825  0379 hdiskpower9       
[...]	  
3880  0434 hdiskpower9      


root@uk1gcnsd06301:# lslv data2
LOGICAL VOLUME:     data2               VOLUME GROUP:   data1vg
LV IDENTIFIER:      00c629e500004c000000012e52458c71.2 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            10240                  PP SIZE:        128 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                3880                   PPs:            3880
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       edge                   UPPER BOUND:    128
MOUNT POINT:        /oracle/data2   LABEL:          /oracle/data2
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no

# lsvg data1vg
VOLUME GROUP:       data1vg               VG IDENTIFIER:  00c629e500004c000000012e52458c71
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      8900 (1139200 megabytes)
MAX LVs:            512                      FREE PPs:       1819 (232832 megabytes)
LVs:                3                        USED PPs:       7081 (906368 megabytes)
OPEN LVs:           3                        QUORUM:         3 (Enabled)
TOTAL PVs:          5                        VG DESCRIPTORS: 5
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         5                        AUTO ON:        yes
MAX PPs per VG:     130048
MAX PPs per PV:     8128                     MAX PVs:        16
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no

While executing command :

Code:
chfs -a size=-XGB

there is very high IO acitivity on affected disks :

Code:
tty:      tin         tout    avg-cpu: % user % sys % idle % iowait physc % entc
          0.0        550.0               14.4  57.0   21.0      7.5   0.4   85.2

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdiskpower0    100.0     32160.0     259.0          8     32152
hdiskpower10     0.0       0.0       0.0          0         0
hdiskpower7      0.0       0.0       0.0          0         0
hdiskpower8      0.0       0.0       0.0          0         0
hdiskpower9     49.0     32000.0     250.0      32000         0

Filesystem above hung - application is not able to write there and hung until chfs is completed (-10G take about 6 mins...so 30MB/s - same value as iostat shows)

Question is what is happening below chfs command? LPs are fragmented across all disks...but LVM should remove last LPs (from hdiskpower9) and shrink filesystem. What data is written to hdiskpower0? Where to look?

Thoughts?
# 2  
Old 05-08-2014
So if you've got data spread around those PPs, would you just like to lose it? The OS is moving the data to PPs that will survive the reduction. It will be doing this for every copy of an affected LP, so with mirrors, you've just doubled/tripled up.

Yes, the IO for the filesystem will lock. If you were working to keep space clear on certain PPs, how would you like it if another process looked and said "Oh lovely, a nice contiguous area of free disk to write in."

From your iostat you need to read the display clearly. Disk hdiskpower9 is reading. Writes are to hdiskpower0.


I hope that this helps your understanding, but organise downtime to take such actions as they are more complex then growing a filesystem.



Robin
# 3  
Old 05-08-2014
Ohh...ok. I always thought that LVM is smart enough and can do space reduction in fly (also if reduced LPs contain data).

Both filesystems are busy in < 50% - but looks like data are fragmented across all disks and LVM "lock" data during shrink process.

Is there an option to check if given LP is free or contain filesystem data?

Is there an option to do it online? Play with defrag command?
# 4  
Old 05-08-2014
Its just more to this than file system size reduction.

You have around 1.1TB of storage, you have emc MPIO. Now,
1. How are the disks configured? NPIV or vscsi or direct fibre (Have you configured the fscsiX setting?)
2. Disk allocation is absolutely wrong, 500 GB disk will definitely degrade the performance.
3. Did you configure the disks queue depth values?
4. What version of OS are you using?
5. What version of oracle are you using?
If the version of Oracle and OS require you to enable CIO, was it done.

Frankly %tm_act is way beyond, generally it should be within 30

You want to reduce the size of disks and evenly strip the LV across them.

These are few of the many question to ask.

Also, can you paste the %utilization of each File system (using df -g),

Is this a production system?

There is other way, by bringing down (and if required umount and remount the FS) the DB and try to reduce the FS (which I don't do/recommend in realtime)
# 5  
Old 05-08-2014
df output looks like that - i want reduce size to +/-300G per filesystem

Code:
# df -g | grep data
/dev/data1    400.00    191.44   53%       43     1% /oracle/data1
/dev/data2    485.00    260.82   47%       29     1% /oracle/data2

iostat output was captured while chfs command was running - during normal operation is not above 30% for sure.

Regarding your questions :

1. NPIV
2-3. System doesn't have performance issue. LUN size depends on storage system and application above. Queue depth is optimal for powerpath devices.
4. What version of OS are you using? AIX 6.1TL8SP1
5. What version of oracle are you using? 11G - no cio option need


Can filesystem defrag be helpful here? Is there a way to match inode/filesystem block to particular LPs? Any other "online" solution?

What about assign one big lun, move all PPs by migratepv and shrink filesystem size (once lv will be on one PV).
# 6  
Old 05-09-2014
Using migratepv will just move the PPs. Their contents will remain the same through the process, although you are right, you can do this with the filesystem in use. The problem is, you will still have your data spread over all the PPs.

What is the eventual aim of all this anyway? It could be to free a LUN or to create another LV for another purpose. It would be good to know.



Robin

P.S. if you considered adding a mirror, synchronising them and then dropping the original, you are still going to have data across your PPs as the mirror is at the PP level.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Hardware

Increasing the filesystem size

Hi Guys We have a VM machine, now I want to increase the size of the filesystem. We are running RHEL6 O/S. I have filesystem that is 500GB I want to increase that filesystem to 1.5 TB. The guy who manages the VM increased the size on the VM machine, now how do I make sure that the... (7 Replies)
Discussion started by: Phuti
7 Replies

2. Red Hat

Increase the filesystem size

Hi I am using oracle linux 6.4. My hard drive capacity is 500 GB. my filesystem size onbly 50GB. I would like to extend my filesystem size to around 100GB. I tried many codes but still I am not able. this is the output of df -h : Filesystem Size Used Avail Use% Mounted on... (6 Replies)
Discussion started by: farshad
6 Replies

3. UNIX for Advanced & Expert Users

Physical disk IO size smaller than fragment block filesystem size ?

Hello, in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a ... (4 Replies)
Discussion started by: rarino2
4 Replies

4. UNIX for Dummies Questions & Answers

Removing some size for filesystem

Hi All, Currently for filesystem /usr/sap/ccms we have allocated 50 GB of size and its mounted. Is there any procedure to remove 10 GB from it without disturbing data and allocate that 10 GB to another file system say /usr/sap/sapdata1. Thanks, Rohan (2 Replies)
Discussion started by: rohanxyz
2 Replies

5. AIX

filesystem size

i am new in the field 3months to be precise. how do i come up with size, i want to change for the filesystem? assuming there is enough space on the volume group. do i just assign any value? (5 Replies)
Discussion started by: freeman
5 Replies

6. UNIX for Dummies Questions & Answers

How to increase the filesystem size?

Hi.. I want to increase the file system size of any filesystem online, without using the Volume manager like LVMs, is it possible? & if yes then how? (3 Replies)
Discussion started by: Amol21
3 Replies

7. UNIX for Advanced & Expert Users

will a named pipe always be size 0 on filesystem?

I did cat < myFile >> myPipe I was hoping that if I did ls -l, myPipe would now be holding the contents of myFile, and would be the same size. But it was 0. Also strange was that when I did the command above, cat did not return control back to the shell. Why? thanks (4 Replies)
Discussion started by: JamesByars
4 Replies

8. UNIX for Dummies Questions & Answers

actual filesystem size during backup

Scenario............ ufsdump 0uf /dev/rmt/0n / root has 10GB available but only 5GB are used. Does the backup record the entire 10GB regardless of whats actually used or just the 5GB being used? (1 Reply)
Discussion started by: shorty
1 Replies

9. AIX

Increasing the FileSystem Size

Hi Everybody, I have AIX 4.3 and I have a FileSystem with 400GB size, which called /db/run. Because of grow up of the application's data, more storage has been added 200GB. To add this space without affecting the application & the application's requirements, I have to add this 200GB to the existed... (9 Replies)
Discussion started by: aldowsary
9 Replies

10. Filesystems, Disks and Memory

Changing Filesystem size.

Hi there, can i change the size of filesystem afterwards. i want give some more space to my /export/home and want take some space from /opt. is it possible in solaris ? Any help will be appriciated. Abid (2 Replies)
Discussion started by: abidmalik
2 Replies
Login or Register to Ask a Question