RHCSA Exam Questions and answers .

Q.1 Increase your swap by 512MB both swap partition must be available
     your new swap space should be mounted at booting time also .

----->
[root@localhost ~]# fdisk -cu /dev/sdb

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 4
First sector (2048-15633407, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15633407, default 15633407):
Using default value 15633407

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First sector (4096-15633407, default 4096):
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-15633407, default 15633407): +512M

Command (m for help): p

Disk /dev/sdb: 8004 MB, 8004304896 bytes
247 heads, 62 sectors/track, 1020 cylinders, total 15633408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb4            2048    15633407     7815680    5  Extended
/dev/sdb5            4096     1052671      524288   83  Linux
Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 82
Changed system type of partition 5 to 82 (Linux swap / Solaris)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@localhost ~]# partx -a /dev/sdb
BLKPG: Device or resource busy
error adding partition 4
BLKPG: Device or resource busy
error adding partition 5
[root@localhost ~]# mkswap /dev/sdb5
[root@localhost ~]# vi /etc/fstab

( In last add below line)

/dev/sdb5    swap    swap   defaults   0   0


:wq!
[root@localhost ~]#mount  -a
[root@localhost ~]#swapon -a

Q.2 create a following user's , groups , and group memberships.
  
  a) A group named sysadmins.
  b) User natasha belongs to sysadmins as a secondary group.
  c)

1 comment: