- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Extending and reducing file systems
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-08-2007 04:59 AM
03-08-2007 04:59 AM
Could I check some extend and reduce LVm commands before I execute them? I have a hp-ux 11.0 and I need to reshape the partitions. I want to extend / /opt and /home and I want to decrease /var and /usr.
It is not mirrored. Only contains 1 17GIG disk and I will take it offline when doing all. I don't have online JFS. I have only one volume group vg00.
Are the following commands correct?
For extending root
/sbin/lvextend -L 2000 /dev/vg00/lvol3
/sbin/extendfs /dev/vg00/rlvol3
For extending /opt
/sbin/lvextend -L 744 /dev/vg00/lvol6
/sbin/extendfs /dev/vg00/rlvol6
For reducing /var
fsadm -F vxfs -n 920 /dev/vg00/lvol8
lvreduce -l 920 /dev/vg00/lvol8
Am not sure is vxfs correct here?
For reducing /home
fsadm -F vxfs -n 1196 /dev/vg00/lvol5
lvreduce -l 1196 /dev/vg00/lvol5
For reducing /usr
fsadm -F vxfs -n 920 /dev/vg00/lvol7
lvreduce -l 920 /dev/vg00/lvol8
I have checked that the amount I am reducing to is greater that what is currently the percentage being used.
Also any comments on the sizes of the file systems? I had stuck with the default sizes when I installed the OS but now I need it to be the same as another box and also will be adding 3 more file systems for Oracle but am concerned about / and /var size, are they ok? do you think?
Thanks
Noreen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:09 AM
03-08-2007 05:09 AM
Solution> I need it to be the same as another box and also will be adding 3 more file systems for Oracle
Let's stop and begin there. I hope that you are *not* going to add Oracle (or any application) filesystems to vg00. To do do will make the on-going management, upgrade and potential recovery of vg00 more difficult than it needs to be. The boot disk should be reserved for the standard operating system logical volumes *only*.
Next, you are not going to be able to extend lvol3 ("/") without first "moving" the adjacent logical volume's extents. The extents of the root filesystem need to be contiguous.
If you *really* insist (must) resize your vg00 logical volumes I urge you to take an Ignite make_tape_recovery image and re-Ignite your server. Use Ignite's advanced installation mode if you do and you will be able to (re)size the logical volumes to your taste.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:10 AM
03-08-2007 05:10 AM
Re: Extending and reducing file systems
I do not thinkg that you can reduce /var or /usr. lvreduce only reduces the physical extents not the file system. If you run those commands you could risk data loss and/or corruption.
See "man lmreduce" for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:12 AM
03-08-2007 05:12 AM
Re: Extending and reducing file systems
Your primary issue with this is not the syntax of your commands, it's the fact that you have to unmount the file system in order to run extendfs unless you have onlineJFS, in which case you use fsadm, not extendfs.
The other major problem is that / needs to be contiguous with swap and /stand, so the only way to extend either involves a lot of simultaneous shuffling of other file systems or using an Ignite backup to recover your root volume, resizing things in the process. By far the easiest is the Ignite approach.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:19 AM
03-08-2007 05:19 AM
Re: Extending and reducing file systems
make_tape_recovery -I -x inc_entire=vg00
Boot of the tape and you will get an interative install. You could change the sizes during this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:48 AM
03-08-2007 05:48 AM
Re: Extending and reducing file systems
thanks for the instant comments, brilliant.
I don't particularly want to increase / and I don't have ignite? What's ignite? Maybe I have it, does this mean to basically install the OS again and do advanced install so I can avoid the default space allocation? The data on the system is not important so am not worried about losing it (theres nothing there really anyway) but I need the config to be the "same " or as close to the other box as possible. Would it be ok to leave / at the size it is currently 140 MB?
Here is bdf from the other box. I guess this is incorrectly configured, probably cos we don't have a dedicated sys admin and they are only test boxes.
bash-2.04# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2048000 32903 1890321 2% /
/dev/vg00/lvol1 83733 34882 40477 46% /stand
/dev/vg00/lvol13 942080 514918 401429 56% /var
/dev/vg00/lvol12 942080 799956 134121 86% /usr
/dev/vg00/lvol11 921600 32166 835595 4% /tmp
/dev/vg00/lvol10 1388544 338711 989144 26% /ora03
/dev/vg00/lvol9 1441792 1438179 3454 100% /ora02
/dev/vg00/lvol8 4124672 4014563 103336 97% /ora01
/dev/vg00/lvol7 761856 329887 405251 45% /opt
/dev/vg00/lvol6 2043904 4051 1914794 0% /misc
/dev/vg00/lvol5 1224704 725759 467906 61% /home
/dev/vg00/lvol4 798720 15222 737209 2% /app
bash-2.04#
Question Mike what does this mean "lvreduce only reduces the physical extents not the file system" ? Is fsadm -F .... incorrect?
Could I get away with leaving / as is, extending /opt , reducing /var, /home and /usr and making the three new lvols mounted on /ora1 /ora2 and /ora3 on vg00 ( from sys admin point of view i know its wrong but from "can do " point of view is it possible?) Btw i didnt config the other box. Its bin like that since well before I got here. In fact just checked another box and its the same, ora 1 2 3 on same vg as root so perhaps there is a reason for it, no manager around to ask at the moment. I mean can I create another vol grp on the same disk as root. I mean if the disk fails then everything fails?
Maybe am not making sense its late in the day ...
noreen
Thanks
Noreen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:53 AM
03-08-2007 05:53 AM
Re: Extending and reducing file systems
swlist | grep -i ignite
if something is output on your screen saying Ignite, then you have it installed.
If you have a tape drive use the command I mentioned earlier. It will basically snapshot your current installation. You can then reboot, interrupt the boot process, and then boot from tape. You will be shown an installation screen in which you can make changes to the way the OS is laid out, etc. If you only make mods to the filesystem sizes, everything else should be the same. Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 05:54 AM
03-08-2007 05:54 AM
Re: Extending and reducing file systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2007 08:47 PM
03-08-2007 08:47 PM
Re: Extending and reducing file systems
I don't have ignite i just checked. I'll try download it now.
N