- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lvreduce
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
Discussions
Discussions
Forums
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
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
тАО03-10-2011 09:31 PM
тАО03-10-2011 09:31 PM
B.11.23
What is the exact procedure of reducing LVs.I know we have to shrink FS before reducing the LV.No online JFS is available with me.
Thanks in advance
himacs
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 09:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 09:58 PM
тАО03-10-2011 09:58 PM
Re: lvreduce
Actually i don want to restore any data.M working in a test machine now.
1.Create 320 MB lv
/dev/vg02/test 327680 1812 305508 1% /test
2.umount /test
3.lvreduce -L 160 /dev/vg02/test
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/vg02/test" has been successfully reduced.
Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf
4. extendfs -F vxfs /dev/vg02/rtest
UX:vxfs extendfs: ERROR: V-3-20139: Only expansion allowed.
lvdisplay shows size reduced to 160MB.But not able to mount.
NO data resides in /test.
now i want to mount /test with new size.
Please suggest
Regards
himacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 10:01 PM
тАО03-10-2011 10:01 PM
Re: lvreduce
A newfs only makes it valid again.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 10:08 PM
тАО03-10-2011 10:08 PM
Re: lvreduce
But long back i opened a case with HP regarding lvreduce.But their answer was we can reduce.
I am also read in all HP document that lvreduce will cause data loss.But i am very much sure that we can reduce raw file system without data loss.
So i cant mount /test with new size.
Regards
himacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 10:18 PM
тАО03-10-2011 10:18 PM
Re: lvreduce
for that you required online JFS installed on your system.
please check with swlist command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2011 10:24 PM
тАО03-10-2011 10:24 PM
Re: lvreduce
This is what you currently see.
You need to have online JFS to reduce the file system first. Otherwise you destroy it.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2011 02:15 AM
тАО03-11-2011 02:15 AM
Re: lvreduce
yes, it will decrease the number of the logical extents of a logical volume to the desired value.
But LVM does not store any information about which physical extents within a logical volume contain useful data, therefore, reducing the space allocated to a logical volume without doing a prior backup of the data could lead to the loss of useful data. The lvreduce command on a logical volume containing a file system of greater length than the size being reduced to will cause data corruption.
Hence, it is recommended to decrease/increase filesystem size with online JFS installed.
Rgds...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2011 04:21 AM
тАО03-11-2011 04:21 AM
Re: lvreduce
If you don't decrease the filesystem first, you will end up with a corrupt filesystem after you decrease the logical volume. That's your case now. Thank god this is only a test system.
You can imagine a logical volume as a container to the filesystem. If the container is smaller then the filesystem itself, it will somehow corrupt the filesystem and you'll lose data.
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2011 04:31 AM
тАО03-11-2011 04:31 AM
Re: lvreduce
> 1.Create 320 MB lv
1a. mount /dev/vg02/test /test
> /dev/vg02/test 327680 1812 305508 1% /test
> 2.umount /test
> 3.lvreduce -L 160 /dev/vg02/test
> Warning: ...
Go ahead and reduce the lvol.
> 4. extendfs -F vxfs /dev/vg02/rtest
Not correct. As the message states, this is used to extend the filesystem, not reduce it.
> lvdisplay shows size reduced to 160MB.But not able to mount. NO data resides in /test.
This is the part where I am confused. Are you saying that you don't want the data in the filesystem? If yes, then step 4 will be:
4. newfs /dev/vg02/rtest
and now you can mount the empty filesystem with the new size.
However, if you have data that you must keep on this filesystem, you MUST backup the data first. Then umount, lvreduce, newfs and mount the empty filesystem. Now restore your data.
Because you do not have Online JFS, reducing a filesystem will ALWAYS destroy (corrupt, scramble, etc) the data. That is why you must purchase the optional product.
Bill Hassell, sysadmin