[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can not remove logical volume from missing disk

Posted on 2011-05-04
48
Medium Priority
?
3,100 Views
Last Modified: 2012-05-11
I have a RS/6000 server with AIX 4.3 where one of the disks has died:

richard:root:/etc> lsvg -p daivg
daivg:
PV_NAME           PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active      542         334         109..00..08..108..109
hdisk2            active      542         393         45..53..78..108..109
hdisk3            active      542         460         109..56..78..108..109
hdisk4            active      542         39          00..00..00..00..39
hdisk5            active      542         540         109..106..108..108..109
hdisk6            active      542         351         109..00..25..108..109
hdisk7            missing     542         541         109..107..108..108..109
hdisk8            active      542         542         109..108..108..108..109

I replaced the disk.

But I can't remove the logical volume that was on the missing disk:

richard:root:/> lspv -l 0055b65a4a8720d2
pvid=0055b65a4a8720d2:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
loglv01               1     1     00..01..00..00..00    N/A

richard:root:/> rmlv -p 0055b65a4a8720d2 loglv01
0516-914 rmlv: Warning, all data belonging to logical volume
        loglv01 on physical volume 0055b65a4a8720d2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y

        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
richard:root:/>

What to do?

- Jac
0
Comment
Question by:JacBackus
  • 22
  • 19
  • 7
48 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35696116
Hi,

which way did you "replace" the disk?

AIX should have found a new device, probably hdisk9 representing the newly inserted disk.
The old (removed) hdisk7 should be in a DEFINED state.

Normally you should have removed hdisk7 from the VG and from the OS before installing and configuring a new disk.

What do you get with

lspv
lsdev -Ccdisk

?

loglv01 seems to be a jfs log volume. You can't remove such a volume if it's active. Or did you already create and activate a new log?

If my assumptions are correct and if loglv01 is inactive you should do  

reducevg -d -f hdisk7
rmdev -dl hdisk9
cfgmgr
extendvg daivg hdisk7  # (formerly hdisk9)

wmp

0
 

Author Comment

by:JacBackus
ID: 35696157
Hi woolmilkporc,

I asked to remove the disk and put a new one in (I am not at the site where the server is).

richard:root:/> lspv
hdisk0         0055b65adb0bdb94    rootvg        
hdisk1         0055b65a4a852822    daivg          
hdisk2         0055b65a4a860513    daivg          
hdisk3         0055b65a4a8652cc    daivg          
hdisk4         0055b65ae5e5ca91    daivg          
hdisk5         0055b65ac9827f28    daivg          
hdisk6         0055b65a3f1eaba7    daivg          
hdisk8         0055b65a19f8991a    daivg          
hdisk7         none                None

richard:root:/> lsdev -Cc disk
hdisk0 Available 3A-08-00-8,0  16 Bit LVD SCSI Disk Drive
hdisk1 Available 3A-08-00-9,0  16 Bit LVD SCSI Disk Drive
hdisk2 Available 3A-08-00-10,0 16 Bit LVD SCSI Disk Drive
hdisk3 Available 3A-08-00-11,0 16 Bit LVD SCSI Disk Drive
hdisk4 Available 3A-09-00-8,0  16 Bit LVD SCSI Disk Drive
hdisk5 Available 3A-09-00-9,0  16 Bit LVD SCSI Disk Drive
hdisk6 Available 3A-09-00-10,0 16 Bit LVD SCSI Disk Drive
hdisk8 Available 3A-09-00-12,0 16 Bit LVD SCSI Disk Drive
hdisk7 Available 3A-09-00-11,0 16 Bit LVD SCSI Disk Drive

richard:root:/> reducevg -d -f hdisk7
0516-604 reducevg: Physical volume name not entered.
Usage: reducevg [-d] [-f] VGname PVname...
Reduces volume group size by removing a physical volume

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35696258
OK, that was a typo!

reducevg -d -f daivg hdisk7
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35696286
Just had a closer look at your outputs.

I think reducevg will not work the way I suggested it.

We'll have to find out the PVid of the old hdisk7 to use it in the reducevg command.

To get a list of PVids in the VG issue

lqueryvg -Atp hdisk1

Compare the list of PVids displayed beneath "Physical:" with the PVids from "lspv".
The one appearing in lqueryvg but not in lspv is the one we need.

wmp
0
 

Author Comment

by:JacBackus
ID: 35696287
richard:root:/> reducevg -d -f daivg hdisk7
0516-022 lquerypv: Illegal parameter or structure value.
0516-022 lquerypv: Illegal parameter or structure value.
0516-884 reducevg: Unable to remove physical volume hdisk7.
richard:root:/>

The first message did include older lsvg output. This is current:

richard:root:/> lsvg -p daivg
daivg:
PV_NAME           PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active      542         334         109..00..08..108..109
hdisk2            active      542         393         45..53..78..108..109
hdisk3            active      542         460         109..56..78..108..109
hdisk4            active      542         39          00..00..00..00..39
hdisk5            active      542         540         109..106..108..108..109
hdisk6            active      542         351         109..00..25..108..109
0516-304 lsvg: Unable to find device id 0055b65a4a8720d2 in the Device
        Configuration Database.
0055b65a4a8720d2  missing     542         541         109..107..108..108..109
hdisk8            active      542         542         109..108..108..108..109
richard:root:/>


richard:root:/> reducevg -d -f daivg 0055b65a4a8720d2
0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
0516-884 reducevg: Unable to remove physical volume 0055b65a4a8720d2.
richard:root:/>

If you need further information, please let me know.

- Jac
0
 

Author Comment

by:JacBackus
ID: 35696306
Physical:       0055b65a4a852822 1   0  
                0055b65a4a860513 1   0  
                0055b65a4a8652cc 1   0  
                0055b65ae5e5ca91 1   0  
                0055b65ac9827f28 1   0  
                0055b65a3f1eaba7 1   0  
                0055b65a4a8720d2 1   0  
                0055b65a19f8991a 1   0  

lspv
hdisk0         0055b65adb0bdb94    rootvg        
hdisk1         0055b65a4a852822    daivg          
hdisk2         0055b65a4a860513    daivg          
hdisk3         0055b65a4a8652cc    daivg          
hdisk4         0055b65ae5e5ca91    daivg          
hdisk5         0055b65ac9827f28    daivg          
hdisk6         0055b65a3f1eaba7    daivg          
hdisk8         0055b65a19f8991a    daivg          
hdisk7         none                None

This one is only in lqueryvg
0055b65a4a8720d2 1   0

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35696322
Yes, and that's the one you used in reducevg, which is correct.

I'm still astonished about loglv01! How could it be that the last good copy of an active log volume is on a missing disk??

Please issue

lsvg -l daivg

You can of course try  "syncvg -v daivg" (or "varyonvg daivg") and "synclvodm daivg" to get a bit more consistency and synchronization, yet I don't think this will be the ultimate solution.

0
 

Author Comment

by:JacBackus
ID: 35696492
Hi Woolmilkporc,

richard:root:/> lsvg -l daivg

daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  /patches
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfslog     1     3     2    closed/stale  N/A
paging00            paging     30    30    1    open/syncd    N/A
paging01            paging     30    30    1    open/syncd    N/A
paging02            paging     30    30    1    open/syncd    N/A
paging03            paging     30    30    1    open/syncd    N/A
paging04            paging     30    30    1    open/syncd    N/A
paging06            paging     30    30    1    open/syncd    N/A

You are correct in this:

richard:root:/> syncvg -v daivg
0516-068 lresynclv: Unable to completely resynchronize volume. Run
        diagnostics if neccessary.
0516-932 /usr/sbin/syncvg: Unable to synchronize volume group daivg.

richard:root:/> varyonvg daivg
richard:root:/> 0516-068 lresynclv: Unable to completely resynchronize volume. Run
        diagnostics if neccessary.
0516-932 /usr/sbin/syncvg: Unable to synchronize volume group daivg.

richard:root:/> synclvodm daivg
synclvodm: Warning, lv control block of loglv01 has been over written.
0516-622 synclvodm: Warning, cannot write lv control block data.
richard:root:/>

- Jac

0
 
LVL 20

Expert Comment

by:carlmd
ID: 35697049
Given that hdisk7 is removed, why not try removing the vg from hdisk7 that the lv is a part of? If you don't know the vg this is a part, of just use lsvg then lsvg -o and the difference should be the vg you are looking for. Then exportvg vgname. This should remove the vg and lv.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697063
Is loglv01 still stale (lsvg -l daivg)?
Can you remove it (or run reducevg) now?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697139
If you didn't have paging spaces on this datavg (which is a bad idea anyway) I'd suggest doing

exportvg daivg

and

importvg -y daivg hdisk1

which should solve the problem.

Do you see any chance to deactivate these paging spaces  (you must probably create new ones on a different VG to achieve this)?

wmp

0
 

Author Comment

by:JacBackus
ID: 35697238
Hi Woolmilkporc & Carlmd,

I hope this is useful:


richard:root:/> exportvg daivg
0516-764 exportvg: The volume group must be varied off
        before exporting.

richard:root:/>
richard:root:/>
richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  /patches
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfslog     1     3     2    closed/stale  N/A
paging00            paging     30    30    1    open/syncd    N/A
paging01            paging     30    30    1    open/syncd    N/A
paging02            paging     30    30    1    open/syncd    N/A
paging03            paging     30    30    1    open/syncd    N/A
paging04            paging     30    30    1    open/syncd    N/A
paging06            paging     30    30    1    open/syncd    N/A
richard:root:/>

richard:root:/> reducevg -d -f daivg 0055b65a4a8720d2
0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
0516-884 reducevg: Unable to remove physical volume 0055b65a4a8720d2.
richard:root:/>

richard:root:/> rmlv -p 0055b65a4a8720d2 loglv01
0516-914 rmlv: Warning, all data belonging to logical volume
        loglv01 on physical volume 0055b65a4a8720d2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
richard:root:/>

- Jac
0
 
LVL 20

Expert Comment

by:carlmd
ID: 35697294
The lsvg show that you have assigned paging space on the failed disk. Please do lsps -a and post the result.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697314
Did you see my comment # 35697139 ?
0
 

Author Comment

by:JacBackus
ID: 35697441
richard:root:/> lsps -a
Page Space  Physical Volume   Volume Group    Size   %Used  Active  Auto  Type
paging06    hdisk6            daivg          480MB       1     yes   yes    lv
paging04    hdisk4            daivg          480MB       1     yes   yes    lv
paging03    hdisk3            daivg          480MB       1     yes   yes    lv
paging02    hdisk2            daivg          480MB       1     yes   yes    lv
paging01    hdisk1            daivg          480MB       1     yes   yes    lv
paging00    hdisk6            daivg          480MB       1     yes   yes    lv
hd6         hdisk0            rootvg        3072MB       1     yes   yes    lv

@woolmilkporc
Yes, sorry, but forgot to look to the last part when the first part gavie this result:
richard:root:/> exportvg daivg
0516-764 exportvg: The volume group must be varied off
        before exporting.
How do I deactivate the paging spaces?

Guys, thanks for the help!

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697510
swapoff paging00 paging01 paging02 paging03 paging04 paging06

The system will only allow this if the remaining space (hd6) can satisfy all paging demands, but chances are good, since all your paging spaces are only used by 1 percent each.
0
 
LVL 20

Accepted Solution

by:
carlmd earned 800 total points
ID: 35697641
Here is the problem as I see it. You cannot varyoff the diavg since the paging spaces are active. At AIX4.3 you cannot dynamically deactivate them, and it requires a reboot to do so. Only hd6 is not on diagvg, so you must deactivate all BUT that one. You are going to need to reboot the system twice for all the steps.

1. chps -a n paging00 (repeat for all through paging06)
2. reboot the system
3. lsps -a again,  now you should see only hd5 on hdisk0
4. umont all filesystems on daigvg
5. varyoff daigvg
6. then reducevg daigvg hdisk7
If you have not already added the replacement disk to diagvg then "extendvg diagvg hdisk#", otherwise skip this.
7. varyon daigvg
Assuming all this worked without error and you want to put back all the paging spaces use
chps -a y paging00 (repeat for all through paging06)
8. reboot the system

Note that is you get an error you may have to syncvg.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697796
5. varyoff daigvg
6. then reducevg daigvg hdisk7


you can't run reducevg against an offline VG!
You can't remove the last good copy of loglv01 by means of reducevg (see above!)

"extendvg diagvg hdisk#",
7. varyon daigvg


you can't run extendvg against an offline VG!

You will have to run exportvg/importvg, I keep telling you.

wmp




0
 

Author Comment

by:JacBackus
ID: 35697869
There is no swapoff, only swapon:

richard:root:/> swapoff paging00 paging01 paging02 paging03 paging04 paging06
ksh: swapoff:  not found.
richard:root:/>
richard:root:/> find / -name swapoff -print
richard:root:/> find / -name swapon -print
/usr/sbin/swapon
richard:root:/>

richard:root:/> chps -a n paging00
richard:root:/> chps -a n paging01
richard:root:/> chps -a n paging02
richard:root:/> chps -a n paging03
richard:root:/> chps -a n paging04
richard:root:/> chps -a n paging06
richard:root:/>shutdown -Fr

Waiting for reboot, will be continued.

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35697876
Yes, sorry, I forgot that it's AIX 4.3!
0
 
LVL 20

Assisted Solution

by:carlmd
carlmd earned 800 total points
ID: 35698026
oops, sorry

As indicated above, after step 5. then...
5a. exportvg daivg
5b. importvg -y daivg hdisk1
5c. varyonvg daivg

then continue as

6. reducevg daigvg 0055b65a4a8720d2   (assuming that pvid is correct from above)
                            (must use pvid and not hdisk7 in this case)
If you have not already added the replacement disk to daigvg then
          "extendvg daigvg hdisk#", otherwise skip this.

Assuming all this worked without error and you want to put back all the paging spaces use
chps -a y paging00 (repeat for all through paging06)
8. reboot the system

woolmilkproc, do we now agree?
0
 

Author Comment

by:JacBackus
ID: 35698033

richard:root:/> lsps -a
Page Space  Physical Volume   Volume Group    Size   %Used  Active  Auto  Type
paging06    hdisk6            daivg          480MB       0      no    no    lv
paging04    hdisk4            daivg          480MB       0      no    no    lv
paging03    hdisk3            daivg          480MB       0      no    no    lv
paging02    hdisk2            daivg          480MB       0      no    no    lv
paging01    hdisk1            daivg          480MB       0      no    no    lv
paging00    hdisk6            daivg          480MB       0      no    no    lv
hd6         hdisk0            rootvg        3072MB       1     yes   yes    lv
richard:root:/>
richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  /patches
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfslog     1     3     2    closed/stale  N/A
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A

richard:root:/> mount
  node       mounted        mounted over    vfs       date        options      
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd1         /home            jfs    05 May 14:15 rw,log=/dev/hd8

There is no veryoff (and also no varyon for that matter).

richard:root:/> varyoff daigvg
ksh: varyoff:  not found.
richard:root:/> find / -name varyoff -print
richard:root:/> find / -name varyon -print
richard:root:/>

- Jac
0
 
LVL 20

Expert Comment

by:carlmd
ID: 35698088
should be varyoffvg and varyonvg

sorry
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35698162
Well, exportvg and importvg are just meant to get rid of loglv01 and the old hdisk, so the final reducevg (which would not work with loglv01 on it anyway) should not be necessary.

But I think two people commenting in the same thread will give too much confusion over time, so I'll step back.

Good luck!

wmp
0
 

Author Comment

by:JacBackus
ID: 35698195
This is until step 6:

richard:root:/> varyoffvg daivg
richard:root:/> exportvg daivg
richard:root:/> importvg -y daivg hdisk1
0516-010 lqueryvg: Volume group must be varied on; use varyonvg command.
PV Status:      hdisk1  0055b65a4a852822        PVACTIVE
                hdisk2  0055b65a4a860513        PVACTIVE
                hdisk3  0055b65a4a8652cc        PVACTIVE
                hdisk4  0055b65ae5e5ca91        PVACTIVE
                hdisk5  0055b65ac9827f28        PVACTIVE
                hdisk6  0055b65a3f1eaba7        PVACTIVE
                hdisk8  0055b65a19f8991a        PVACTIVE
                        0055b65a4a8720d2        NONAME
varyonvg: Volume group daivg is varied on.
synclvodm: Warning, lv control block of loglv01 has been over written.
0516-622 synclvodm: Warning, cannot write lv control block data.
daivg
imfs: 0506-914cannot find log for volume group daivg.
PV Status:      hdisk1  0055b65a4a852822        PVACTIVE
                hdisk2  0055b65a4a860513        PVACTIVE
                hdisk3  0055b65a4a8652cc        PVACTIVE
                hdisk4  0055b65ae5e5ca91        PVACTIVE
                hdisk5  0055b65ac9827f28        PVACTIVE
                hdisk6  0055b65a3f1eaba7        PVACTIVE
                hdisk8  0055b65a19f8991a        PVACTIVE
                        0055b65a4a8720d2        NONAME
varyonvg: Volume group daivg is varied on.
richard:root:/> varyonvg daivg
richard:root:/> 0516-068 lresynclv: Unable to completely resynchronize volume. Run
        diagnostics if neccessary.
0516-932 /usr/sbin/syncvg: Unable to synchronize volume group daivg.

richard:root:/> reducevg -d -f daivg 0055b65a4a8720d2
0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
0516-884 reducevg: Unable to remove physical volume 0055b65a4a8720d2.
richard:root:/>

- Jac
0
 

Author Comment

by:JacBackus
ID: 35698212
Always good to have a second opinion?!:-)

