Upload
jitendra-kasotia
View
214
Download
0
Embed Size (px)
Citation preview
7/30/2019 redhat rhce swap
1/3
This is my personal notes on RHCSA/RHCE exam. Site still work in progress. For comments and suggestions email me at mctofferatgmaildotcom
RHCE/RHCSA Exam Notes
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
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
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
There was an error in
this gadget
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
About ME
. (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)
Labels
Showing posts with label swap. Show all posts
1Share More Next Blog Create Blog Sign In
E/RHCSA Exam Notes: swap http://rhel6notes.blogspot.in/search/lab
3 Thursday 02 May 2013 03
7/30/2019 redhat rhce swap
2/3
Older PostsHome
Posted by penoi at 5:57 PM No comments:
Labels: filesystem, swap
Swap: 2206 0 2206
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
[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 -
Recommend this on Google
Koenig Solutions - India
www.Koenig-India.com
#1 Choice of IT Professionals to LearnAdvanced IT Courses
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)
SummerTraining inLinux
www.linuxworldindi
RedHat BestAwarded Partner GetExplore ProjectMob:9351788883
Ready To Play?
Quikr.com/treasure
Play for Free & WinRecharge worth Rs.1Lakh Everday. PlayNow.
Followers
E/RHCSA Exam Notes: swap http://rhel6notes.blogspot.in/search/lab
3 Thursday 02 May 2013 03
7/30/2019 redhat rhce swap
3/3
Subscribe to: Posts (Atom)
Join this site
with Google FriendConnect
Members (3)
Already a member? Sign in
RHEL Sites
TechExams.net ITCertificationForums
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, LinuxResourses, Tips,Tutorial, Articlesand HowTos
Does My SPARC
Client Support WAN
Boot?
3 months ago
system admin'skodigo
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.
E/RHCSA Exam Notes: swap http://rhel6notes.blogspot.in/search/lab
3 Thursday 02 May 2013 03