Operating System - HP-UX
1830333 Members
2017 Online
110001 Solutions
New Discussion

Strange behaviour on a new FS

 
SOLVED
Go to solution
Jdamian
Respected Contributor

Strange behaviour on a new FS

Hi

I created a HFS file system on a lvol. I mounted it and umounted fine.

Then I created a VxFS file system on the same lvol... I cannot mount it.

fstyp command returns different values:

fstyp /dev/vgXX/lvolA --> HFS
fstyp /dev/vgXX/rlvolA --> VxFS

Any idea ?
13 REPLIES 13
Helen French
Honored Contributor

Re: Strange behaviour on a new FS

This could be a solution:

# lvremove lv_name
# lvcreate -L size -n lv_name
# newfs -F vxfs rlv_name
# mount lv_name /mount_point
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: Strange behaviour on a new FS

Hi,

You have not used the correct device files while creating the filesystem.

Here you have used lvol for hfs fs and rlvol for vxfs filesystem.

While creating a filesystem you should always use a raw device file ie. rlvol

# newfs -F vxfs /dev/vg01/rlvol1

# newfs -F hfs /dev/vg01/rlvol1

You can do a lvremove of the lvol and recreate the lvol again

Piyush
Jdamian
Respected Contributor

Re: Strange behaviour on a new FS

# lvremove /dev/vgXX/lvolA
The logical volume "/dev/vgXX/lvolA" is not empty;
do you really want to delete the logical volume (y/n) : y
lvremove: Couldn't delete logical volume "/dev/vgXX/lvolA":
The specified logical volume is open, or
a sparing operation is in progress.
Volume Group configuration for /dev/vgXX has been saved in /etc/lvmconf/vgXX.conf
??????????????????????

Maybe this is the problem
S.K. Chan
Honored Contributor

Re: Strange behaviour on a new FS

After you have umounted lvolA FS, you would run newfs with vxfs option like so ..

# newfs -F vxfs /dev/vgXX/rlvolA

before you remount it back as a VXFS. Is that what you did ?
Jdamian
Respected Contributor

Re: Strange behaviour on a new FS

Ples, Piyush... I'm old enough as system administrator.

I'm sure I used the raw special file.
MANOJ SRIVASTAVA
Honored Contributor

Re: Strange behaviour on a new FS

Hi Damian

All you do is to recreate the logical vloume , after deleteing the old one , and ofcourse run a newfs on the same .

Manoj Srivastava
Helen French
Honored Contributor
Solution

Re: Strange behaviour on a new FS

If you receive error while removing the LV, then probably some process is locking it. Check it with 'lsof' or 'fuser' command. Remove all process working on this LV and then check the LV status with 'lvdisplay -v' too. If everything is fine, then remove it with lvremove command.
Life is a promise, fulfill it!
Jdamian
Respected Contributor

Re: Strange behaviour on a new FS

lsof and fuser reports nothing.

# vgchange -a n vgXX
vgchange: Couldn't deactivate volume group "vgXX":
Device busy
Helen French
Honored Contributor

Re: Strange behaviour on a new FS

Another possible try:

Try lvremove with -f option, and if still you getting the error, then you may need to boot in single user mode, then execute 'lvremove -f'
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor

Re: Strange behaviour on a new FS

The de-activation of VG error can be dues to 2 reasons ..
1) LVs on the VG is still mounted
2) Minor number conflict
For 2, check ..
# ll /dev/vg*/group
==> see if you got any 2 similar minor number.

Also the "sparing operation .." message kind of bothers me too. But only if you're using a PV (disk) solely as spare in your VG, otherwise the message is not applicable to you.
Helen French
Honored Contributor

Re: Strange behaviour on a new FS

If you are trying to deactivate the VG, you need to unmount all file systems and free the LVs first. Otherwise it will give you device busy errors. Your best bet will be to boot from single user mode and remove this LV and recreate it.

If you just want to get rid of the VG, you can do 'vgexport'. But make sure that you don't have any important LVs configured on this VG.
Life is a promise, fulfill it!
MANOJ SRIVASTAVA
Honored Contributor

Re: Strange behaviour on a new FS

What is o/p of vgdisplay -v /dev/vgxx . I think there is some conflict . I would may be rename lvmtab and do a vgscan again .Can you post a o/p of vgdispaly -v /dev/vgxx



Manoj Srivastava
Jdamian
Respected Contributor

Re: Strange behaviour on a new FS

.