- Jac
0
 
LVL 20

Expert Comment

by:carlmd
ID: 35698456
Please issue "lsvg -l daivg" and post result
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1200 total points
ID: 35698464
OK,

one more option:

rmlvcopy loglv01 2 0055b65a4a8720d2

then retry reducevg (not rmlv!)

If rmlvcopy or reducevg fail please run

lslv -l loglv01

I think I can imagine why it might fail.
0
 

Author Comment

by:JacBackus
ID: 35698473
richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfs        1     3     2    closed/stale  N/A
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A
richard:root:/>

- Jac
0
 

Author Comment

by:JacBackus
ID: 35698524
Woolmilkporc, good you are still here!

Here the results:

richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfs        1     3     2    closed/stale  N/A
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A

richard:root:/> rmlvcopy loglv01 2 0055b65a4a8720d2

0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-922 rmlvcopy: Unable to remove logical partition copies from
        logical volume loglv01.
richard:root:/>
richard:root:/> reducevg -d -f daivg 0055b65a4a8720d2
0516-076 lreducelv: Cannot remove last good copy of stale partition.
        Resynchronize the partitions with syncvg and try again.
0516-912 rmlv: Unable to remove logical volume loglv01.
0516-884 reducevg: Unable to remove physical volume 0055b65a4a8720d2.
richard:root:/> lslv -l loglv01

