Kbase

Base de Conhecimento

Posts de Abril, 2007

How to detect a memory leak in Microsoft Windows

Publicado por agostinhojr em 27 Abril, 2007

The term memory leak refers to the gradual loss of available computer memory when a bug causes a program (an application or part of Windows) to repeatedly fail to return the memory it has obtained for temporary use. As a result, the available memory for that application or that part of Windows becomes exhausted and the program can no longer function.
Applications with memory leaks or applications that consume excessive amounts of processor time can not only kill server performance, but can also render that server unstable.

In this technical guide, contributor Brien M. Posey provides you with the knowhow to determine if there is a memory leak in your Windows system.

Memory leaks: Finding a memory leak in Microsoft Windows

Before investing in server hardware, most companies spend a good deal of time researching the resources required to run the applications that the server will be hosting. But all this hard work can be undone by a poorly written application.

Over time, some applications can rob your server of resources far beyond any reasonable estimates. Applications with
memory leaks or applications that consume excessive amounts of processor time can not only kill server performance, but can also render that server unstable.
Memory issues with applicationsApplications usually request memory from the OS in order to perform various functions. Under normal circumstances, an application will release memory once it has finished using it. A leaky application will request memory like any other application, but will not release the memory that is no longer needed.


The next time that the application runs the function that required the additional memory, the application will not use the memory that it is already consuming. In fact, it will request even more memory from the OS. The leaky app continues to hold onto this memory even after it is no longer needed. Over time the leaky app will drain the OS of more and more memory.
Memory leaks are not always obvious. There is no dialog box in Microsoft Windows that says, “You have a memory leak.” It’s up to you to find memory leaks, and corrrect them. But how do you know if you’ve got one?


Symptoms of memory leaks The symptoms of a memory leak vary. They depend on the amount of memory the leaky app consumes each time the leaky code is executed, as well as how often the leaky code is executed. The frequency with which the system is rebooted also makes a difference, since memory is restored to the OS during a reboot.


Some memory leaks are barely noticeable. But if one becomes significant enough to start affecting the OS, you’ll see some telltale signs. Including:
The system gradually becomes slower. Sure, it’s normal for a system to slow down over time to some extent, due to disk fragmentation, the installation of bloated applications and the overhead associated with an increasing workload. What isn’t normal is for a system’s speed to be restored after a reboot, only to quickly begin slowing down again. This is often a sign of a memory leak (although it can also mean a malware infection).


Unexpected error messages indicating that various system services have stopped. Note: Again, these types of messages might be caused by malware infections or other types of system problems. If system services are shutting down unexpectedly, it is generally not a sign of a memory leak unless other symptoms are also occurring.
An error message indicating that Windows is either low on, or has run out of, virtual memory. Below is a typical sample of this type of error message, but the exact messsage will vary, depending upon the version of Windows your server is running.

Finding memory leaks using Performance Monitor

If your server is currently experiencing symptoms of a memory leak, you may be wondering how you can distinguish a memory leak from other types of performance problems.
There is no obvious message displayed indicating that a server is running a leaky application. Locating a memory leak usually involves watching various Performance Monitor counters and interpreting the results.

In the real world, it can be hard to tell if an application “leaks” unless you have something to compare it to. Fortunately, a Microsoft utility called Leakyapp does one thing: Creates a memory leak. This tool can help you observe how Performance Monitor behaves in memory leak situations.

Note: The Leakyapp utility causes a fairly serious memory leak to occur. Therefore, Performance Monitor data collected in the real world may not always be as dramatic as what you would observe using Leakyapp. When you look for memory leaks on production systems using Performance Monitor, the signs of a memory leak can be subtle.

If you want to learn how Leakyapp works, try this Leakyapp download, which consists of a 5.12 KB ZIP file.
Using Performance MonitorAccess Performance Monitor by entering the PERFMON command at the server’s Run prompt. When Performance Monitor opens, several counters (mechanisms that Performance Monitor uses to measure some individual aspect of the server’s performance) will already have been loaded. Click the X icon repeatedly until all default counters have been removed. You can now load new counters by clicking the + icon.

Individual counters are organized into performance objects, which are simply categories under which Performance Monitor counters are stored. From hereon, I will refer to individual counters in performance object/counter format. For example, Processor/% Processor Time refers to the % Processor Time counter found in the Processor performance object.

