1832623 Members
2522 Online
110043 Solutions
New Discussion

Mounting the file system

 
Kourla
Occasional Contributor

Mounting the file system

Hi, I am new to the UNIX administration, can you please help me to solve the below problem.

I have a volume group vg01, which contains 6 PVs and 3 LVs (lvol1, lvol2 and lvol3). Each logical volume is mounted to filesystems.
The vgdisplay vg01 output is
--------------------------------------------
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 4341
VGDA 12
PE Size (Mbytes) 4
Total PE 16089
Alloc PE 10850
Free PE 5239
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
----------------------------------------------

Each logical volume size is 17360 MB. my requirement is to reduce the logical volume lvol2 size to 8680 and create another logical volume (say lvol4)with size 8680 and I have to mount this new logical volume to another file system.

What I have did was, i reduced the lvol2 size by using lvreduce -L 8680 /dev/vg01/lvol2.
When I run the above command I got the message saying that logical volume is reduced successfully.(Please note that I am not bothering about the data in the lvol2), but the lvreduce process never completed, i mean i didn't get the control to command prompt. When I checked ps -ef|grep lvreduce the process is still exists. (Meanwhile I checked the lvol2 size using lvdisplay /dev/vg01/lvol2 then the LV size is reduced to 8680.) I waited for two to 3 hours still lvreduce process is exists. Then I tried to kill the process, eventhough the process does not get killed.

I waited for another 2 hours and reboted the system. The strange think happend after rebooting the system is I am not able to see the mount point for /oralog which was mounted on lovol2 before shutdown. I tried to mount the filesystem again manually using the following command

mount -F vxfs /dev/vg01/lvol2 /oralog
I got the following error when i run the above command.

vxfs mount: /dev/vg01/lvol2 is corrupted. needs checking

What might be the reason and how can i mount the /oralog file system?

Please help me?







5 REPLIES 5
Sanjay_6
Honored Contributor

Re: Mounting the file system

Hi Ravi,

You should be removing the lv and recreating it with a smaller size. so remove lvol2 and recreate it with a smaller size.

Hope this helps.

regds
Patrick Wallek
Honored Contributor

Re: Mounting the file system

I have to agree with Sanjay here. It is normally easier to remove an LV and recreate it, especially if you don't care about the data.

Try this:

# lvremove /dev/vg01/lvol2

# lvcreate -L 8680 -n lvol2 /dev/vg01

# lvcreate -L 8680 -n lvol4 /dev/vg01

This will remove your old lvol2 and then recreate it with a size of 8680 MB and then create lvol4 with a size of 8680 MB.

If you want to try to salvage your current lvol2 you can try:

# fsck -y /dev/vg01/lvol2
# fsck -y -o full /dev/vg01/lvol2

Then try to mount it again. If it works and is the correct size, you can then create your lvol4.
Michael Steele_2
Honored Contributor

Re: Mounting the file system

This hanging will occur with bad disks. Identify the disks associated to this vg and test them. Try vgdisplay -v first and note any errors. You can also "...strings /etc/lvmtab...". Then use dd to test.

dd if=/dev/dsk/c... of=/dev/null count=1000000
control c (* break after 1 count of ten and note the ins and outs or any errors *)

If dd also hangs then this disk is bad. Run diskinfo and call HP HW.

diskinfo /dev/rdsk/c....
Support Fatherhood - Stop Family Law
CCIL
Frequent Advisor

Re: Mounting the file system

Hi
Run the fsck command on logical volume /lvol2 , check the diskinfo for the disks on which the lvol2 is receding.
Amit Vichare