0516-304 lslv: Unable to find device id 0055b65a4a8720d2 in the Device
        Configuration Database.
loglv01:N/A
PVID              COPIES        IN BAND       DISTRIBUTION  
0055b65a4a8720d2  001:000:000   100%          000:001:000:000:000
hdisk5            001:001:000   100%          000:002:000:000:000
richard:root:/>
richard:root:/>

- Jac
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1200 total points
ID: 35698612
Strange!

Maybe I can't remember well my old 4.3 days, but I'm just clueless why a simple

rmlv -f loglv01

should not work!

OK, if it works we will have to create a new log volume, but that's no problem.
0
 
LVL 20

Expert Comment

by:carlmd
ID: 35698707
Do a df and see if /tmp or any other file system is full. At AIX 4.3 rmlv puts a map file in /tmp.
0
 

Author Comment

by:JacBackus
ID: 35698727


richard:root:/> rmlv -f loglv01
rmlv: Logical volume loglv01 is removed.
richard:root:/>

:-)

- Jac
0
 

Author Comment

by:JacBackus
ID: 35698752
richard:root:/> df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           65536     23640   64%     1534    10% /
/dev/hd2         3014656   1398968   54%    22603     6% /usr
/dev/hd9var       983040    558120   44%      465     1% /var
/dev/hd3           65536     38784   41%      211     3% /tmp
/dev/hd1           32768     31536    4%       21     1% /home
richard:root:/>