To detect a memory leak using Performance Monitor, monitor these counters:

  • The Memory/Available Bytes counter lets you view the total number of bytes of available memory. This value normally fluctuates, but if you have an application with the memory leak, it will decrease over time.
  • TheMemory/Committed Bytes counter will steadily rise if a memory leak is occurring, because as the number of available bytes of memory decreases, the number of committed bytes increases.
  • The Process/Private Bytes counter displays the number of bytes reserved exclusively for a specific process. If a memory leak is occurring, this value will tend to steadily rise.
  • The Process/Page File Bytes counter displays the size of the pagefile. Windows uses virtual memory (the pagefile) to supplement a machine’s physical memory. As a machine’s physical memory begins to fill up, pages of memory are moved to the pagefile. It is normal for the pagefile to be used even on machines with plenty of memory. But if the size of the pagefile steadily increases, that’s a good sign a memory leak is occurring.
  • I also want to mention the Process/Handle Count counter. Applications use handles to identify resources that they must access. If a memory leak is occurring, an application will often create additional handles to identify memory resources. So a rise in the handle count might indicate a memory leak. However, not all memory leaks will result in a rise in the handle count.


Memory leaks: Determine an application’s CPU consumption

One of the most common symptoms of a memory leak is that as time goes on, the computer runs slower and slower. Its speed is restored with a reboot, but it soons begin degrading again.
However, a memory leak is not the only condition that can cause these symptoms. They can also be caused by malware or by a poorly written application that consumes an excessive amount of CPU time. How can you tell how much CPU time an application is consuming, and whether that CPU consumption is a problem?

Determining application CPU usageDetermining how much CPU time an individual application is using is simple. Just press CTRL+ALT+Delete, then click the Task Manager button. When Task Manager opens, the Applications tab will display a list of all the applications running on the server.

Windows won’t actually display the amount of CPU time that an individual application is using. This is because Windows looks at the amount of system resources consumed by a process rather than an application. An application is made up of one or more processes. To see how much CPU time a process is using, select the Process tab.

The bottom of the screen below shows the total number of processes running on the machine at the given moment, along with the total percentage of CPU resources in use. The main part of the screen displays each individual process along with the percentage of CPU time the process is currently consuming. This screen displays both system processes and processes related to user-mode applications. The last process listed is the System Idle Process, which isn’t a process at all; it refers to how much of the CPU’s processing power is going unused at the current moment.

Any one of these processes (with the possible exception of the System Idle process) can momentarily consume all of the system’s processing power (100% CPU utilization). However, this does not necessarily indicate a problem. The only way to really find out whether a process is consuming an excessive amount of CPU time is to watch the process over time, and look at the average amount of CPU time it’s using.

Tracking CPU usage across systems

Windows’ Performance Monitor is not designed to track the CPU usage of individual processes, but it can track CPU usage across the entire system. The Processor\%ProcessorTime counter displays the current CPU usage similar to the way Task Manager does. The difference? This counter allows you to view average CPU consumption in addition to current CPU consumption.

If average CPU consumption is consistently above 80%, that’s usually a problem.
If average CPU consumption is consistently above 80%, that’s usually a problem. But looking at average CPU utilization isn’t enough. To determine if a process is having a detrimental effect on the CPU, you must know how the CPU is being used.

In some cases high processor utilization means that your system is struggling to keep up. In other situations, the CPU might have a high utilization value, but is actually working very efficiently. In these situations, a high utilization value is often caused by an access number of interrupts. Interrupts occur when drivers or operating system subcomponents need to access other hardware components, such as the hard disk.

Performance Monitor counters

There are several CPU-related Performance Monitor counters that you can watch to get a better idea of what’s going on with your server’s CPU. The System/Processor Queue Length counter displays the number of items that are waiting for the CPU to become available. If this queue regularly exceeds two items, the CPU is not performing adequately.

As I mentioned earlier, interrupts caused by hardware devices that need to access the CPU. The Processor/Interrupts/Second counter allows you to watch how many processor interrupts occur each second. The number of interrupts per second that are considered normal varies from server to server.

But if a hardware device is getting ready to fail, it will often generate an excessive number of interrupts. If the number of processor interrupts per second seems high compared to your other servers, and there does not appear to be enough activity to justify the spike it interrupts (such as disk access), it could be a sign that a hardware component is failing.
The Processor/% Interrupt Time counter shows you what percentage of time the CPU spends servicing hardware interrupts. Again, watch for spikes in an interrupt activity without a corresponding increase in system activity.

