1844460 Members
3499 Online
110233 Solutions
New Discussion

lvm

 
SOLVED
Go to solution
sjana
Occasional Advisor

lvm

hello all,

1.My /usr is full. how to expand the file system?

steps pls.

2.if any docs available for secuirty checklist for an production env.?

thanks in advance

tar
siva
8 REPLIES 8
bhavin asokan
Honored Contributor
Solution

Re: lvm

hi,

first check you are having enough free extents.
#vgdisplay vg00

reboot in single user mode
interrupt the boot process.go to ISL.then give the command hpux -is

/sbin/lvextend -L /dev/vg00/lvolxx

/sbin/extendfs -F vxfs /dev/vg00/rlvolxx


reboot the system

regds,
bhavin asokan
Honored Contributor

Re: lvm

hi,

it is better first you findout why /usr is full.
give the following command to findout files in /usr which is more than 1MB

find /usr -size +1000000c -exec ll {} \;

for files more than 10MB use 7 zeros after 1.

regds,
Ravi_8
Honored Contributor

Re: lvm

Hi

check whether you have space in the VG in which /usr is (usually under vg00), if the space exist.

check if you Online JFS installed
#swlist |grep -i jfs

If online JFS exist, use fsadmin to increase the space,

if you don't have OnLine JFS

boot the machine to single user mode (pressing any key within 10sec while rebooting)
get into ISL mode
ISL> hpux -iS
will take you to single user mode
#mountall
#umount /usr
#lvextend -L /dev/vg00/lvol7
#extendfs -F vxfs /dev/vg00/rlvol7
#mount /dev/vg00/lvol7 /usr
#init 3

now /usr will be increased to new size that you specified
never give up
Ranjith_5
Honored Contributor

Re: lvm

Below is the script to find out the recent large files. I use this script to easily find recent large files. This is an interactive script. So that you can easily customize your search. If you are able to find some large files which is no longer required delete it. Then you may not have to extend the file system. I am not repeating the steps since already posted.

Attached the tested and working script also.

###############################################################

# find recenty created large files

rm -f find.out

echo
echo "Enter directory to search"
read DIRNAME

if [ ! -d $DIRNAME ]
then
echo "Error: directory $DIRNAME does not exist"
exit 1
fi

echo
echo "How large a file do you want to look for ? (in Kbytes)"
read SIZE

echo
echo "How many days since the file was created ?"
read DAYS

echo
echo "Searching..."

find $DIRNAME -type f -size +$SIZE -mtime -$DAYS -exec ls -ls {} \; | sort -n -r | tee find.out

echo
echo "Done"
echo
echo "Note: output in find.out"
echo
##############################################################

Hope this helps.

regards,
Syam
Hoang Chi Cong_1
Honored Contributor

Re: lvm

Hi guru

I think the most safe way is boot to single mode.There will be lot of processes which has started from /usr. You need to boot into single user mode or lvm maintenance mode.

and then

umount /usr (it will not be mounted though)
lvextend -L newsize /dev/vg00/lvol5
extendfs -F vxfs /dev/vg00/rlvol5
mount /usr

Goodluck to you
HoangChiCong
Looking for a special chance.......
Hoang Chi Cong_1
Honored Contributor

Re: lvm

Of course, you can do it withow rebooting your server if you have Online JFS,
But depend on the application is running on your system and how many proccess is running on /usr filesystem, you have to kill all of them (that means there is no proccess access to /usr filesystem). Not sure that will you successful because some time, it success but sometime if failure.

As all of the member and exper in our forum, recommend : DO IT IN SINGLE USER MODE....

Best and regard,
HoangChiCong
Looking for a special chance.......
Florian Heigl (new acc)
Honored Contributor

Re: lvm

2.
There's a few things:
- Read the HP-UX Bastion Host howto, of course You can't apply all of it on a real production system, but everything that can be used will be helpful.
- Download and (carefully) run HP-UX Bastille to check permissions and such.
It generates a report You should work through with another person to cross-check it. afterwards apply the changes You think to be reasonable.
- there's also a script for crontab that does a security patch assessment, run that every week or so.
yesterday I stood at the edge. Today I'm one step ahead.
Devender Khatana
Honored Contributor

Re: lvm

Hi,

Booting to Single User Mode & lvextend will work only if you have some free space in your root volume group or spare disk to be added to Root volume Group.

What if it is not there ?

Space assigned in some other File System of Root Volume Group is more & it can be reduced to compensate the increase in /usr file system.

For achiving this you need to take ignite backup of server and restore it.

This can be accomlished by : -
#make_tape_recovery -Ava /dev/rmt/xmn

Where /dev/rmt/xmn is your tape/DLT drive device file.

It will take backup of all files of vg00 Volume group & configuration.

While restoring you can resize all of your file systems including root. The best way is to restore on some spare disk if available & keep original disk intact before system comes back normal.

HTH,
Devender
Impossible itself mentions "I m possible"