- Jac
0
 

Author Comment

by:JacBackus
ID: 35698767
It is gone:

richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    closed/syncd  /dai/stl
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A
richard:root:/>
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 1200 total points
ID: 35698773
Yep!

Now run

reducevg  -d -f daivg 0055b65a4a8720d2

and

extendvg daivg hdisk7

Then create a new log:

mklv -t jfslog -y loglv01 daivg 1
logform /dev/loglv01

and try to mount the filesystems.

If this mounting fails - don't worry, we will have to make the new log known to the filesystems. Although it has the same name I'm not sure if this is sufficient under 4.3 to make it useable.

wmp
0
 

Author Comment

by:JacBackus
ID: 35698942
richard:root:/> reducevg  -d -f daivg 0055b65a4a8720d2

0516-304 putlvodm: Unable to find device id 0055b65a4a8720d20000000000000000 in the Device
        Configuration Database.
0516-896 reducevg: Warning, cannot remove physical volume 0055b65a4a8720d2 from
        Device Configuration Database.
richard:root:/> lsvg -p daivg
daivg:
PV_NAME           PV STATE    TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active      542         334         109..00..08..108..109
hdisk2            active      542         393         45..53..78..108..109
hdisk3            active      542         460         109..56..78..108..109
hdisk4            active      542         39          00..00..00..00..39
hdisk5            active      542         542         109..108..108..108..109
hdisk6            active      542         351         109..00..25..108..109
hdisk8            active      542         542         109..108..108..108..109
richard:root:/>
richard:root:/> extendvg daivg hdisk7