Of course our goal is to determine whether the amount of CPU time spent on a particular process is healthy. The Processor/% User Time counter shows the percentage of time the processor spends on user mode applications. Note: This counter only looks at non-idle CPU time. If this value is consistently high, it doesn’t necesarily mean your CPU is being overworked; it simply indicates that a disproportionate amount of the CPU’s resources are being spent on user mode processes as opposed to kernel mode processes or interrupts.

The Processor/% Privileged Time counter shows the percentage of non-idle CPU time being spent on kernel mode processes. If this value is disproportionately high, it either means that the user mode applications running on your server are not consuming much CPU resources, or that excessive interrupts are occurring and that a hardware component might be getting ready to fail.

Improving the CPU’s performance

It’s okay for an application to have disproportionately high CPU utilization so long as the system’s CPU utilization as a whole is not consistently above 80%. If that’s the case, you need to find out why. If you determine that the excessive CPU usage is related to the applications running on the server, it may be necessary to either upgrade the processor or to move some applications to a different server. Another option is to use processor affinity to assign each application to a specific processor.

Note: Applications with memory leaks can cause the CPU to work excessively. As a system’s available RAM decreases, the system relies increasingly on the pagefile. The more heavily the pagefile is used, the more time is spent swapping pages between physical and virtual memory.

This page-swapping process consumes both CPU time and disk time (which also consumes CPU time in the form of interrupts). If your system seems to the paging excessively, look for applications with memory leaks and correct them. If no memory leaks exist, try increasing the amount of RAM installed in the server. Doing so will often improve the CPU’s performance.

Artigo original

Enviado em Memory | Deixar um comentário »

Tabelas/Views SAP 4.0B

Publicado por agostinhojr em 26 Abril, 2007

Tabelas e Views que possuem informações relevantes para equipes de basis

DD03VT – Table fields – ABAP/4 Repository Information System

Enviado em SAP | Deixar um comentário »

PROCEDIMENTOS PARA GERENCIAR O LVM

Publicado por agostinhojr em 13 Abril, 2007

Quando voce instala a maquina ja e possivel definir o numero de filesystems desejados e o tamanho de cada um. Porem, com o passar do tempo, dependendo dos recursos de disco consumidos pela sua aplicacao, ou devido a compra de discos adicionais, torna-se necessario alterar a configuracao inicial: ou voce aumenta o tamanho de um filesystem, ou o diminui, ou cria novos filesystems.

Vamos reforcar alguns conceitos de uma forma bem simples antes de prosseguirmos com os exemplos:

VG == Volume Group: e o grupo de volumes de disco configurados na maquina. Em cada VG voce pode incluir 1 ou mais discos.

LVOL == Logical Volume: e a particao do disco. Quando voce criar o disco em um VG, deve particiona-lo (em 1 ou mais “pedacos”).

File System: depois de particionado o disco, voce podera criar um
sistema de arquivos para montar em um diretorio.

OBS.: Se voce precisar usar um “raw device”, basta criar
o VG e o LVOL (nao precisa criar o filesystem).

Queremos tambem ressaltar algumas observacoes importantes:

- O barra (/), onde esta o “/dev/vg00/lvol1″, nao pode ser
modificado, ou seja, nao e possivel aumentar e nem diminuir o seu
tamanho. Para altera-lo, e necessario uma reinstalacao do Sistema
Operacional.

- Voce pode alterar os volumes, atraves do SAM ou manualmente, com
excecao do /usr (se estiver em um volume logico separado do “/”), o
qual deve ser alterado apenas manualmente.

- Para alterar os volumes logicos (lvols), eles devem estar
desmontados.

- Nunca deixe de fazer backup regularmente e principalmente antes de
qualquer alteracao na configuracao do LVM.

A seguir listamos 8 exemplos de duvidas que ocorrem com mais
frequencia:

A – Como criar um novo VG;
B – Como remover um VG;
C – Como incluir um disco novo em um VG ja existente;
D – Como excluir um disco de um VG;
E – Como criar um novo LVOL;
F – Como remover um LVOL;
G – Como aumentar o tamanho de um LVOL;
H – Como diminuir o tamanho de um LVOL.

A – ) COMO CRIAR UM NOVO VG:

Nesse exemplo supomos que voce tinha apenas 1 disco configurado na
maquina e agora vai criar um novo VG para o segundo disco (um disco
novo):

1) Execute o comando “ioscan” para saber o endereco do disco:

# /usr/sbin/ioscan -fC disk

