- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lvreduce with many disks
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
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
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
тАО09-29-2016 07:38 AM
тАО09-29-2016 07:38 AM
lvreduce with many disks
Need some help, for some reason I have encountered this issue and I can not wrap my head around a solution.
The issue I'm having involves a storage migration. I have a volume group with quite a few 100GB LUNs. All of these luns make up one logical volume. I need to mirror that logical volume to new 3Par disks. No issues there, my issue comes in the splitting off of the old LUNs (original luns).
The problem is that when I do the lvreduce to break off the original disks, I don't have enough characters on the command line to accomodate all of the disks I need to split off.
How do I split off (lvreduce) a large number of disks?
Hopefully that makes some sense.
Thanks,
Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2016 08:27 AM
тАО09-29-2016 08:27 AM
Re: lvreduce with many disks
Ok, well I did a bit more digging and found this post:
/t5/LVM-and-VxVM/lvreduce-m-0-multiple-PV-s/td-p/5083917
So basically what I was missing was adding "\" to continue the input line. I don't know why I could not pull that out of my head, as many times as I have used that...
As an FYI, here is what the command would look like:
lvreduce -m 0 /dev/vgXX/lvolYY /dev/disk/disk## /dev/disk/disk## \
/dev/disk/disk## /dev/disk/disk## \
/dev/disk/disk## /dev/disk/disk## \
/dev/disk/disk##
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2016 08:49 AM
тАО09-29-2016 08:49 AM
Re: lvreduce with many disks
> [...] I don't have enough characters on the command line [...]
For some shell or other (which?)? Using some terminal/emulator?
What, exactly, do you think limits what, exactly?
> [...] adding "\" to continue the input line. [...]
Or just keep typing past (whatever you think is) the end of the line?
> [...] can not wrap my head around [...]
It's a line-wrap question, not a head-wrap question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2016 10:02 AM
тАО09-29-2016 10:02 AM
Re: lvreduce with many disks
This is a common misunderstanding about line lengths. Your terminal emulator (SecureCRT, Reflection, PuTTY, xterm...) provides an artificial line length that may be 80 or 100 or more characters. But the right end of the screen is meaningless to the shell which is limited to about 250 characters for an input line. And vi is limited to about 4000 characters on a single line.
Or for lvreduce, you can issue the command several times to remove a few LUNs at a time.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2016 11:29 AM
тАО09-29-2016 11:29 AM
Re: lvreduce with many disks
> [...] the shell which is limited to about 250 characters for an input
> line. [...]
This depends on which "the shell" you use. Around here, for example:
rux# uname -a
HP-UX rux B.11.31 U ia64 1678555272 unlimited-user license
And "/bin/sh" stops accepting input at 250 characters, so a command like
"echo <blah, blah, ...> is stopped at a point like this (as seen on an
80-character-wide terminal):
1 123456789 123456789 123456789 123456789 123456789 2 123456789 123456789 123456
789 123456789 123456789 3 123456789 123456789 123456789 123456789 123456789 4 12
3456789 123456789 123456789 123456789 123456789 5 123456789 123456789 123456789
12345
("echo " + 245 characters = 250 characters.)
But GNU bash has no such (low) limit:
1 123456789 123456789 123456789 123456789 123456789 2 123456789 123456789 123456
789 123456789 123456789 3 123456789 123456789 123456789 123456789 123456789 4 12
3456789 123456789 123456789 123456789 123456789 5 123456789 123456789 123456789
123456789 123456789 6 123456789 123456789 123456789 123456789 123456789 7 123456
789 123456789 123456789 123456789 123456789 8 123456789 123456789 123456789 1234
56789 123456789 9 123456789 123456789 123456789 123456789 123456789 A 123456789
123456789 123456789 123456789 123456789 B 123456789 123456789 123456789 12345678
9 123456789 C 123456789 123456789 123456789 123456789 123456789 D 123456789 1234
56789 123456789 123456789 123456789 E 123456789 123456789 123456789 123456789 12
3456789 F 123456789 123456789 123456789 123456789 123456789
("echo " + 779 characters = 784 characters, with no end in sight.)
rux# $0 --version
$0 --version
GNU bash, version 3.2.0(1)-release (ia64-hp-hpux11.31)
Copyright (C) 2005 Free Software Foundation, Inc.
But certainly, using backslash-escaped line breaks, and writing a
script instead of trying to enter such a long line manually (even
employing the new copy+paste technology which I used) makes more sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2016 01:33 PM
тАО09-29-2016 01:33 PM
Re: lvreduce with many disks
man lvmpvg
this will help you.
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!
