1748105 Members
4891 Online
108758 Solutions
New Discussion юеВ

SAM in single user mode

 
Phillip Popp
Regular Advisor

SAM in single user mode

I am new to UNIX ADMIN, so please bear with me. How do I boot into single user mode. Once in that mode can I use SAM? I need to shrink my /var and /opt logical volume's, and put that space back into my / logical volume. I am fairly comfortable using sam for this but not doing it by hand. If SAM will not operate in single user mode, what are the commands to unmount the logical volumes and then recreate them with a new size.

Thanks, for all your help in advance. This site is great!!


Phil
14 REPLIES 14
Yang Qin_1
Honored Contributor

Re: SAM in single user mode

To shrink you /var and /opt you do not need sam. However, keep it in mind that to shrinl your filesystem you may loos the data

boot to single user mode:
Logon to the console to reboot your server as root.

cd /
/sbin/shutdown -ry 0

interrupt autoboot by press any key. type

bo pri

reply Y for ISL. Under ISL prompt type

hpux -is

at promt "#" type

mount /usr

then you can run lvreduce, lvextend ...

read mapage for lvreduce, lvextend before you start

man lvreduce


Yang
Victor BERRIDGE
Honored Contributor

Re: SAM in single user mode

Hi Phillip,
Im afraid you will not be able to use SAM for what you wish to do, for SAM uses /var...

Now do a:
swlist -l product|grep OnlineJFS

And tell us if you have the product, because if you do, there is no need to go single user...

All the best
Victor
Pete Randall
Outstanding Contributor

Re: SAM in single user mode

Phil,

To boot into single user mode, interrupt the boot process at the "10 second" prompt, then enter "hpux -is" at the ISL prompt. That will bring you up in single user, with nothing but the minimal file systems mounted (/, and /stand). At that point I generall do a mount -a, so that everything appears normal. You can then go into SAM. I assume you will be at a character base console at this point, thus you will be using the TUI based version of SAM. Navigation is a little awkward - you have to tab around to where you want to be and press enter to select - experiment with it and you'll figure it out. Other than that, it should behave normally.

Now, the difficulty you're going to have is in extending your / logical volume. Because /stand, swap, and / have to be contiguous, you can't just extend lvol3 unless there happens to be free space immediately following it, which it is unlikely that you can guarantee.

I would suggest using Ignite ( http://www.docs.hp.com/en/IUX/ ) to do a make_tape_recovery, then using that tape to reboot your system, interact with the restore process and re-allocate your vg00 lvols in the process.


Pete

Pete
Victor BERRIDGE
Honored Contributor

Re: SAM in single user mode

Pete's post made me reread the message again, and I would go further, why would someone wish to extend / ?
What grows is /var /opt and /usr...
correctly sized it shoulnt grow unless someone installs badly some soft, makes a bad manip (big files in /dev ...) or because of great core files being generated in /.

What size is our / and on what kind of box?
(HPUX version?)

All the best
Victor
Phillip Popp
Regular Advisor

Re: SAM in single user mode

Let me try to explain further. I do not have OnlineJFS (my luck). / /var /usr /tmp /stand /opt all have there own logical volumes. All of these logical volumes are part of volume group 00. My /var and /opt are like a gig apiece. I would like to add half of that space back into the volume group and use it for /. The machine functions like a server and I need a lot of space under / because so many scripts look for things under /. If I try to move stuff out of / it would surly break the system. Also i am using HP 10.2. Hope this better explains my situation.

Thanks,

Phil
Torsten.
Acclaimed Contributor

Re: SAM in single user mode

Hi,

why do you want to grow the root?
Normally this is not needed.

Don't create directories directly in / , use other LVOLs for this!
Check your device directories for wrong files created by accident (e.g. a backup written to Om [letter "o"] instead of 0m)

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!   
Victor BERRIDGE
Honored Contributor

Re: SAM in single user mode

I dond understand you:

Here is an example of hpux10.20:
imos:/home/vbe $ bdf|grep vg00
/dev/vg00/lvol3 258048 36971 207324 15% /
/dev/vg00/lvol1 151509 45448 90910 33% /stand
/dev/vg00/lvol8 983040 546872 409026 57% /var
/dev/vg00/lvol7 778240 491834 268530 65% /usr
/dev/vg00/lvol4 512000 59759 424231 12% /tmp
/dev/vg00/lvol11 819200 555742 247006 69% /sm
/dev/vg00/lvol6 942080 685393 240683 74% /opt
/dev/vg00/lvol5 204800 96759 101386 49% /home
imos:/home/vbe $ model
9000/800/K580
imos:/home/vbe $ uname -r
B.10.20
imos:/home/vbe $

Look at the size of / and its free space...
Pete Randall
Outstanding Contributor

Re: SAM in single user mode

Phil,

And who wrote all these scripts that "look for things under /"? Whoever it is should be found and made to fix every last one of them to put things in a more appropriate space.

If you can't fix all these scripts, then I will have to repeat my suggestion that your only hope is to use Ignite to create a bootable recovery volume that will, during said recovery, allow you the opportunity to re-size all your logical volumes. That, because of the contiguity requirements for /stand, swap and /, is the only way that you are going to be able to fix this mess.


Pete

Pete
Victor BERRIDGE
Honored Contributor

Re: SAM in single user mode

And to follow Pete's last post: the 3 file systems that require contiguous space has to hold together in the 2GB limit (HPUX 10.20...)


All the best
Victor