0516-1254 extendvg: Changing the PVID in the ODM.
richard:root:/>
richard:root:/>  
richard:root:/> mklv -t jfslog -y loglv01 daivg 1

loglv01
richard:root:/>
richard:root:/> logform /dev/loglv01
logform: destroy /dev/loglv01 (y)?
richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    closed/syncd  /dai
databaselv1         jfs        16    16    1    closed/syncd  /dai/database/1
databaselv2         jfs        14    14    1    closed/syncd  /dai/database/2
databaselv3         jfs        30    30    1    closed/syncd  /dai/database/3
databaselv4         jfs        14    14    1    closed/syncd  /dai/database/4
logginglv4          jfs        459   459   1    closed/syncd  /dai/logging/4
logginglv3          jfs        22    22    1    closed/syncd  /dai/logging/3
logginglv2          jfs        41    41    1    closed/syncd  /dai/logging/2
logginglv1          jfs        55    55    1    closed/syncd  /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    closed/syncd  /dai/stl
loglv01             jfslog     1     1     1    closed/syncd  N/A
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A
richard:root:/>
richard:root:/> mount /dev/dailv
Replaying log for /dev/dailv.
mount: 0506-324 Cannot mount /dev/dailv on /dai: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/dailv is dirty.  Run a full fsck to fix.

