- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: insert new space into logical volumes from new...
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
05-29-2003 06:46 AM
05-29-2003 06:46 AM
yesterday on hp-ux 11 it was inserted a new disk (4,3 GB). now i need to add into my volume groups this new disk.
my situation is:
2 volume group (vg00 and vg01)
lvol2 (/util), lvol5 (/opt), lvappli (/appli), lvol3 (/).
how can i do?
thanks for your support
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:51 AM
05-29-2003 06:51 AM
Re: insert new space into logical volumes from new disk
vgextend /dev/vgXX /dev/dsk/cXtXdX
etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:52 AM
05-29-2003 06:52 AM
Re: insert new space into logical volumes from new disk
pvcreate
vgextend VG01
At this point it really depends on if you have online JFS installed or not, if so
lvextend your lvols in VG01
fsadm -b
if not,
you'll have to unmount the filesystems, then run extendfs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:57 AM
05-29-2003 06:57 AM
SolutionFind out the disk by using the commands
ioscan -f
insf
ioscan -fnC disk > /tmp/disk.out
Look at /tmp/disk.out and find out the device file corresponding to the path. (cxtydz).
Create PV structures on it.
pvcreate /dev/rdsk/cxtydz
Add the disk to the desired vg
vgextend vg01 /dev/dsk/cxtydz
If cxtydz has an alternate path as displayed ioscan -fnC, add it too using vgextend
Now you have 4GB available in vg01. You can use it either to extend an existing volume or create a new logical volume.
Extend an existing LV.
umount /appli
lvextend -L new_size_in_MB /dev/vg01/lvappli
extendfs /dev/vg01/rlvappli
mount /appli
Create new LV
lvcreate -n newlv -L desired_size_in_MB vg01
newfs -F vxfs /dev/vg01/rnewlv
mkdir /newdir
mount /dev/vg01/newlv /newdir
update /etc/fstab to include the new lv.
However, if you didn't have a disk equal to or more than 4GB in your volume group, you can't get 4GB out of the new disk.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 06:59 AM
05-29-2003 06:59 AM
Re: insert new space into logical volumes from new disk
Let's assume that you new disk is c1t5d0.
1) pvcreate -f /dev/rdsk/c1t5d0
2) vgextend /dev/vg01 /dev/dsk/c1t5d0
3) lvextend -L 1000 /dev/vg01/lvol2
(Increase lvol2 to 1000MB)
4) umount /util
5) extendfs -F vxfs /dev/vg01/rlvol2
6) mount /util.
If you have onlineJFS, you would use fsadm and extend the filesystem without unmounting.
Man pvcreate, vgextend, lvextend, extendfs, fsadm for details.
Because, you seem a bit unsure, I would suggest that you do this with SAM->Disks and Filesystems. It will guide you through the entire process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:01 AM
05-29-2003 07:01 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:03 AM
05-29-2003 07:03 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:04 AM
05-29-2003 07:04 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:04 AM
05-29-2003 07:04 AM
Re: insert new space into logical volumes from new disk
No you can NOT share the disk between two volume groups.
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:07 AM
05-29-2003 07:07 AM
Re: insert new space into logical volumes from new disk
One possible solution is to move some of the filesystems in vg00 to vg01. Only /stand, primary swap, and / MUST be on the boot disk. You could for example move /var to vg01 although this is considered a "non-standard" configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:11 AM
05-29-2003 07:11 AM
Re: insert new space into logical volumes from new disk
Why do want to extend / filesystem how small is it right now ?
I use 120 Mb for /
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:11 AM
05-29-2003 07:11 AM
Re: insert new space into logical volumes from new disk
A very worthwhile read to aquaint yourself with basic LVM and filesystem management concepts and techniques can be found in chapter-6 of "Managing Systems and Workgroups":
http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:13 AM
05-29-2003 07:13 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:18 AM
05-29-2003 07:18 AM
Re: insert new space into logical volumes from new disk
the logical volume that i must extend are:
/
/home
/usr
/var
/stand
the question is: i don't think that i can umount these mount points. true? what can i do to do this? i must reboot a machine and put it on single mode? or something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:25 AM
05-29-2003 07:25 AM
Re: insert new space into logical volumes from new disk
You are not going to be able (easily, if at all) to extend '/stand' or '/'. As for the others you will need to boot up into single-user mode if you don't have Online JFS licensed.
If you truly want to enlarge all of these, I suggest/urge you to download a current version of Ignite; create a 'make_tape_recovery' tape; boot from it; choose "advanced installation" and resize your vg00 logical volumes during the reinstallation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:28 AM
05-29-2003 07:28 AM
Re: insert new space into logical volumes from new disk
You can extend /home, /usr, /var while you are in single user mode. Use /sbin/lv* commands for this purpose.
If it is really required to extend / and /stand, I suggest you go through "make_tape_recovery" process. There are work arounds to increase /stand and /. Since you are novice to LVM, I would suggest you first create "make_tape_recovery" tape. Re-install the OS using this tape. During the installation, it will allow you to resize the sizes.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 07:52 AM
05-29-2003 07:52 AM
Re: insert new space into logical volumes from new disk
i wanna show u what is the situation on my machine:
itdevux:root: /# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 307200 269485 35388 88% /
/dev/vg00/lvol1 99669 24120 65582 27% /stand
/dev/vg00/lvol8 1048576 785300 246965 76% /var
/dev/vg01/lvvardeo 258048 39343 205070 16% /var/deotrans
/dev/vg01/lvvarap 1536000 1125291 385247 74% /var/appli
/dev/vg02/lvol2 409600 253896 146586 63% /util
/dev/vg00/lvol7 819200 645481 162877 80% /usr
/dev/vg00/lvol6 536576 8317 496431 2% /tmp
/dev/vg00/lvol5 913408 643356 253228 72% /opt
/dev/vg00/lvol4 204800 129364 71045 65% /home
/dev/vg01/lvbases 180224 149962 29448 84% /bases
/dev/vg01/lvtpc 2093056 43057 1921967 2% /bases/travail/PC
/dev/vg01/lvtrhr 2097152 221303 1758647 11% /bases/travail/HR
/dev/vg01/lvcpc 46080000 39793737 5893478 87% /bases/donnees
/dev/vg01/lvbkcpc 10240000 5301203 4631975 53% /bases/backup
/dev/vg01/lvappli 4571136 3035926 1439535 68% /appli
itlabtux:/nfs/pool 4096000 1780368 2172688 45% /hpf20
itdevux:root: /# ioscan -fnkCdisk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 17 8/4.2.0 sdisk CLAIMED DEVICE SEAGATE ST318436LC
/dev/dsk/c0t2d0 /dev/rdsk/c0t2d0
disk 22 8/4.3.0 sdisk CLAIMED DEVICE SEAGATE ST318436LC
/dev/dsk/c0t3d0 /dev/rdsk/c0t3d0
disk 24 8/4.4.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c0t4d0 /dev/rdsk/c0t4d0
disk 23 8/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST34573WC
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 8 8/16/5.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 6x/32x
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 18 10/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST34573WC
/dev/dsk/c3t6d0 /dev/rdsk/c3t6d0
disk 19 10/12.8.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c3t8d0 /dev/rdsk/c3t8d0
disk 20 10/12.14.0 sdisk CLAIMED DEVICE SEAGATE ST318436LC
/dev/dsk/c3t14d0 /dev/rdsk/c3t14d0
disk 21 10/12.15.0 sdisk CLAIMED DEVICE SEAGATE ST318436LC
/dev/dsk/c3t15d0 /dev/rdsk/c3t15d0
the disk just added is /dev/dsk/c3t6d0.
strange for me is vg02. i don't understand why in the past they have created a volume group only for this logical volume. but it's not important this.
so what should i do is this:
1) remove the effect of the previous command (vgextend vg00 /dev/dsk/c3t6d0 and pvcreate /dev/rdsk/c3t6d0)
2) move vg02 (data and space) into vg01
3) add a disk into vg01
4) remove vg02
5) go at home cause i'm tired.
i know that is a big job but someone help me? thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:00 AM
05-29-2003 08:00 AM
Re: insert new space into logical volumes from new disk
It is not possible to directly move the data from vg02 to vg01. You will need to do this.
#pvcreate /dev/rdsk/c3t6d0
#vgextend /dev/vg01 /dev/dsk/c3t6d0
#lvcreate -n util -L 400 /dev/vg01
#newfs -F vxfs /dev/vg01/rutil
#mkdir /tempdir
#mount /dev/vg01/util /tempdir
#Cp -Rp /util/* /tempdir
#umount /util
#umount /tempdir
#mount /dev/vg01/util /util
(adjust /etc/fstab to change /util mount point)
#vgdisplay -v vg02 > /tmp/vg02.out
#lvremove /dev/vg02/lvol2
#vgchange -a n vg02
#vgexport vg02
Get the disk corresponding to vg02 from /tmp/vg02.out say c3t5d0. Add it to vg01.
#pvcreate -f /dev/rdsk/c3t5d0
You can use it either to extend vg01 or vg00.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:14 AM
05-29-2003 08:14 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:16 AM
05-29-2003 08:16 AM
Re: insert new space into logical volumes from new disk
#vgreduce vg00 /dev/dsk/c3t6d0
#vgextend vg01 /dev/dsk/c3t6d0
If you have logical volumes, then you will need to remove them.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:17 AM
05-29-2003 08:17 AM
Re: insert new space into logical volumes from new disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 08:55 AM
05-29-2003 08:55 AM
Re: insert new space into logical volumes from new disk
A friendly word of advice, if you please: You really should spend a few hours reading the document I suggested and carefully decide what you really want to achieve. You have already indicated your desire to "go home". Rushing LVM/filesystem maintenance when you are a tired novice will only lead to problems.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 11:56 AM
05-29-2003 11:56 AM
Re: insert new space into logical volumes from new disk
I hope you took James advice and you read this in the morning.
One other advice, tell your boss you need a HPUX training. The why is simple you need to practice the commands. The only good way is to take a training, away from your job.
Enough is enough you had a hard day yesterday.
_________
the disk just added is /dev/dsk/c3t6d0.
strange for me is vg02. i don't understand why in the past they have created a volume group only for this logical volume. but it's not important this.
so what should i do is this:
1) remove the effect of the previous command (vgextend vg00 /dev/dsk/c3t6d0 and pvcreate /dev/rdsk/c3t6d0)
2) move vg02 (data and space) into vg01
3) add a disk into vg01
4) remove vg02
_______
Before we start, be shore you have a good backup and a recent ingite tape
Note the output from
#lvdisplay -v /dev/vg00/lvol4 | lp
#lvdisplay -v /dev/vg00/lvol8 | lp
Check if these are hfs or vxfs
# vgdisplay -v /dev/vg02 | lp
Note the device file of the disk
1)
remove the effect of vgextend vg00
# vgreduce vg00 /dev/dsk/c3t6d0
2) add disk to vg01
# vgextend /dev/vg01 /dev/dsk/c3t6d0
You now have enough space in vg01 to move /util
3) move vg02 into vg01
# mkdir /bases/backup/vg02_temp
# cd /
# find /util | cpio -pcmudv /bases/backup/vg02_temp
you now have a copy of /util online.
# umount /util
# vi /etc/fstab
and comment out #/util
/bases/backup/vg02_temp
# vgchange -a n vg02
# vgremove vg02
# lvcreate -L 440 -n util /dev/vg01
# newfs -F vxfs /dev/vg01/rutil
# mount /dev/vg01/util /util
# vi /etc/fstab
and uncomment /util + change vg02 into vg01
# cd /bases/backup/vg02_temp
# find . | cpio -pcmudv /util# cd ..
# rm -r vg02_temp
After these actions you have a free disk witch used to belong to vg02. If you wish you can add this one to vg00 and extend some file systems.
Some suggestions
/
/stand
These two file sytems are the most difficult. Use an Ignite tape to extend / and /stand.
But I think your file systems are big enough
/ 300 MB
/stand /100 MB
You have to take a close look at those two.
# find / -f file -xdev -size +1000 -exec ls -l {} \;
Check if you get any files that should not be in /
The same for /stand, there are probably old files vmunix.prev which you can remove. CHECH these carefully before removing them.
Adding the free disk to vg00
#vgextend /dev/vg00 /dev/dsk/c?t?d?
/var
/home
These are a bit easier. boot into single user mode. var is a bit more difficult because you need to be in single user mode.
On the console
# shutdown -r -y 0
interrupt boot
bo pri
interact with IPL
ISL>hpux -is
var
# /sbin/lvextend -L
# /sbin/extendfs -F
home
# /sbin/lvextend -L
# /sbin/extendfs -F
# /sbin/mount -a
# bdf
# shutdown -r -y 0
If you still like to extend / and /stand add a new message to this forum.
Kind regards,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 03:35 AM
05-30-2003 03:35 AM
Re: insert new space into logical volumes from new disk
i will study. i promise