1834585 Members
3366 Online
110069 Solutions
New Discussion

secondary swap

 
Don Bentz
Regular Advisor

secondary swap

If I have a disk error (or disk related - i.e., lose the controller/enclosure) where my secondary swap is located, do I bring the system up in single user, drop the secondary swap and "GO"? You can see from my question I am under the assumption that this "error" crashes the system(?)
Insecurity is our friend. It keeps you dependent.
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: secondary swap

Your best approach is to bring the system up in single user, mount /usr, /var, and possibly /tmp (so that you will have a functioning vi) and remove the secondary swap entry in /etc/fstab. You can then umount /tmp, /var, and /usr.

Boot the machine normally at this point.

By the way, if you have swap, it should be mirrored to avoid just this kind of problem. Ideally, you should be able to replace your disk and never shutdown.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: secondary swap

Hi Don:

I agree with Clay. A way to shorten the prodedure slightly is *not* to leave single user mode yet edit (remove) the 'fstab' entry with 'awk' (since a copy of 'awk' resides in '/sbin' (available in single-user mode).

First find the secondary swap space. Remember that primary swap is never decleared in /etc/fstab.

# /sbin/cat /etc/fstab

Now having found the device file on which your secondary swap lived (e.g. /dev/vg01/lvol7) do:

# /sbin/mv /etc/fstab /etc/fstab.old
# /sbin/awk '! /\dev\/vg01\/lvol7/ {print $0}' /etc/fstab.old > /etc/fstab
# /sbin/chmod 644 /etc/fstab

Regards!

...JRF...
Trond Haugen
Honored Contributor

Re: secondary swap

If your system is functioning to allow you can; edit fstab to remove the secondary swap and reboot.
I would consider this a workaround and would recommend investing in a possible HW problem with the enclosure.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Don Bentz
Regular Advisor

Re: secondary swap

Just to clarify, I have an FC10 which is where the secondary swap exists. The logical volume is mirrored to 2 spindles. I would still like to know under what circumstances the system might crash if the "enclosure" fails. There are 2 paths to the enclosure, by the way, and each disk mirror is assigned to an alternate path. Will the system crash only if a process attempts to reserve swap on the secondary and find the disk inaccessible? Will it crash regardless of whether or not the secondary swap is accessed simply because part of my swap in inaccessible?
Insecurity is our friend. It keeps you dependent.
MANOJ SRIVASTAVA
Honored Contributor

Re: secondary swap

Hi Don

Ofcourse you can comment the secondary swap and restart the system but then I was wondering that you should definaltely have some more fielsystems on the secondary disks , do they aslo give some error , in wither case my recommnedation would be to disable the secondary swap and then look for the problem recitfy it and then enable it again.

All the best.


Manoj Srivastava
Don Bentz
Regular Advisor

Re: secondary swap

Once again.... this is a hypothetical case. I AM NOT currently experiencing ANY disk error. I just want to know what happens if I have a problem with accessing the disks on a secondary swap area.
Insecurity is our friend. It keeps you dependent.
Carlos Fernandez Riera
Honored Contributor

Re: secondary swap

Well i do experience it...

Secondary swap was not mirrored...

One thing i realize was the system did not shutdown neither crashed..


Another thing i realize was i can not connect via telnet..., because the system cant reserve swap ...

It is enough...

I guess that you dont need to unreference secondary swap at boot, because system will not be able to add to swap ( it was broken.. no?, so it could not be up).

unsupported
Helen French
Honored Contributor

Re: secondary swap

Hi Don:

As you already had errors (hardware) on the disks, I would do the following:

1) Check the enclosure and disks with the help of a hardware engineer
2) Run STM tools and find out any errors
3) Check the disks with dd or fsck
4) Replace any HDD which have errors on it.
5) Reconfigure swap space if needed
6) Mirror the swap spaces if possible.

As you had errors on the secondary swap, the possibility of a crash is less. But you will not get a NORMAL system operation. If I ever get a hardware error with a disk (especially swap), I would replace it immediately !

HTH,
Shiju
Life is a promise, fulfill it!
MANOJ SRIVASTAVA
Honored Contributor

Re: secondary swap

Hi Don

I misread the IF . Now IF this happens :

1. GO is good in single user mode .
2. Drop the secondary swap and also the filesystems associated with that disk enclosure.
3.Hence all the app and database associated with those disks.


Comment the secondary swap and you are good to go.

Manoj Srivastava
Carlos Fernandez Riera
Honored Contributor

Re: secondary swap

I neither read completly your second post...


If all the lvols on the supposed failing disk are mirrored.... dont worry...

Just call for a new disk, and you will be able to replace w/o reboot.

Yes, swap will reserve space in the available disk.




unsupported