richard:root:/> fsck /dev/dailv

** Checking /dev/rdailv (/dai)
** Phase 0 - Check Log
log redo processing for /dev/rdailv                      
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
Superblock is marked dirty; FIX? y
4282 files 2657160 blocks 849016 free
***** Filesystem was modified *****
richard:root:/> mount /dev/dailv

richard:root:/> mount /dev/databaselv1
richard:root:/> mount
  node       mounted        mounted over    vfs       date        options      
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs    05 May 14:14 rw,log=/dev/hd8
         /dev/hd1         /home            jfs    05 May 14:15 rw,log=/dev/hd8
         /dev/dailv       /dai             jfs    05 May 15:51 rw,log=/dev/loglv01
Replaying log for /dev/databaselv1.
Devices already mounted that are using /dev/loglv01
Failure replaying log: 0
mount: 0506-324 Cannot mount /dev/databaselv1 on /dai/database/1: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/databaselv1 is dirty.  Run a full fsck to fix.

It seems I have to do this for every lv. fsck could do no harm?

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35698971
There is no alternative, unfortunately!
0
 

Author Comment

by:JacBackus
ID: 35699042
This is the new situation:

richard:root:/> lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    open/syncd    /dai
databaselv1         jfs        16    16    1    open/syncd    /dai/database/1
databaselv2         jfs        14    14    1    open/syncd    /dai/database/2
databaselv3         jfs        30    30    1    open/syncd    /dai/database/3
databaselv4         jfs        14    14    1    open/syncd    /dai/database/4
logginglv4          jfs        459   459   1    open/syncd    /dai/logging/4
logginglv3          jfs        22    22    1    open/syncd    /dai/logging/3
logginglv2          jfs        41    41    1    open/syncd    /dai/logging/2
logginglv1          jfs        55    55    1    open/syncd    /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    open/syncd    /dai/stl
loglv01             jfslog     1     1     1    open/syncd    N/A
paging00            paging     30    30    1    closed/syncd  N/A
paging01            paging     30    30    1    closed/syncd  N/A
paging02            paging     30    30    1    closed/syncd  N/A
paging03            paging     30    30    1    closed/syncd  N/A
paging04            paging     30    30    1    closed/syncd  N/A
paging06            paging     30    30    1    closed/syncd  N/A
richard:root:/>

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35699149
Looks good, except for lv00. Did you forget it?

