- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to reduce logical volume size?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2004 08:46 AM
08-07-2004 08:46 AM
How to reduce logical volume size?
I am having a logical volume of 400MB. I tried to reduce the LV size to 200MB using lvreduce.
#lvreduce
Please find the output of the above command.
# lvreduce -L 200 /dev/vg01/lvol1
Warning: The Logical Volume has a file system larger than the reduced size.
Reducing the Logical Volume will cause filesystem corruption.
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg01/lvol1" has been successfully reduced.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
After reducing the LV size when i try to mount the file system, i got an error message as the LV got corrupted.
The output of fsck is
# fsck /dev/vg01/rlvol1
fsck: /etc/default/fs is used for determining the file system type
file system is larger than device
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...
Kindly help me out in reducing the LV.
Iam using an test server for practising.
Kindly help me out in this regard.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2004 05:40 PM
08-07-2004 05:40 PM
Re: How to reduce logical volume size?
Please check my reply for the same question on your different post.
You need to recreate the filesystem with Newfs.
Cheers,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2004 07:48 PM
08-07-2004 07:48 PM
Re: How to reduce logical volume size?
You should be absolutely sure about the size, It will not work if you give lesser size , you will continue to get same error. Also I hope you have not created a new Logical volume after lvreduce. If you have and not written any data/or Newfs, just remove that LV and lvextend to old one to the EXACT old size.
02. Then you can defragment the Extents and directory using fsadm_vxfs command.
03. Then use fsadm_vxfs to reduce the filesystem size first.
04. After this only, run lvreduce. You can not reduce LV before reducing Filesystem.
Of course take the backup before doing any of these.
Hope this helps....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2004 01:51 PM
08-08-2004 01:51 PM
Re: How to reduce logical volume size?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 04:22 AM
08-09-2004 04:22 AM
Re: How to reduce logical volume size?
You could do that with tar in a very brief time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 07:53 PM
08-09-2004 07:53 PM
Re: How to reduce logical volume size?
You have to use the fsadm command.
I do this some months ago.
Tell me if you want more details.
Olivier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2004 04:14 AM
08-10-2004 04:14 AM
Re: How to reduce logical volume size?
What you did is correct in order to reduce a LV. This is enough if you are using the logical volume as a raw device (with oracle or as swap device) if you have a file system on it you first must reduce the file system.
This can be done ONLY with jfs (vxfs) and ONLINE JFS product (this is a product not in bundle with HPUX)
These are the steps
1 fsadm -eE /mounting_point to defrag the extend and shift all the used space in upper part of the LV
2 fsadm -b
3 finally lvreduce as you did. This last command will always ask you for confirmation, if you did previous steps everything is fine.
Remember that LV is sized in multiples of PE size, so be carefull about the argument to fsadm -b and lvreduce
Last thing, if you get wrong in the last step, as you did, the only solution is to restore the LV to its original size and fsck it after lvextend. In this way you return the lost PE to the LV and everything is fine again. Of course you can do that if you didn't use the PE to build/extend another LV. In this case your file system is lost definetly.
hope it helps