OVH Community, your new community space.

RPS: The setting up of SWAP


Palad1n
14-05-2008, 19:06
Hi,
Just got RPS I, followed the above, but get the following error, can you advise please :

rps0001:~# sh add_swap.sh
-----------------------------------------------------------
RPS Real Private Server
mise en place du SWAP de 512Mo

total used free shared buffers cached
Mem: 474624 35176 439448 0 5492 16156
-/+ buffers/cache: 13528 461096
Swap: 503800 0 503800


le SWAP est réalisé sur une clé USB vu par le systeme sur /dev/uba

1. VERIFICATION DU NOYAU
Pour cela vous devez être en 2.6.24.5-xxxx-std-ipv4-32.

Sur le serveur nous avons:
Linux bravo.mylittlehosting.net 2.6.24.5-xxxx-std-ipv4-32 #2 SMP Thu Apr 24 16:22:22 CEST 2008 i686 GNU/Linux
... OK

2. LA CLE USB CONNECTE ?
... OK

3. LA CL2 USB DEJA UTILISEE ?
... ERREUR: la clé USB est déjà utilisée
Filename Type Size Used Priority
/dev/uba partition 503800 0 -1
rps0001:~#

Server is Debian 4.0 Basic Build.

TheHub
28-04-2008, 01:10
Yep, fully resolved now - easy installation procedure.

Dave
27-04-2008, 14:17
My USB swap key was plugged in today, so the problem must be resolved.

TheHub
25-04-2008, 03:29
Hi Bruno,

Many thanks for the update...

Cheers,

TheHub

Bruno
25-04-2008, 02:22
Quote Originally Posted by TheHub
Are all the USB memory sticks connected now? rps1021?
No, there is a problem so it's delayed.

TheHub
25-04-2008, 01:29
la clé USB n'est pas connectée.

Are all the USB memory sticks connected now? rps1021?

Cheers,

TheHub

oles@ovh.net
24-04-2008, 13:42
Hello,

To take advantage of the SWAP feature on the USB key, please just update your RPS simply by rebooting it. Your RPS will boot as a dedicated server on the network and it will run the most recent kernel. The most recent kernel version is 2.6.24.5.

If you have this kernel, it will allow you to use the USB flash drive as a secure SWAP (very secure). Indeed, the USB flash drive will be seen by the system as /dev/uba and not /dev/sdb. It will not mix the iSCSI disk and the USB key and you will not loose the data on your hard drive iSCSI by formatting it as a SWAP. The old kernel will detect the USB key /dev/sdb but while rebooting, at the best, it will crash and at worst, it will format the iSCSI hard disk thinking that this it is a SWAP. It is therefore important, VERY IMPORTANT, to update the kernel first.

I will summarize this and repeat: if you use the USB key as the SWAP with the current version of kernel, it is possible to lose all your data on your hard iSCSI disk. With the new kernel, there is no issue. The operation is safe. The USB key is detected in /dev/uba and there is no possiblity of a confusion between the iSCSI disk, which is in /dev/SDA.

When using the new kernel, you can download and execute this script. It will automatically verify everything for you so that you can mount the SWAP safely. It is fully-safe.

# wget ftp://ftp.ovh.net/made-in-ovh/rps/add_swap.sh -O add_swap.sh
# sh add_swap.sh

We will begin adding USB keys in 1h from now and so within 1 hour, your script will execute correctly and you will be able to enjoy 512 of SWAP RAM.

# sh add_swap.sh
-------------------------------------------------- ---------
RPS Real Private Server
establishment of SWAP 512MB

total used free shared buffers cached
mem: 478048 97920 380128 0 4096 76620
-- / + Buffers / cache: 17204 460844
swap: 0 0 0


The SWAP for the USB key can be viewed for the system on /dev/uba

1. KERNEL VERIFICATION
For that you must be 2.6.24.5-xxxx-std-ipv4-32.

On the server we have:
Linux rXXXXX.ovh.net 2.6.24.5-xxxx-std-ipv4-32 # 1 SMP Wed Apr 23 17:03:49 CEST 2008 i686 GNU / Linux
.... OK

2. IS THE USB KEY CONNECTED?
.... OK

3. IS THE USB KEY ALREADY USED?
.... OK


Go ...


4. FORMAT AND INSTALLATION OF THE KEY

The USB key will be formatted in 5 seconds.....5 4 3 2 1 ... Go ...

key formatting:
setting up swapspace version 1, size = 512746 kB
no label, UUID = 78ef48d6-8f0f-4dec-86c4-0e127c0e5542
mounting the SWAP:
configure / etc / fstab


The USB key has been installed

5. VERIFICATION
filename Type Size Used Priority
/ dev / uba partition 1006584 0 -8

total used free shared buffers cached
mem: 478048 98460 379588 0 4100 76620
-- / + Buffers / cache: 17740 460308
swap: 512584 0 512584

Regards,

Octave