Operating System - HP-UX
1823111 Members
3386 Online
109646 Solutions
New Discussion юеВ

Online lvreduce & vgreduce for HP10.20

 
SOLVED
Go to solution
Joaquin_13
Advisor

Online lvreduce & vgreduce for HP10.20

Does anybody have an idea if when I performed an lv & vgreduce, does this have an impact on the VG or does this may trigger a corruption.
& is there any online reducing of LV & VG like when increasing it by using online JFS, if so,what are the detailed commands/syntax? & if i'm not going to use the Online reducing LV & VG should i first unmount the LV & FS then after i reduce the LV then remove a couple of disk on the VG that is the right time i'm going to mount the FS....


regards
7 REPLIES 7
Rajeev  Shukla
Honored Contributor

Re: Online lvreduce & vgreduce for HP10.20

Doing LV reduce and VG reduce is safe if you are using online JFS, but this is a priced product and you need licence for it.

If you are performing a normal vg and lv reduce, it is better to take a backup before you perform it to be on safer side.

Joaquin_13
Advisor

Re: Online lvreduce & vgreduce for HP10.20

We have the Online JFS installed in our server but,i only know the extending the LV & VG using JFS but in reducing i haven't tried it before, if you wouldn't mind may i know the step by step procedure in reducing of VG & LV using JFS.
Rajeev  Shukla
Honored Contributor
Solution

Re: Online lvreduce & vgreduce for HP10.20

Here is the way you would go to reduce the LV using online JFS


fsadm -F vxfs -b [lv_size_MB]M /

M stands for MB (dont forget to suffix with M)

lvreduce -L [lv_size_MB] /dev/vg??/lvol?


Cheers
Rajeev
Joaquin_13
Advisor

Re: Online lvreduce & vgreduce for HP10.20

Thank's,

Yup, I've tried that already but i was prompt with this error
fsadm: /dev/vg05/rlvol1 is currently 47538176 sectors - size will be reduced
fsadm: attempt to resize /dev/vg05/rlvol1 failed with errno 16.


And i even tried the reduce process with unmounted FS, the lvreduce was successful but when I've checked the FS size it still obtain it's original value, but when I checked the LV properties using lvdisplay it appears that the LE/PE has been reduce. What does this means? & do you have any idea what does the errno 16 stands for?
Rajeev  Shukla
Honored Contributor

Re: Online lvreduce & vgreduce for HP10.20

Try Reorganizing directories/file extents before you reduce the filesystem.
I dont recall ever getting this error message.

# fsadm -F vxfs -d -D -e -E /mountdirectory

Here is another thread that explains getting this error

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=104744

Thanks
Rajeev
Bill Hassell
Honored Contributor

Re: Online lvreduce & vgreduce for HP10.20

lvreduce knows *NOTHING* about files and directories. The reason is that an lvol (LV) is a section of disk space--nothing more. lvreduce will simply make the disk space smaller, thus destroying your filesystem. Online JFS is OK for increasing an lvol with a filesystem but in general, it fails (corrupts filesystems) at all revisions before 11.11 and the extended Online JFS product.

Now vgreduce is completely separate from lvreduce. Normally, if you are running vgreduce, you are taking a physical disk (or LUN) out of service, at least for that VG. And vgreduce won't allow you to remove active lvols. Normally, you would umount any filesystems, then use lvremove rather than lvreduce, and when all the lvols have been removed from the target disk, use vgreduce.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Online lvreduce & vgreduce for HP10.20

I forgot about errno 16:

All Unix systems use a standard numbering (and naming) system for errors.

from /usr/include/sys/errno.h:
define EBUSY 16 /* Mount device busy */

from man 2 errno:
[EBUSY] Device or resource busy.

An attempt to mount a device that was already mounted or an attempt was made to dismount a device on which there is an active file (open file, current directory, mounted-on file, active text segment). It will also occur if an attempt is made to enable accounting when it is already enabled.
The device or resource is currently unavailable, such as when a nonsharable device file is in use.


Bill Hassell, sysadmin