Wednesday, May 28, 2014

How To Create Swap Partition In Linux

12:55 PM

A Red Hat Certified System Administrator (RHCSA) is able to perform the following tasks:
  • Understand and use essential tools for handling files, directories, command-line environments, and documentation
  • Operate running systems, including booting into different run levels, identifying processes, starting and stopping virtual machines, and controlling services
  • Configure local storage using partitions and logical volumes
  • Create and configure file systems and file system attributes, such as permissions, encryption, access control lists, and network file systems
  • Deploy, configure, and maintain systems, including software installation, update, and core services
  • Manage users and groups, including use of a centralized directory for authentication
  • Manage security, including basic firewall and SELinux configuration.

 






 Create swap partition with 512 mb.

CMD:
                        root@linuxstorage:~#fdisk -cu /dev/vda
          
                      -command(for help m):n   (n - to create new partition)

                      -command(for help m):e   (e - extended partition)

                      - partition number:4

                      -firstsector= press enter

                      -last sector= by default(press enter)

                       -(logical,physical)

                        l    (l -logical)

                        first sector - by default

                       last sector = +512M

                      -t (and) type - partition number is 5

                     -hex code is 82  (for linux swap)

                     --w (save)

                     root@linuxstorage:~#init 6           (restarting system )

                     root@linuxstorage:~#mkswap /dev/vda5      (formating file structure)

                     root@linuxstorage:~#swapon /dev/vda5

                     root@linuxstorage:~#vim /etc/fstab  (enter new swap partition in fstab)

                    /dev/vda5     swap      swap  defaults   0     0

                   :wq (save the file)

                    root@linuxstorage:~# mount -a      

                    root@linuxstorage:~# swapon -s (to verify swap partition)

Written by

0 comments :

Post a Comment

 

© 2014 Linux Storages | Updated . All rights resevered. Designed by Templateism