- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to extend 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
03-13-2009 08:04 PM
03-13-2009 08:04 PM
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 4194304 2430177 1654093 60% /
/dev/vg00/lvol1 63765 17622 39766 31% /stand
/dev/vg00/lvol5 4096000 18589 3822610 0% /usr
i want to create separate partition for /opt and /var
what are the step need to follow.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 08:06 PM
03-13-2009 08:06 PM
Re: how to extend lv
first of all,
why you want to create additional parition for /var/ /opt?
your / still having enough space to handle data, let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 08:14 PM
03-13-2009 08:14 PM
Re: how to extend lv
my root may times full becuase of /var/ /opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 08:17 PM
03-13-2009 08:17 PM
Re: how to extend lv
For creating LV you can follow below procedure:
Create Lvol:
=============
#lvcreate -L 20480 -n lvol9 /dev/vgdatabase
#lvcreate -L 20480 -n lvol10 /dev/vgdatabase
#lvcreate -L 20480 -n lvol11 /dev/vgdatabase
#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol9
#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol10
#newfs -F vxfs -o largefiles /dev/vgdatabase/rlvol11
Edit vi /etc/fstab:
===================
/dev/vgdatabase/lvol9 /u01 vxfs delaylog 0 2
/dev/vgdatabase/lvol10 /u02 vxfs delaylog 0 2
/dev/vgdatabase/lvol11 /u03 vxfs delaylog 0 2
Rgds//
Taifur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 08:21 PM
03-13-2009 08:21 PM
Re: how to extend lv
shall i also move all old /var /opt data once i will create that.
basically i want to migrate /var /opt from my (root)
i can access this station remotly. is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 08:28 PM
03-13-2009 08:28 PM
Re: how to extend lv
have you check your vg having enough space to create new logical volume?
you can check it through
vgdisplay -v
let me know, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 09:08 PM
03-13-2009 09:08 PM
Re: how to extend lv
i have free space there,
what steps need to follow can i do it remotly,
//vanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 10:50 PM
03-13-2009 10:50 PM
Re: how to extend lv
It not that easy to create seprate
partition for /opt and /var
Reason for creating seprate partition for /opt and /var due to you / file system many time full,
Couple of options
1. You can increase your vg00 adding extra disk to vg00.
2. Once vg00 has been added extra disk vg00
3. Use Ignite resize the / File System.
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2009 11:01 PM
03-13-2009 11:01 PM
Re: how to extend lv
Example :-
does your vg00 mirrored .? If yes
reduce to your
Once done try to boot from
so finally your
try to find root cause why /var /opt increasing.?
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 03:09 AM
03-14-2009 03:09 AM
Re: how to extend lv
its not server its workstation, it doesnt have mirror and i dont want to use ignit
Ok let me elaborate more here which will give clear picture.
I am having many production hpux workstation which having /opt and /var inside (/root) I am getting frequently issue for /root full. and then I need to remove logs from /(root) or some unwanted files, since /root goes full user can not launch their application.
I donâ t want to extend /root with ignite for all stations as its time consuming process and also physical present require there. I am having option I Can re-image but that will also time consuming and require physical present.
So only left with one option i can migrate /opt /var from root which will indirectly extend my /root partition and I want to do this task remotely, hope this is clear now to all, please anybody else can help me for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 03:40 AM
03-14-2009 03:40 AM
Re: how to extend lv
---
So only left with one option i can migrate /opt /var from root which will indirectly extend my /root partition and I want to do this task remotely, hope this is clear now to all, please anybody else can help me for this.
--
The first question is, do you have enough free extends on you vg00 volumegroup?
# vgdisplay -v vg00
You might be able to execute this task remotely. Download the lsof tool from;
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.81/
Stop as many application on the workstation.
sendmail
syslog
ntp
swagentd
etc, etc
Check what is running on /var and /opt
# lsof / | grep var
kill it if it is using the /var or /opt
Create a new filesystem in your vg00 volume group.
# lvcreate -L size_mb -n lvolX /dev/vg00
# lvcreate -L size_mb -n lvolY /dev/vg00
change the X and Y.
# newfs -F vxfs /dev/vg00/rlovlX
# newfs -F vxfs /dev/vg00/rlovlY
Move the opt and var directories.
# mv /var /var1
# mkdir /var
# mount /dev/vg00/lovlX /var
Check the ownership and permissions of /var
# cd /var1
# find . | cpio -pcmudv /var
add the mountpoint and device to the /etc/fstab.
same for opt.
# shutdown -r -y now
If all is running ok, remove the /var1 and the /opt1 directories.
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 08:09 AM
03-14-2009 08:09 AM
Solutioncreate new logical volume as mentioned.
guess your new logical volume is mount as
/dev/vg00/lvol8/var1
/dev/vg00/lvol9/opt1
do tar for whole /var and /opt data (tar will support upto 2gb data only if its more then 2gb then you need to use gtar)
cd /var
tar cvf var.tar *
cd /opt
tar cvf opt.tar *
mv var.tar /var1
mv opt.tar /opt1
cd /var1
tar xvf var.tar
cd /opt1
tar xvf opt.tar
once this done you can verify /var1 and /opt1 with your actual data
if everything ok you can remove /var and /opt and rename /var1 and /opt1 to /var /opt
and upudate /etc/fstab.
this will help. let me know how it goes... best of luck, thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 05:56 PM
03-14-2009 05:56 PM
Re: how to extend lv
I tried to umount /var and /opt but its giving error divice busy, many process i cant kill by Kill -9, any other sugguestion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 06:22 PM
03-14-2009 06:22 PM
Re: how to extend lv
This is exactly the point that stops you from doing this remotely.
You can try to create the new lvols, tar the current /opt and ... untar it to the new lvol, modify fstab to use the new lvols, reboot and hope you did modify the "old" contents of /opt during this time.
Better to do an ignite backup and restore to different new lvols.
On (most) workstations you cannot work in single user mode remotely - that's the problem.
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 06:39 PM
03-14-2009 06:39 PM
Re: how to extend lv
do you aware about fuser command?
fuser -u /dev/vg00/lvolx (full path of lv)
you may use k to kill all process for that particular lv, please check #man fuser for more detail.
i am not 100% sure it will work correctly as per your requirement, but can try it.
let us know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2009 07:44 PM
03-14-2009 07:44 PM
Re: how to extend lv
i did this for /tmp it working fine, with /var /opt facing some issue and looks i need to do some more work on it.
anyway thanks all for great support here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2009 02:48 AM
03-15-2009 02:48 AM
Re: how to extend lv
the steps you have to follow then :
lvextend .options..
fsadm .options..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2009 01:51 AM
03-16-2009 01:51 AM
Re: how to extend lv
extended to 800 Mbytes, you can use the following :
lvextend -L 800 /dev/vg03/lvol4
and suppose you mounted it to directory "/extra"
The following command will extend the size of the file system to 800 Mbytes, where 819200 represents 800 MBytes converted to kilobytes.
fsadm -F vxfs -b 819200 /extra
so you don t need to unmount FS you want to extend. .