Вы находитесь на странице: 1из 3

RHCE/RHCSA Exam Notes: swap

http://rhel6notes.blogspot.in/search/label/swap

Share

More

Next Blog

Create Blog

Sign In

RHCE/RHCSA Exam Notes


This is my personal notes on RHCSA/RHCE exam. Site still work in progress. For comments and suggestions email me at mctofferatgmaildotcom
Linux Free Log Viewer Disk Partition Viewer

There was an error in this gadget

Showing posts with label swap. Show all posts

About ME The main purpose of this site is to dump all my notes on Redhat certification RHCSA/RHEL. If you have comments and suggestions, please do email me on mctofferatgmaildotcom

Wednesday, June 8, 2011

Creating Swap
Creating swap thru disk partition

[root@rhel02 ~]# free -m total used free shared buffers cached Mem: 997 254 743 0 2 114 -/+ buffers/cache: 137 859 Swap: 2015 0 2015

Labels . (1) /info/Quick_Notes (4) /info/RHCE_Exam_Obje ctives (2) accounts (2) apache (2) Archive and Compression (1) bind (1) filesystem (7) grub (1) iptables (3) Journal (5) kickstart (1) KVM (1) Lab station (1) luks (1) LVM (2) mail servers (1) nfs (1) ntp (1) parted (2)
Add the newly created swap
[root@rhel02 ~]# swapon /dev/sdb1 [root@rhel02 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 2064376 0 -1 /dev/sdb1 partition 195304 0 -2 [root@rhel02 ~]# free -m total used free shared buffers cached Mem: 997 262 735 0 6 115 -/+ buffers/cache: 140 856

Create the disk partition


[root@rhel02 ~]# parted /dev/sdb GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? linux-swap Start? 0 End? 200 Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? Ignore (parted) pr Model: VBOX HARDDISK (scsi) Disk /dev/sdb: 524MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 512B 200MB 200MB primary linux-swap(v1)

Initialize the disk partion


[root@rhel02 ~]# mkswap /dev/sdb1 Setting up swapspace version 1, size = 195308 KiB no label, UUID=364ca39e-dc67-4f8d-9790-e2715425d248

1 of 3

Thursday 02 May 2013 03:07 PM

RHCE/RHCSA Exam Notes: swap


Swap: 2206 0 2206

http://rhel6notes.blogspot.in/search/label/swap

ports (1) RAID (1) remote access (1) RHCSA/RHEL Books and Sites (1) rpm (2) runlevels (1) security (4) selinux (1) ssh (1) swap (1) system messages (1) YUM (2)

Creating swap thru a swapfile(example 200mb of swapfile)


[root@rhel02 ~]# dd if=/dev/zero of=/tmp_swap/swapfile bs=1024 count=204800 204800+0 records in 204800+0 records out 209715200 bytes (210 MB) copied, 29.5354 s, 7.1 MB/sd

[root@rhel02 ~]# mkswap /tmp_swap/swapfile mkswap: /tmp_swap/swapfile: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 204796 KiB no label, UUID=5d77de02-b28f-43a1-9410-fed6d05172c4d

Summer Training in Linux


www.linuxworldindi RedHat Best Awarded Partner Get Explore Project Mob:9351788883

[root@rhel02 ~]# swapon /tmp_swap/swapfile [root@rhel02 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 2064376 0 -1 /dev/sdb1 partition 195304 0 -2 /tmp_swap/swapfile file 202288 0 -3 [root@rhel02 ~]# free -m total used free shared buffers cached Mem: 997 491 505 0 11 315 -/+ buffers/cache: 164 833 Swap: 2404 0 2404

Remove swap
[root@rhel02 ~]# swapoff /tmp_swap/swapfile [root@rhel02 ~]# swapoff /dev/sdb1 [root@rhel02 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 2064376 0 -

Ready To Play?
Quikr.com/treasure Play for Free & Win Recharge worth Rs.1 Lakh Everday. Play Now.

Posted by penoi at 5:57 PM

No comments:

Recommend this on Google

Labels: filesystem, swap

Koenig Solutions - India


www.Koenig-India.com #1 Choice of IT Professionals to Learn Advanced IT Courses

Followers

Home

Older Posts

2 of 3

Thursday 02 May 2013 03:07 PM

RHCE/RHCSA Exam Notes: swap

http://rhel6notes.blogspot.in/search/label/swap
Subscribe to: Posts (Atom)

Join this site


with Google Friend Connect

Members (3)

Already a member? Sign in

RHEL Sites TechExams.net IT Certification Forums


ICND1 / ICND2 exam, or take 640-802?
52 minutes ago

RHEV Blog
Installare RPMFORGE REPO e LSHW su RHEL e CentOS
2 weeks ago

Linux Superuser
Configure YUM server to install/update packages on remote server
5 weeks ago

Best Unix, Linux Resourses, Tips, Tutorial, Articles and HowTos


Does My SPARC Client Support WAN Boot?
3 months ago

system admin's kodigo


RHCSA - Archive, compress, unpack and uncompress files using tar, star, gzip, and bzip2
1 year ago

Awesome Inc. template. Template images by Jason Morrow. Powered by Blogger.

3 of 3

Thursday 02 May 2013 03:07 PM

Вам также может понравиться