- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can't reduce a lv
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-21-2003 12:21 PM
08-21-2003 12:21 PM
Recently, I added one disk to a vg and done extend the lv and filesystem too. I keep in notepad the old Mb size.
But know, I need to get the disk out, but I get error, I don't know why the command doesn't work...?
I don't have the jfsonline, but I can down the aplication without problem. And the PE on the new added disk don't have information on it.
My OS version is hpux 11.0
I had read all lvreduce threads but they don't describe problem most like my own.
The only clear for me is, I must create a newfs to get the old size again.
My old value for the lvcoobk was 17776640Mb, adding the disk (c1t0d0) the new value is 26624000Mb.
The lvreduce command fail, still batting with parameters.
# lvreduce -L 17776640 /dev/vgdatos/lvcoolbk /dev/dsk/c1t0d0
"PhysicalVolumePath": Can be used only if "-m" has been specified.
# lvreduce -L 17776640 /dev/vgdatos/lvcoolbk
lvreduce: "LogicalExtentNumber" is not smaller than current setting;
therefore no logical extents are removed.
Please, check my attach file.
How do I to get out the disk c1t0d0 from the lvcoolbk and from the vg too?
Where is my problem? How can I solve it?
Thanks a lot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 12:37 PM
08-21-2003 12:37 PM
Re: Can't reduce a lv
First, you are not mirroring, so the specification of 'pv_path' cannot be made. Second, your filesystem is still mounted. Unmount the filesystem, add the '-f' option to the 'lvreduce' and execute:
# lvreduce -f -L 17776640 /dev/vgdatos/lvcoolbk
The filesystem will now be in a corrupted state. 'newfs' the filesystem and reload any data you want.
When there are no more extents allocated to the physical disk you want to reclaim, then you can 'vgreduce' it from the volume group.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 01:35 PM
08-21-2003 01:35 PM
Re: Can't reduce a lv
Ejem de lvreduce without corrupt:
# tar ?cvf /dev/rmt/0m /base
# umount /base
# fsck -F vxfs /dev/vg00/base -y
# newfs ?F vxfs ?s 16384(tama?o en Kb) /dev/vg01/rbase
# lvreduce ?L 16(tama?o Mb) /dev/vg01/base
# mount /dev/vg01/base /base
# fsck -F vxfs /dev/vg00/base -y
# tar ?xvf /dev/rmt/0m
Regards
Rene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 02:48 PM
08-21-2003 02:48 PM
Re: Can't reduce a lv
The problem continue, again..
See follow errors:
[root@pacifico]/> lvreduce -f -L 17776640 /dev/vgdatos/lvcoolbk
lvreduce: "LogicalExtentNumber" is not smaller than current setting;
therefore no logical extents are removed.
[root@pacifico]/>
[root@pacifico]/> fsck -F vxfs /dev/vg00/lvcoolbk
vxfs fsck: cannot stat /dev/vg00/lvcoolbk
[root@pacifico]/> bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 360448 35922 304256 11% /
/dev/vg00/lvol1 151509 37192 99166 27% /stand
/dev/vg00/lvol8 1089536 540061 515451 51% /var
/dev/vg00/lvutil 7340032 1000903 5943096 14% /util
/dev/vg00/lvol7 802816 594850 194987 75% /usr
/dev/vg00/lvol4 81920 1989 75481 3% /tmp
/dev/vg00/lvora 2867200 2020678 793684 72% /oracle
/dev/vg00/lvol6 409600 337844 67325 83% /opt
/dev/vg00/lvol5 20480 1364 17973 7% /home
/dev/vgdatos/lvdatos
17780736 3356 17499680 0% /datos
[root@pacifico]/> fsck -F vxfs /dev/vg00/rlvcoolbk
vxfs fsck: cannot stat /dev/vg00/rlvcoolbk
[root@pacifico]/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 03:48 PM
08-21-2003 03:48 PM
Re: Can't reduce a lv
To clarify the situation for you. The "lvreduce" command is in fact pretty useless with out OnlineJFS (unless you want to remove a mirror).
If you do not have OnlineJFS, the correct way to reduce to an LV is as follows:
1. Backup the LV (eg tar, cpio, fbackup etc)& verify the backup.
2. umount the Filesystem
# umount /back
3. Reduce the logical Volume to the new size
# lvreduce -L
4. Recreate the Filesystem
# newfs -F vxfs /dev/vgdatos/rlvcoolbk
5. Mount FS
# mount /back
6. Restore data to /back filesystem.
I'd guess from the messages you are getting that you have already reduced the LV (check with lvdisplay). As Michael said you need to create a new FS (see step 4) & then restore your data. At the moment you're FS is corrupted.
To summarise. If you want to reduce a LV size without Online JFS you have to backup the data in the filesystem, reduce or recreate the LV, create a new FS & then restore the data.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 04:50 PM
08-21-2003 04:50 PM
Re: Can't reduce a lv
Well, I missed another key fact the first time. You are specifying the new logical volume size as '-L 17,776,640', *but* the capital letter "L" means *megabytes* and the upper limit for it is only 16,777,216 [I added the commas for clarity].
Another way to look at your goal, is that you want to *reduce* the logical volume size, and you don't have OnlineJFS (which might or might not help depending on the version). Thus, since you are going to have to 'newfs' the filesystem contained within the shrunken logical volume, you might as well just 'lvremove' the whole logical volume; then 'vgreduce' the disk you don't want; 'lvcreate' the removed logical volume to the size you want; 'newfs' its filesystem; and lastly load any data you want back to it.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2003 08:01 PM
08-21-2003 08:01 PM
Re: Can't reduce a lv
I think your problem is passing parameter to lvreduce command.
Your lvdisplay output shows the size of lvcoolbk is 26000MB and i believe you want it to reduce to 17360MB.
but in command you are giving 17776640 MB which is much higher the originol 26000MB.
You try this syntex.
#lvreduce -L 17360 /dev/vgdatos/lvcoolbk
it will reduce your logical volume.
second thought if you reduce logical volume without online JFS you are going to loose your data or you have to restore data from Backup becoz after reducing logical volume you have to run newfs on that volume, so insted of vreduce you can remove the logical volume and recreate with desired size..
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2003 06:55 AM
08-22-2003 06:55 AM
Re: Can't reduce a lv
Yes, I can reduce it.
**************************
[root@pacifico]/> lvreduce -f -L 16777 /dev/vgdatos/lvcoolbk
Warning: rounding up logical volume size to extent boundary at size "16780" MB.
Logical volume "/dev/vgdatos/lvcoolbk" has been successfully reduced.
************************************
BUT....BUT.. I'm getting the follow error msg:
************************************
[root@pacifico]/> newfs /dev/vgdatos/rlvcoolbk
version 3 layout
17182720 sectors, 4295680 blocks of size 4096, log size 512 blocks
unlimited inodes, 4295680 data blocks, 4294840 free data blocks
132 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 3072 data blocks
first allocation unit starts at block 0
overhead per allocation unit is 0 blocks
[root@pacifico]/> mount /back
vxfs mount: mount option(s) incompatible with file system /dev/vgdatos/lvcoolbk
[root@pacifico]/> lvdisplay -v /dev/vgdatos/lvcoolbk | more
--- Logical volumes ---
LV Name /dev/vgdatos/lvcoolbk
VG Name /dev/vgdatos
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 16780
Current LE 4195
Allocated PE 4195
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 4195 4195
--- Logical extents ---
LE PV1 PE1 Status 1
can you help me, please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2003 06:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2003 07:00 AM
08-22-2003 07:00 AM
Re: Can't reduce a lv
because you're not specifying the lvol to be mounted on your /back, what it does is that it checks against /etc/fstab to see what file system has to be mounted on /back. In this case, chances are, you have some options defined (probably like largefiles) in /etc/fstab and that because you created a new file system (with your newfs command) that don't get recognized with your new FS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2003 07:09 AM
08-22-2003 07:09 AM
Re: Can't reduce a lv
mount /dev/vgdatos/lvcoolbk /back
That should work, but I think ultimately you're probably going to want to recreate the file system with the options specified in fstab.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2003 07:18 AM
08-22-2003 07:18 AM
Re: Can't reduce a lv
The problem was resolve.