ciphermethod.com

Create Additional Swap Space

by on May.05, 2011, under Linux

Use a File for Additional Swap Space

If you don’t have additional disk, you can create a file on your filesystem, and use the file for swap space.

Using dd, create a swap file with the name “swap_file” under /root directory with a size of 4096MB (4GB).

# dd if=/dev/zero of=/root/swap_file bs=1M count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB) copied, 136.328 s, 31.5 MB/s

# ls -lh /root/swap_file
-rw-r–r– 1 root root 4.0G May 5 14:43 swap_file

Change the permission of the swap file so that only root can access it.

# chmod 600 /root/swap_file

Mark this file as a swap file using the mkswap command.

# mkswap /root/swap_file
Setting up swapspace version 1, size = 4194300 KiB no label, UUID=982c0db9-d522-4f08-a072-29168de28c64

Enable the newly created swapfile.

# swapon /root/swap_file

To make this swap file available as a swap area even after the reboot, add the following line to the /etc/fstab file.

# grep swap_file /etc/fstab
/root/swap_file swap swap defaults 0 0

Verify whether the newly created swap area is available for your use.

# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 1048572 9272 -1
/root/swap_file file 4194300 0 -2

# free
total used free shared buffers cached
Mem: 508772 492700 16072 0 39384 311016
-/+ buffers/cache: 142300 366472
Swap: 5242872 9272 5233600

Note: In the output of swapon -s command, the Type column will say “file” if the swap space is created from a swap file.

If you don’t want to reboot to verify whether the system takes all the swap space mentioned in the /etc/fstab, you can do the following, which will disable and enable all the swap partition mentioned in the /etc/fstab.

# swapoff -a
# swapon -a

To increase swap by extending a Logical Volume:

# cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/Volume00-lv_swap partition 16777208 208 -1

# swapoff /dev/Volume00/lv_swap
# lvextend -L +900M /dev/Volume00/lv_swap
# mkswap /dev/Volume00/lv_swap
# swapon /dev/Volume00/lv_swap

Leave a Comment more...

Forward Mail to SMTP Server

by on May.02, 2011, under Linux

1. Edit/create the following options in /etc/mail/sendmail.mc:
define(`SMART_HOST’, `your-smtp-server.com’)
FEATURE(authinfo)dnl

2. Edit/create /etc/mail/authinfo and add the following line:
AuthInfo:<your-smtp-server> "U:<your-smtp-user>" "P:<your-smtp-password>" "M:DIGEST-MD5"

3. Build new sendmail.cf and authinfo.db
make -C /etc/mail

4. Restart sendmail:
/etc/init.d/sendmail restart

5. Send test email message
mail user@host.com
Optional test: sendmail -bv user@host.com

Leave a Comment more...

Canonical Releases Ubuntu 11.04 “Venereal Vista”

by on Apr.28, 2011, under Linux

THAWTELESS, Star City, Monday (NNGadget) — Canonical, Inc. has announced the release of Ubuntu 11.04, “Venereal Vista,” based on the Unity Vista desktop, which only 5 out of 11 first-time users managed to crash in final testing two weeks ago.

Unity is Canonical’s response to the GNOME 3 shell, which uses 1 gigabyte of RAM and four processor cores to exquisitely render a single button in the centre of the screen in beautifully anti-aliased text; when pressed, GNOME tells the user to switch off the computer and do something useful with their life, such as showering.

“This was just not up to the user expectations of Canonical’s vision of the desktop,” said Mark Shuttleworth, from his castle high on a crag in West London. “So we added a ‘minimise’ button too.”

Design is at the centre of Shuttleworth’s roadmap for Unity. “I woke up one day and thought, ‘Gosh, I’d really like to make using my universal general-purpose computer that I can do ANYTHING with feel like I’m using a locked-down three-year-old half-smart phone through the clunky mechanism some l33t h@xx0r used to jailbreak it, I can’t think of a better user experience.’ We’re not quite there yet, but this gets Unity a lot of the way.”

Picture: Unity is made of arse [newstechnica.com].

Shuttleworth foresees an exciting future for Linux for the general Internet user. “It’ll be a whole world of Linux devices, which millions of people will use all the time, everywhere! Of course, at the moment those are called ‘phones’ and run Android.”

David Gerard

Leave a Comment more...

GDM/Gnome Auto Login

by on Apr.25, 2011, under Linux

In order to setup your Linux box to automatically login using a particular user, you will need to follow the steps below.

Edit /etc/gdm/custom.conf using terminal and add the following to the [daemon]:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=username

NOTE: Change “username” to the username you want to use to auto login to the linux box.

Leave a Comment more...

Increase AIX Volume Size

by on Apr.18, 2011, under AIX

Increase AIX Volume Size
sudo -s
lsvg -l raid5
lsvg raid5
# add 100M
chfs -a size=+100M /app/baan/baanext/Demand_Planning
df -k /app/baan/baanext/Demand_Planning

Leave a Comment more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...