Class I H/W Path Driver S/W State H/W Type Description
================================================================
disk 1 52.5.0 disc3 CLAIMED DEVICE HP C2474S
disk 0 52.6.0 disc3 CLAIMED DEVICE HP C2247M1

Observe que temos um disco no endereco 6 e outro no endereco 5.

2) Verifique qual dos dois esta alocado no(s) VG(s) existente(s):

# /sbin/vgdisplay -v | grep “PV Name”
PV Name /dev/dsk/c0t6d0

Observe que realmente so temos um disco alocado em VG. Note que
esse disco e o dispositivo “c0t6d0″, o qual esta no endereco 6.
O disco de endereco 5 e o de dispositivo “c0t5d0″.

3) Crie um novo VG para o novo disco:

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0×010000
|_> esse valor nao pode ser repetido
# /sbin/pvcreate /dev/rdsk/c0t5d0
# /sbin/vgcreate /dev/vg01 /dev/dsk/c0t5d0

B – ) COMO REMOVER UM VG:

Assumimos nesse exemplo que voce tem dois discos no VG01 e esse VG
tem dois LVOLs criados:

1) Devemos, em primeiro lugar, desmontar os filesystems do VG em
questao:

# /usr/sbin/umount /dev/vg01/lvol1
# /usr/sbin/umount /dev/vg01/lvol2

2) Agora, vamos remover os LVOLs criados para ele:

# /sbin/lvremove -f /dev/vg01/lvol1 /dev/vg01/lvol2

3) Em seguida, descobrimos quais discos fazem parte do VG01, para
removermos:

# /sbin/vgdisplay -v vg01 | grep “PV Name”
PV Name /dev/dsk/c0t5d0
PV Name /dev/dsk/c0t4d0

4) Verificamos nesse exemplo que temos dois discos no VG01.
Devemos remover “quase todos os discos” do VG01 (somente
deixamos um):

# /sbin/vgreduce /dev/vg01 /dev/dsk/c0t4d0

5) Restando apenas um disco no VG, basta remove-lo:

# /sbin/vgremove /dev/vg01

C – ) COMO INCLUIR UM DISCO NOVO EM UM VG JA EXISTENTE:

Assumimos nesse exemplo que voce somente tem o VG00, com um disco.
Vamos incluir o novo disco nesse mesmo VG:

1) Execute o comando “ioscan” para saber o endereco do disco:

# /usr/sbin/ioscan -fC disk

Class I H/W Path Driver S/W State H/W Type Description
================================================================
disk 1 52.5.0 disc3 CLAIMED DEVICE HP C2474S
disk 0 52.6.0 disc3 CLAIMED DEVICE HP C2247M1

Observe que temos um disco no endereco 6 e outro no endereco 5.

2) Verifique qual dos dois esta alocado no(s) VG(s) ja
existente(s):

# /sbin/vgdisplay -v | grep “PV Name”
PV Name /dev/dsk/c0t6d0

Observe que realmente so temos um disco alocado em VG. Note que
esse disco e o dispositivo “c0t6d0″, o qual esta no endereco 6.
O disco de endereco 5 e o de dispositivo “c0t5d0″.

3) Agora e so inclui-lo no VG00:

# /sbin/pvcreate /dev/rdsk/c0t5d0
# /sbin/vgextend /dev/vg00 /dev/dsk/c0t5d0

D – ) COMO EXCLUIR UM DISCO DE UM VG:

Assumimos nesse exemplo que voce tem dois discos no VG01 e esse VG tem dois LVOLs criados. O disco a ser removido e o de endereco 4. Tome o seguinte cuidado: pode ser que um determinado LVOL esteja ocupando uma parte de cada disco. Nesse caso, esse LVOL e perdido.

1) Devemos, em primeiro lugar, desmontar os filesystems do VG em
questao:

# /usr/sbin/umount /dev/vg01/lvol1
# /usr/sbin/umount /dev/vg01/lvol2

2) E necessario descobrir quais LVOLs fazem parte do disco de
endereco 4:

# /sbin/lvdisplay -v /dev/vg01/lvol2 | pg
— Logical volumes —

— Distribution of logical volume —
PV Name LE on PV PE on PV
/dev/dsk/c0t5d0 12 12
/dev/dsk/c0t4d0 40 40
||
\\==========> essa e a informacao que nos interessa.
— Logical extends —

# /sbin/lvdisplay -v /dev/vg01/lvol1 | pg
— Logical volumes —

