- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lvreduce vs lvremove
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
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
тАО05-16-2005 12:13 AM
тАО05-16-2005 12:13 AM
lvreduce -L 10000 /dev/vgi18/lvol118
i get the following message.. corruption? why? this is a IA64 11.23v2 system with JFSonline.
I unmounted the filesystem and just wanted to reduce the size of lvol118 so i can create another filesystem out there under either swap2 or whatever. Is the best practice to just delete the entire lvol and recreate lvol118 at the right size? if so, why is lvreduce a valid command if it is going to cause corruption?
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) :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 12:18 AM
тАО05-16-2005 12:18 AM
Re: lvreduce vs lvremove
This is perfectly logical - all it's telling you is that your 30GB file system is going to be trashed when you reduce the size of the container it lives in down to 20GB. Since you plan on creating a new file system anyway, you can just ignore the warning. You could also go the lvremove/lvcreate route, but that's one extra step.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 12:24 AM
тАО05-16-2005 12:24 AM
Re: lvreduce vs lvremove
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 12:26 AM
тАО05-16-2005 12:26 AM
Re: lvreduce vs lvremove
Reducing volumes is a pain even with online-jfs and full version of veritas. One of the problems is fragmentation. Since you don't have online-jfs the and you seem create a new volume anyway just ignore the warning and create a new filsystem.
# mkfs -F vxfs /dev/vgxx....
I often create a backup, remove the logical volume and recreate it with the correct size.
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 12:54 AM
тАО05-16-2005 12:54 AM
Re: lvreduce vs lvremove
You need to reduce the filesystem first before you lvreduce the LVOL if you expect to have a cleanly reduced LVOL. If say the filesystem (or mount point) on TOP of that LVOL (/dev/vgi18/lvol118 is /data you need to reduce it first (assuming there is space):
fsadm -b 20480 /data
You do not even have to unmount the filesystem since you have Online JFS (aka Veritas Filesystem). (Note that this process will also attempt to defragment the filesystem)
Once that is done. You can now do your lvreduce command. NOTE THAT LVREDUCE WILL NOT SAFELY WARN YOU OF POSSIBLE CORRUPTION ON THE FILESYSTEM IF YOU DID NOT PERFORM YOUR FILESYSTEM REDUCTION FIRST AHEAD OF YOUR LVOL REDUCTION.
Robert, et al., VxVM (FULL or BASE) will allow you to resize volumes and their filesystems on the fly and somewhat safer than LVM. The key is actualy in the filesystem - you need to have Online JFS (a.k.a Full Veritas Filesystem). With VxVM + OnlineJFS - it is somewhat easier and is done in one command:
/etc/vx/bin/vxresize -g vgi18 lvol118 -10G
The above VxVM command will first fsadm the filesystem on top of the volume and reduce the filesystem. If there are no errors or if it senses there is space for the filesystem reduction - it then reduces the volum - all on the fly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 12:56 AM
тАО05-16-2005 12:56 AM
Re: lvreduce vs lvremove
The only corruption will be to the filesystem. It is not going to corrupt the logical volume. When you create the new filesystem you will be overwriting the corrupted one and everything will be fine.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:04 AM
тАО05-16-2005 01:04 AM
Re: lvreduce vs lvremove
It is already explained better in previous replies. Just to add about lvreduce and lvremove...
Suppose you have 6 filesystems in a lv each of 5gb and are contiguous.
Now if you just want to get rid of last two filesystem and create nev LV in that space then you have to use "lvredcue" becuase lvremove will remove all filesystems. LVREDUCE keeps your data in first 4 FS intact provided they are contigous in nature.
LVREMOVE can be used if you don't bother about all the FS sitting in the LV. just remove it and recreate as per your requirement.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:04 AM
тАО05-16-2005 01:04 AM
Re: lvreduce vs lvremove
Again... if you wanted to preserve/keep the usability of your existing LVOL (that is IF it has a filesystem on top of it) - you should have done your filesystem reduction FIRST (via fsadm) before your LVREDUCE.
Since you have OnlineJFS - the proper way of freeing up space on an (LVOL WITH A FILESYSTEM ON TOP OF IT) is:
1. fsadm -b newsize_in_MB /mount_point
2. lvreduce .. the LVOL
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:09 AM
тАО05-16-2005 01:09 AM
Re: lvreduce vs lvremove
That may be nice for future reference, but, since he's already run the lvreduce, it's a little late now!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:13 AM
тАО05-16-2005 01:13 AM
Re: lvreduce vs lvremove
I have tried the fsadm and the vxresize commands.. NOne of these will work as i am getting errors.
/etc/vx/bin/vxresize -g vgi18 lvol118 -10G
vxvm:vxresize: ERROR: Problem running vxprint command for volume lvol118, in diskgroup vgi18
What i am getting out of reading this is, i need to reduce the filesystem first. then i can do a lvreduce.
fsadm didn't work either. here is the output from that.
fsadm -b 20500 /h18
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: sectors must be >= 23850 as they are currently in use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:21 AM
тАО05-16-2005 01:21 AM
Re: lvreduce vs lvremove
You cannot use vxrsize since you're obviously not using VxVM.
You're on the right path. The error message your seeing out of fsadm simply means you cannot reduce the filesystem to 20500 Mbytes and it actually is giving you a clue already!
"vxfs fsadm: sectors must be >= 23850 as they are currently in use" - means you can reduce /h18 (and the lvol) to no less than 23850 Mbytes.
bdf /h18 and whatever is your available space is the size that you can free up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:34 AM
тАО05-16-2005 01:34 AM
Re: lvreduce vs lvremove
Or barring that just lvremove and recreate the LV.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:37 AM
тАО05-16-2005 01:37 AM
Re: lvreduce vs lvremove
Personally I view this as an excellent opportunity for you to actually try this nice feature of Online JFS and the inner workings of LVM... AS YOU MAY BE FACING A REAL SITUATION in having to free up a space on a LIVE FILESYSTEM!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 01:43 AM
тАО05-16-2005 01:43 AM
Re: lvreduce vs lvremove
lvreduce -L 20000 /dev/vgi18/lvol118
newfs -F vxfs -o largefiles /dev/vgi18/rlvol118
that worked just fine.
I have never had a box with JFSonline until this one. I am unfamiliar with the software. But the fsadm didn't seem to work, also, when i tried to reduce the lvol, i had to unmount it.. i thought that JFSonine was supposed to do this stuff while mounted. I don't know, thanks for all of your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2005 06:45 PM
тАО05-16-2005 06:45 PM
Re: lvreduce vs lvremove
As posted earlier also there are no doubts in the functioning of the product and it nodoubt do what it is indented for. The only mistake you did was to try lvreduce before running fsadm. As a file system resides on a logical volume, the file system should be reduced prior to reducing logical volume. You can still test it by running in proper order.
It is also recommended to defrag data before reducing file system. Your fasadm could have failed because you did not defragmented data. Another thing would be that contents of your file system should be less than the size you are reducing to.Try it this way.
Defrag : -
#fsadm -F vxfs -eE /mount_point
Reduce File System :-
#fsadm -F vxfs -b (Required size in Blocks) /mount_point
Reduce the lvol now :-
#lvreduce -L (New Size in MB) /dev/vgxx/lvolx
There should not be any problems once you do this this way. Defarmentation may take a long time depending upon the contents of your file system.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2005 01:07 AM
тАО05-17-2005 01:07 AM
Re: lvreduce vs lvremove
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2005 01:12 AM
тАО05-17-2005 01:12 AM
Re: lvreduce vs lvremove
Do a man on fsadm_vxfs.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2005 01:16 AM
тАО05-17-2005 01:16 AM