- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lvrduce syntax !! help !!
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
07-22-2003 01:36 PM
07-22-2003 01:36 PM
lvrduce syntax !! help !!
I have 1 lv with 2 disks :
/dev/vg01/lvol1 with c4t13d0 (36G) and c4t1d0 (9G) . The lvol is 44G , i wan to stay just with the 36G .
Pls give me the full commands .
Eran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 01:41 PM
07-22-2003 01:41 PM
Re: lvrduce syntax !! help !!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 01:42 PM
07-22-2003 01:42 PM
Re: lvrduce syntax !! help !!
So:
1) somehow backup your data (fbackup or something)
2) umount the dir that is mounted against vg01/lvol1
3) lvremove /dev/vg01/lvol1
4) lvcreate -L 34000 /dev/vg01
(Don't try to create a 36GB LV and expect it to stay all on the 36GB disk. You do not have the full 36GB available on that disk)
5) newfs -F vxfs /dev/vg01/rlvol1
6) remount the dir to the new lvol1
7) restore your data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 01:45 PM
07-22-2003 01:45 PM
Re: lvrduce syntax !! help !!
make_tape_recovery
Back up your system.
fbackup the entire system, with databases shut.
Now you need to get the lay of the land.
pvdisplay -v /dev/rdsk/c4t13d0
pvdisplay -v /dev/rdsk/c4t1d0
Identify which logical volume needs to be removed or reduced.
You may need to use lvremove to remove a logical volume.
lvremove /dev/vg00/lvolname
now lvreduce
lvreduce -l
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 02:10 PM
07-22-2003 02:10 PM
Re: lvrduce syntax !! help !!
# bdf -l|grep -e "/dev/vg01/lvol1"
==> Check if /dev/vg01/lvol1 is mounted or not. If it is you need to umount the FS first (assuming the mount point is /data).
# umount /data
==> If you can't umount it, it means some process is holding it. You then need to either terminate these processes or do this in single-user-mode.
# mkdir /temp
# mount /dev/vg01/lvol1 /temp
==> Next perform a full backup on /temp to tape or you can make a copy of your data to another FS (provided space is not a problem).
# umount /temp ; rmdir /temp
# vgdisplay -v vg01
==> Take note of Total PE available for c4t13d0 (if your intention is to ONLY use this disk for lvol1).
# lvreduce -l
# newfs -F vxfs /dev/vg01/rlvol1
# mount /dev/vg01/lvol1 /data
Next restore you data back to /data. I would go with Patrick's suggestion of recreating lvol1 which is much "cleaner".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 04:16 PM
07-22-2003 04:16 PM
Re: lvrduce syntax !! help !!
In addition to the other replies I'd offer a slightly different approach, assuming as SK has said you do not have OnlineJFS. I'd go with what everyone says and recreate the lvol, rather than lvreduce.
As others have said backup the filesystem on /dev/vg01/lvol1 ( preferably twice to be sure!) and then remove it.
1. Then create a new logical volume with 0MB of space:
# lvcreate /dev/vg01
2. Check how many physical extents (PE) are available on disk /dev/dsk/c4t13d0:
# pvdisplay /dev/dsk/c4t13d0
(Look for Total PE value - its probably around 9200 if you're using default 4 MB extent size.)
3. Extend the logical volume you created, using all the space on /dev/dsk/c4t13d0:
# lvextend -l
(The "Total PE" is the value you got from pvdisplay in step 2.)
4. Create filesystem & mount as detailed by others.
5. Restore your data back to /dev/vg01/lvol1
This will have created a new lvol1 using only the space on /dev/dsk/c4t13d0, leaving /dev/dsk/c4t1d0 free to be removed from VG or used as space for another lvol in vg01.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:34 AM
07-23-2003 09:34 AM
Re: lvrduce syntax !! help !!
The data is written on both disks ,
i want to seperate them .
Eran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:37 AM
07-23-2003 09:37 AM
Re: lvrduce syntax !! help !!
That doesn't really complicate anything. The steps are still the same: backup the data; blow away the lvol, re-create the lvol, restore the data.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:40 AM
07-23-2003 09:40 AM
Re: lvrduce syntax !! help !!
Oh, wait a minute - I see what you're saying. You want to not use the 9GB disk (c4t1d0). That does make it a little more complicated. Run a pvdisplay command against that disk "pvdisplay /dev/dsk/c4t1d0". This will tell you what logical volumes reside there. You will need to back up, remove, re-create and restore each of them in order to free up the 9GB disk.
Post the output of the pvdisplay command and we'll take a look.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:42 AM
07-23-2003 09:42 AM
Re: lvrduce syntax !! help !!
Oh, wait a minute - I see what you're saying. You want to not use the 9GB disk (c4t1d0). That does make it a little more complicated. Run a pvdisplay command against that disk "pvdisplay -v /dev/dsk/c4t1d0". This will tell you what logical volumes reside there. You will need to back up, remove, re-create and restore each of them in order to free up the 9GB disk.
Post the output of the pvdisplay command and we'll take a look. Pipe it to more and just post the first part - that's all we need to see.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:43 AM
07-23-2003 09:43 AM
Re: lvrduce syntax !! help !!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2003 09:47 AM
07-23-2003 09:47 AM
Re: lvrduce syntax !! help !!
One more thought - this will add one step:
1) backup the data
2) lvremove the lvol
3) vgreduce the 9GB disk out of the vg
4) recreate the lvol
5) restore the data
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2003 02:32 AM
07-26-2003 02:32 AM
Re: lvrduce syntax !! help !!
lvreduce -L
but before doing this take backup of all the data in that lvol1.after lvreduce run fsck on the lvol1.Create a new filesystem on the remaining 9GB ,fsck and mount it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2003 03:23 AM
07-26-2003 03:23 AM
Re: lvrduce syntax !! help !!
Shutdown any applications that use lvol1 on vg01 and kill any processes left on the filesystem. You can use fuser to check what processes are still using the filesystem.
# fuser -cu /
# fuser -ku /
Now backup the data on lvol1 on vg01 using whatever backup utility you want.
Unmount the filesystem, deactivate the volume group and vgexport it to blow it away so you can recreate the volume group, logical volume and filesystem.
# umount
# vgchange -a n /dev/vg01
# vgexport /dev/vg01
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# pvcreate -f /dev/rdsk/c4t13d0
# vgcreate /dev/vg01 /dev/dsk/c4t13d0
Check how many free physical extents are available on the physical volume
# pvdisplay /dev/dsk/c4t13d0
Note the number of Free PEs
# lvcreate -l
# newfs -F vxfs /dev/vg01/rlvol1
# mount /dev/vg01/lvol1 /
Now restore your data.
Cheers!!