— Distribution of logical volume —
PV Name LE on PV PE on PV
/dev/dsk/c0t5d0 12 12
||
\\==========> essa e a informacao que nos interessa.
— Logical extends —

Observe que nos comandos acima conseguimos visualizar que o
LVOL2 ocupa dois discos e o LVOL1 ocupa apenas um. O LVOL que
esta ocupando o disco a ser removido e o LVOL2.

3) Agora vamos remover o LVOL que ocupa o disco em questao:

# /sbin/lvremove -f /dev/vg01/lvol2

4) Livre de LVOLs, basta remover o disco do VG:

# /sbin/vgreduce /dev/vg01 /dev/dsk/c0t4d0

E – ) COMO CRIAR UM NOVO LVOL:

Nao se esqueca que para criar um LVOL, o VG ja deve estar previamente criado. Nesse exemplo assumimos que o VG01 ja esta criado, ja possui o LVOL1 e agora queremos usar o restante de seu espaco para criar outro LVOL (lvol2).

1) Primeiro devemos descobrir se ha espaco desalocado no VG e
quanto de espaco ainda ha disponivel:

# /sbin/vgdisplay vg01 | grep Free
Free PE 25

Se o numero resultante desse comando for 0, significa que nao
sera possivel criar um novo LVOL.

2) Vamos criar um LVOL com 25 extensoes (que tem 4Mb cada uma). O
tamanho em bytes e de (25 * 4) == 100Mb.

# /sbin/lvcreate -l 25 vg01

OBS.: O novo lvol e um numero sequencial, a partir do ultimo
criado. Como so tinhamos o LVOL1, o proximo a ser criado e
o LVOL2.

3) Se voce for usar um Raw Device, ou alocar essa area para swap
fisico, nao deve criar o sistema de arquivos. Porem, se voce
quiser usar esse LVOL para um sistema de arquivos, para montar
em um diretorio, deve cria-lo da seguinte forma:

# /usr/sbin/newfs -F vxfs /dev/vg01/rlvol2

4) Para monta-lo, ja deve existir o diretorio destino (e vazio!):

# mkdir /mnt
# /usr/sbin/mount /dev/vg01/lvol2 /mnt

5) Para que o sistema de arquivos seja montado automaticamente
durante o boot e necessario inclui-lo no arquivo /etc/fstab:

# vi /etc/fstab

/dev/vg01/lvol2 /mnt vxfs delaylog 0 2

OBS.: Verifique no manual a sintaxe da fstab para conhecer
mais detalhes.

F – ) COMO REMOVER UM LVOL:

Assumimos nesse exemplo a remocao do LVOL2 que esta no VG01:

1) Desmonte o LVOL em questao:

# /usr/sbin/umount /dev/vg01/lvol2

2) Remova o LVOL:

# /sbin/lvremove -f /dev/vg01/lvol2

3) Nao se esqueca de remove-lo da tabela “/etc/fstab”, antes de
resetar a maquina.

G – ) COMO AUMENTAR O TAMANHO DE UM LVOL:

Assumimos nesse exemplo o aumento do tamanho do LVOL2, que esta no VG01. Atualmente ele tem 572Mb e incluiremos nesse LVOL mais 40Mb.

LEMBRETE: nao e possivel aumentar o barra (“/”), que esta no LVOL1 do
VG00!!!

1) Verifique se ha espaco disponivel no VG, a fim de inclui-lo no
LVOL em questao:

# /sbin/vgdisplay vg01 | grep Free
Free PE 25

Se o numero resultante desse comando for 0, significa que nao
sera possivel aumentar um LVOL.

Nesse caso temos 25 extensoes (de 4Mb cada uma), totalizando
entao 100Mb ainda disponiveis.

Como queremos apenas 40Mb, usamos 10 extensoes (40 / 4 = 10).

2) Desmonte o LVOL em questao:

# /usr/sbin/umount /dev/vg01/lvol2

3) Garanta que o LVOL esta realmente desmontado, atraves do comando
“mount”: nao deve aparecer a linha desse LVOL.

4) Vamos agora descobrir quantas extensoes de 4Mb temos alocadas
atualmente no LVOL:

# /sbin/lvdisplay -v /dev/vg01/lvol2 | grep Current
Current LE 143

5) Totalizamos agora o novo numero de extensoes logicas:

143 + 10 = 153
| | |
| | |——-> total de extensoes (=> 153 * 4 = 612Mb).
| |————-> total que temos intencao de adicionar
| (=> 10 * 4 = 40Mb)
|——————> total de extensoes atualmente
(=> 143 * 4 = 572Mb)

