Operating System - HP-UX
1833948 Members
1624 Online
110063 Solutions
New Discussion

file systems will not mount automatically after adding new swap

 
mike worrell
Regular Advisor

file systems will not mount automatically after adding new swap

I added my swap by adding a drive to a new volume group, created using SAM a lv called swap, made it swap with pri of 2 and 500 mb

System rebooted , now for some reason it will not mount my file systems automatically. If I do a more on /etc/fstab and mount by hand all is ok. What can I do to fix
Mike
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: file systems will not mount automatically after adding new swap

there is probably an error in /etc/fstab that is causing the mount at system start to fail.

The error code should be recorded in /etc/rc.log

Take a look at /etc/fstab for a character or tab that does not belong.

mount -a should result in an error after start if I'm right.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: file systems will not mount automatically after adding new swap

Hi Mike,

To expand on Steven's answer...If there's an error in /etc/fstab, all entries *following* that error are not processed.
I'd edit fstab & re-enter that specific line & try a swapon -a

Entry should look *like*:

/dev/vg_name/lv_name ... swap pri=2 0 0


Also I *always* make secondary swap priority=0 so that swap will stay away from vg00 until all the secondary is used - And hopefully swap will never be used as swap or you're in trouble & performance will go to h3ll.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Robert Holliday_1
Occasional Advisor

Re: file systems will not mount automatically after adding new swap

Hi Mike,

You could perform the following to check the swap condition:

1. Execute the swapinfo command to see what if your swap device was ever turned on.

swapinfo -mt

2. If the swap was not turned on then, verify it the device information is in the /etc/fstab file.

/dev/vgXX/swap ... pri=# 0 0
Where # is the number you assigned it.

3. Turn swap on using the swapon command

swapon /dev/vgXX/swap

or

swapon -a #This turns on all of your swap devices.

I had problems in the past setting up swap using SAM. If your problems persist remove the swap you created and re-create it on the command line. The steps are.

lvremove /dev/vgXX/swap

lvcreate -L 500 -n lvswap /dev/vgXX

vi /etc/fstab -- add the entry in for the new swap.
/dev/vgXX/lvswap ... pri=# 0 0
Where # is the number you assigned it.

swapon /dev/vgXX/lvswap
or
swapon -a #This turns on all of your swap devices.

swapinfo -mt # Your current swap device information will be displayed.

Hope this helps
Doc Holliday
Faith is hoping a crashed machine comes up when the command line says: Press any key to continue!"