1753259 Members
5730 Online
108792 Solutions
New Discussion юеВ

lvreduce

 
rajesh73
Super Advisor

lvreduce

We have online jfs installed .now I need to reduce the filesystem.

fsadm -f vxfs -b 3000 /data

This above command will work or not?

How to check the vxfs version and vg and lvm version
4 REPLIES 4
Bill Hassell
Honored Contributor

Re: lvreduce

>> fsadm -f vxfs -b 3000 /data

 

From the man page:

 

-b newsize  Resize the file system to newsize sectors.

 However, nowhere in the man page is a "sector" defined. One could guess that it means 512 bytes as it has for decades when referring to disks. However, by experimentation it would appear that fsadm sectors are 1024 bytes, so your command will change the filesystem to 3000 sectors which is 3 megabytes...probably not what you wanted. The good news is that if the filesystem is larger than 3 megabytes, the command will not make any changes.

 

Unfortunately, the man page has been defective ever since fsadm was created. There is an undocumented suffix that can be added to make the number (3000 in this case) represent megabytes, like this: 3000m

 

So the command is probably: fsadm -f vxfs -b 3000m /data

 

I say probably because you did not tell us how big the the current lvol is and how much of the lvol is occupied.

 

As far as versions:

 

vxfs version = fstyp -v /dev/vg00/lvol3

 

LVM version = what /sbin/vgdisplay

...all LVM commands are actually one executable so what with any command will be the same

 

VG version = vgdisplay vg00

...For VG version, if vgdisplay does not report "VG Version" then the VG is version 1.

 

 



Bill Hassell, sysadmin
rajesh73
Super Advisor

Re: lvreduce

I need yp reduce data mount point from 6gb to 3 GB .please share the procedure
Patrick Wallek
Honored Contributor

Re: lvreduce

>>I need yp reduce data mount point from 6gb to 3 GB .please share the procedure

 

If Online JFS is installed then you can do the following:

 

# fsadm -F vxfs -b 3072m /data

 

# lvreduce -L 3072 /dev/vg?/lvol?

 

Where "/dev/vg?/lvol?" is the name is the LV for this mountpoint.

chindi
Respected Contributor

Re: lvreduce

Take backup of your mountpoint before running lvreduce.

If db mountpoint , shut application down & then a cold backup.