- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lvreduce question
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
10-07-2002 08:14 AM
10-07-2002 08:14 AM
lvreduce question
What is the relation between lvreduce and VxFS filesystem?
Thank you and bye
L.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 08:36 AM
10-07-2002 08:36 AM
Re: lvreduce question
A logical volume is a container for a filesytem. In the case of VxFS filesystems, where the Online component license of JFS is available, one uses 'fsadm' to first reduce the size of the filesystem and then 'lvreduce' to secondarily reduce its container (logical volume). Unless you are running JFS version 3.3, reduction may not succeed. Defragmentation of the filesystem before attempting the resizing may increase the success, however.
In the absence of the Online JFS license, a VxFS filesystem may be reduced by taking a backup of the filesystem (e.g. to tape); doing an 'lvreduce' [which is considered to be destructive of the whole filesystem]; then creating a new filesystem ('mkfs -F vxfs....') and restoring the newly created filesystem from the backup first taken.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 08:43 AM
10-07-2002 08:43 AM
Re: lvreduce question
From the HP-UX man page for lvreduce:
http://www.docs.hp.com/hpux/onlinedocs/B2355-90681/B2355-90681.html
...
The lvreduce command reduces the number of logical extents allocated to a logical volume specified by lv_path. The excess physical extents in the logical volume and any mirror copies are deallocated.
Alternatively, it reduces the number of mirror copies in the logical volume. The physical extents that comprise the deleted mirror copy or copies are deallocated. If pv_path ... is specified, the mirror or mirrors to be removed will be deallocated from those specific physical volumes.
...
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.
...
I don't think this is the in-depth "internals" info you are looking for, and I'm not sure where that is.
As far as the relationship, a LVOL provides a virtual structure for a file system to live in/on, when not using the "whole disk is a volume" approach to disk partitioning.
The LVOL provides the physical space within a volume group, in the form of logical extents (large data blocks allocated out of the entire pool of storage contained within the VG, and mapped through the LVM metadata that defines its structure, space, sizes, etc).
The lvreduce command deallocates extents from a LVOL, or eliminates mirror copies of those extents to another disk in the VG. The extents thus freed up are then available to extend other LVOLs, or to create new ones, within the VG.
If there is a file system in an LVOL, and you deallocate extents that were used by that file system (vxfs or otherwise), it is corrupt and must be recreated. The VxFS allows for growing or shrinking a file system on the fly, so that you can reduce the LVOL on the fly if you care to, but...
If you search through this forum, you will find that the common assertion is that it is OK to grow data structures like LVOLs and VxFS file systems on the fly (with a backup first), but that nobody recommends reducing them that way. There are uncertainties about which extents contain data, and which will be deallocated, and that is enough to make most people avoid this activity.
In my experience, occasionally, somebody will go ahead and try on-line reduction via fsadm_vxfs and lvreduce, and some have gotten away with it. Once. Maybe twice. But pretty much everyone has gotten burned at some point by this practice, and then they don't do it anymore. I myself have "learned from the mistakes of others", and have not, and never intend to, do online reductions.
Maybe I've answered your question, and maybe I'm way off. If not, please be a little more specific about what you are uncertain about, and I (or someone more knowledgeable) will take a shot at helping you further.
Best Regards, --bmr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 08:52 AM
10-07-2002 08:52 AM
Re: lvreduce question
I use HP-Online JFS.
I know that if try to reduce a LV to a size smaller than the fs size, surely I lost my data, because there are useful data within the PE cutted by lvreduce and lvm doesn't now about useful data in the PE.
But if I reduce a lv to a size BIGGER than the fs size contained in the lv, is there some probability that data were lost?
That is, does lvreduce know the PE used by the file system?
Thank you again
L.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 09:12 AM
10-07-2002 09:12 AM
Re: lvreduce question
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 09:13 AM
10-07-2002 09:13 AM
Re: lvreduce question
No, to the best of my knowledge LVM has no knowledge of how the filesytem has "chosen" to occupy physical space granted it.
Thus, if you created a logical volume of (for example) 100-extents but created a filesystem within it of only 50-extents; then you *could* 'lvreduce; the logical volume to 50-extents without corruption of the filesystem data. That is because there was never any utilization of extents 51-100 by the filesystem structures.
When an Online JFS 'fsadm' downward resize is done, the process insures that no filesystem data occupies physical address space that maps to physical extents that can then be freed ('lvreduced').
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2002 09:16 AM
10-07-2002 09:16 AM
Re: lvreduce question
I hope i understand your question, if you are reducing your Logical Volume "bigger" i beleave you have to use lvextend instead of lvreduce and then your answer to the question "will lvextend know your physical limit" is yes it will extend your LV to the maximum physical extend possible (whithin blocks of 4 MB)
kind regards
RJ