Dessa forma chegamos a um novo tamanho de 612Mb.

6) Vamos agora aumentar o tamanho do LVOL:

# /sbin/lvextend -l 153 /dev/vg01/lvol2

7) Depois de aumentado o tamanho do LVOL, precisamos aumentar o
tamanho do sistema de arquivos para compatibilizar os tamanhos:

# /usr/sbin/extendfs –F vxfs /dev/vg01/rlvol2

8) Por ultimo, e so montar novamente o LVOL e usa-lo ja com o novo
tamanho!

H – ) COMO DIMINUIR O TAMANHO DE UM LVOL:

Assumimos nesse exemplo a diminuicao do LVOL2 que esta no VG01. Hoje, o LVOL2 esta com 612Mb e queremos deixa-lo com apenas 500Mb.

LEMBRETE: nao e possivel diminuir o tamanho do barra (“/”), que esta
no LVOL1 do VG00!!!

1) Em primeiro lugar devemos fazer um backup do diretorio onde esta
montado o LVOL2, pois ao diminuirmos o seu tamanho, perderemos
os dados:

# cd /diretorio
# find . -print | cpio -ocvB > /dev/rmt/c0t0d0BEST

2) Em seguida, desmontamos o LVOL:

# cd / ; umount /dev/vg01/lvol2

3) Garanta que o LVOL esta realmente desmontado, atraves do comando
“mount”: nao deve aparecer a linha desse LVOL.

4) Como o LVOL esta com 612Mb e queremos diminui-lo para 500Mb,
devemos calcular o numero de extensoes contidas em 500Mb:

calcule: 500 / 4 = 125

5) Reduza agora o tamanho do LVOL:

# /sbin/lvreduce -l 125 /dev/vg01/lvol2

6) Crie um novo sistema de arquivos (pois nao e possivel apenas
diminuir o tamanho do sistema de arquivos):

# /usr/sbin/newfs -F vxfs /dev/vg01/rlvol2

7) Monte o filesystem e restaure os dados do backup:

# mount /dev/vg01/lvol2 /diretorio
# cd /diretorio
# cpio -icvdumB < /dev/rmt/c0t0d0BEST

GERENCIAMENTO DO LVOL COM ADVANCED JFS

1. Como aumentar o tamanho do lvol:

Atencao: Para os procedimentos abaixo E’ necessario que o pacote HP OnLine JFS Advanced VxFS esteja instalado.

1.1 – Verifique se existe espaco disponivel no vg00:

# /sbin/vgdisplay -v vg00 |grep Free
Free PE 178

Se o numero mostrado for 0, indica que o seu vg nao tem espaco
disponivel para criar um novo lvol.

Atencao: Note que no item anterior, nos desmontamos o lvol; nesse
caso, com o pacote instalado, nao E’ necessario.

1.2 – Como queremos aumentar o lvol para o tamanho de 140MB, podemos
utilizar:

# /sbin/lvextend -L 140 /dev/vg00/lvol10
Logical volume “/dev/vg00/lvol10″ has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

1.3 – Aumente o tamanho do sistema de arquivos para compatibilizar o
tamanho:

# /usr/sbin/fsadm -F vxfs -b 143360 /teste
fsadm: /dev/vg00/rlvol10 is currently 102400 sectors – size will be increased

onde:
-b (total lvol * 1024)

1.4 – Para confirmar que o lvol foi realmente aumentado, pode-se executar:

#/usr/bin/bdf
ou
#/usr/sbin/lvdisplay /dev/vg00/lvol10

2. Reduzindo o tamanho do lvol

2.1 – Tire backup do lvol (por seguranca).
2.2 – Nao E’ necessario desmontar o lvol.
2.3 – Reduzindo o lvol:

# /usr/sbin/fsadm -F vxfs -b 102400 /teste
fsadm: /dev/vg00/rlvol10 is currently 155648 sectors – size will be reduced

#/usr/sbin/lvreduce -L 100 /dev/vg00/lvol10
Then a logical volume is reduced useful data might get lost; do you really want the command to proceed (y/n) : y Logical volume “/dev/vg00/lvol10″ has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

2.4 – Para confirmar que o lvol foi realmente aumentado, pode-se
executar:

#/usr/bin/bdf
ou
#/usr/sbin/lvdisplay -v /dev/vg00/lvol10

Enviado em hp-ux | Deixar um comentário »