- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to Extend Additional Space to a Directory
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
06-04-2014 05:26 AM - last edited on 06-08-2014 07:54 PM by Lisa198503
06-04-2014 05:26 AM - last edited on 06-08-2014 07:54 PM by Lisa198503
How to Extend Additional Space to a Directory
Although I have over 30GB of storage on my K370, I have one directory that reports it does not have enough space when installing patches.
What is the process/procedure to allocate more disk space to a directory?
Also, the install process wrote an error log file to /var/adm/sw called swagent.log. How do I read that file (write it to the terminal screen)?
Thanks!
Glenn
P.S. This thread has been moved from HP 9000 to HP-UX > LVM and VxVM. -HP Forum Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2014 06:59 AM
06-04-2014 06:59 AM
Re: How to Extend Additional Space to a Directory
>>What is the process/procedure to allocate more disk space to a directory?
I suspect that you do not have Online JFS installed on this system, so in order to add space to a file system, it must be unmounted.
In my example, I will assume you want to add space to /usr which is /dev/vg00/lvol7. Let's say that /usr currently has 2 GB of space and we want to go to 4 GB.
First, we need to extend the logical volume. The '-L' argument to lvextend is in MB and is the TOTOAL size you want the LV to be.
# lvextend -L 4096 /dev/vg00/lvol7
If you had Online JFS installed, you could use 'fsadm' at this point to extend the filesystem. You can try it now and see if it works. 'fsadm' needs the mount point as the argument, rather than the LV.
# fsadm -b 4096m /usr
If this fails, then that means that the LV will have to be unmounted. However, most file systems in VG00 are very busy and it is difficult to unmount them.
The easiest way is to reboot the system and come up in single user mode.
Once you are in single user mode you can then extend the file system via 'extendfs'. Note that the 'extendfs' command uses the 'rlvol'.
# /sbin/extendfs -F vxfs /dev/vg00/rlvol7
Now you can mount all in VG00 to verify that it has additional space.
# mount -a
# bdf
Now, all of this is predicated on VG00 having disk space available to add to a logical volume.
>>...the install process wrote an error log file to /var/adm/sw called swagent.log. How do I read that file (write it to the terminal screen)
You can look at the file with either 'more' or 'vi' or 'cat' or 'tail' or any normal tools.
# more /var/adm/sw/swagent.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2014 07:11 AM
06-04-2014 07:11 AM
Re: How to Extend Additional Space to a Directory
Patrick...
Thanks so much for the great detailed information! I will work with it later in the day and update this post with how it goes.
Thanks again!
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2014 10:53 AM
06-04-2014 10:53 AM
Re: How to Extend Additional Space to a Directory
I have tried doing a number of the things you suggested, but am still confused and am not getting anywhere.
Online JFS is not installed as best I can tell. I cannot find it on any of the four application CDs. Do you know where/how it is distributed so I can check my other CDs to see if I have it? Does it go by any other name in the list of applications on the application CDs?
I always boot into single user mode at root level as this system is set up as a single user system (no networking and no other users, with no plans to change that). Can I umount/mount vg00 while the system is running?
I want to add space to /opt and to /var as the software install procedure reports not enough space in these two directories. (I have two /var directories. Why is this and how do I differentiate between them? I do not know which one the install is trying to use. I would think I need to know which one in order to extend the right one.) Can you give me the command line to add space to these directories?
Also, how do I find which rlvol number to use in the command line? Are /opt and /var located by default on any one particular rlvol?
The command fsadm -b 4096m /usr returns the following:
fsadm: illegal option -- b
What does that mean? The documentation book says that fsadm is only available with the Advanced VxFS package. How do I know if I have that installed? Is this the same thing as Online JFS? Neither of these names show up when using the swlist command.
Thanks!
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2014 06:13 AM
06-05-2014 06:13 AM
Re: How to Extend Additional Space to a Directory
Basically this means that you do not have Online JFS / Advanced JFS installed. Basically you need to use the 2nd method I described where you unmount the logical volumes that you are extending.
To determine what the LV names are, just look at the output from 'bdf'. For example:
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 213064 829056 20% /
/dev/vg00/lvol1 505392 47800 407048 11% /stand
/dev/vg00/lvol8 6160384 4721192 1436400 77% /var
/dev/vg00/lvol7 4194304 2172024 2006528 52% /usr
/dev/vg00/lvol6 1048576 409792 636688 39% /tmp
/dev/vgbig/lvol1 870187008 829104096 40777992 95% /support
/dev/vg00/lvol5 6160384 3248168 2889512 53% /opt
/dev/vg00/lvol4 131072 3216 126912 2% /home
If I wanted to add space to /opt I would use /dev/vg00/lvol5 and /dev/vg00/rlvol5 where necessary.
If I want to add space to /var then I would use /dev/vg00/lvol5 and /dev/vg00/rlvol5 where necessary.
As far as unmounting goes, since you are already in single-user mode you may just be able to unmount the LVs.
# umount /opt
# umount /var
Once you have done that you can attempt to extend the LV with 'lvextend' and then extend the file system with 'extendfs'.
Once done, just remount them.
# mount /opt
# mount /var
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2014 09:22 AM
06-05-2014 09:22 AM
Re: How to Extend Additional Space to a Directory
Thanks!
I cannot umount /var and /opt. The systems says both are in use. Is there any way to take them out of use in order to umount them for resizing?
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2014 11:14 AM
06-05-2014 11:14 AM
Re: How to Extend Additional Space to a Directory
If you do an:
# fuser -cu /opt
and
# fuser -cu /var
It will return all of the processes that are using something on each file system. If you kill all processes that are listed then you should be able to unmount them.
However, the easiest way is to reboot the system and come up in single-user mode. When the system initially gets to single-user mode there is nothing mounted except the / directory.
At that point you can use '/sbin/lvextend' and '/sbin/extendfs' to extend the LV and the file system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2014 11:38 AM
06-05-2014 11:38 AM
Re: How to Extend Additional Space to a Directory
Patrick...
I got it to work. Thanks!
Glenn