You could swapon your paging spaces, if you like.

Now that you've got the new hdisk7 in daivg, what are you going to do with it?

In other words, for what purpose has it been used before? Seems that all your filesystems don't really need it at the moment. Did you use it for mirroring of some of your logical volumes?
0
 

Author Comment

by:JacBackus
ID: 35699249

richard:root:/> mount /dev/lv00
mount: 0506-334 /dev/lv00 is not a known file system.

 The paging files are open again. Should I make new paging file for hdisk7?

I found in some old notes that the contents for hdisk7 was this:
hdisk7:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
loglv01               1     1     00..01..00..00..00    N/A
paging07              30    30    00..00..30..00..00    N/A

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35699365
So the initial mistake was that the lvcopy of loglv01 has not been removed from hdisk7 before replacing it!

In order to recreate loglv01's mirror on hdisk7 issue

mklvcopy -k loglv01 2 hdisk7

As for paging: If you actually need that much paging space you could of course recreate paging07

mkps -a -n -s30 daivg hdisk7

wmp

 
0
 

Author Comment

by:JacBackus
ID: 35699583
Great!

richard:root:/> mklvcopy -k loglv01 2 hdisk7

richard:root:/>
richard:root:/> mkps -a -n -s30 daivg hdisk7

paging05
richard:root:/>
richard:root:/>

What should I do with /dev/lv00? It is stil closed:

richard:root:/>  lsvg -l daivg
daivg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
dailv               jfs        107   107   1    open/syncd    /dai
databaselv1         jfs        16    16    1    open/syncd    /dai/database/1
databaselv2         jfs        14    14    1    open/syncd    /dai/database/2
databaselv3         jfs        30    30    1    open/syncd    /dai/database/3
databaselv4         jfs        14    14    1    open/syncd    /dai/database/4
logginglv4          jfs        459   459   1    open/syncd    /dai/logging/4
logginglv3          jfs        22    22    1    open/syncd    /dai/logging/3
logginglv2          jfs        41    41    1    open/syncd    /dai/logging/2
logginglv1          jfs        55    55    1    open/syncd    /dai/logging/1
lv00                jfs        64    64    1    closed/syncd  N/A
stl                 jfs        131   131   1    open/syncd    /dai/stl
loglv01             jfslog     1     2     2    open/syncd    N/A
paging05            paging     30    30    1    open/syncd    N/A
paging00            paging     30    30    1    open/syncd    N/A
paging01            paging     30    30    1    open/syncd    N/A
paging02            paging     30    30    1    open/syncd    N/A
paging03            paging     30    30    1    open/syncd    N/A
paging04            paging     30    30    1    open/syncd    N/A
paging06            paging     30    30    1    open/syncd    N/A
richard:root:/>

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35699964
lv00 is a logical volume which doesn't have a filesystem.

Such raw LVs are often used for databases. It's a bit funny that the LV type would show "jfs", but that could be just a mistake.

Do you find something like lv00 in /etc/filesystems? I don't think so.

Or perhaps you planned to format a filesystem over lv00 and didn't do it yet?

Anyway, here one can see again how indestructible AIX's logical volume management indeed is, even in this old 4.3 version.

wmp
0
 

Author Comment

by:JacBackus
ID: 35700454

No, there is no lv00 in /etc/filesystems. And I did not touch it.

And yes, it is indestructable, and the hardware too: the machine is running from 1999!

There stays one question: Which comment should I mark as the answer?

Woolmilkporc and Carlmd, you were of great help!
I should like to award the points to Woolmilkporc. Thanks a lot!

- Jac
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35700608
There's no problem splitting points, so you can accept any comment(s) you found useful, regardless of the author.

Glad I could help!

wmp


0
 

Author Comment

by:JacBackus
ID: 35700631
Woolmilkporc, thanks for the hint! I will do that.
0
 

Author Closing Comment

by:JacBackus
ID: 35700713
The solution is in the comments, and not in one of them.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question