Unit 07- Disk and File System Management

Your page rank:

Total word count: 3682
Pages: 13

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

Type the full device file name for the second partition on the hard drive with the lowest ID number?

(typed)

/dev/sda2

Type the full device file name for the first partition on the hard drive with the third lowest ID number.

(typed)

/dev/sdcl (pay attention to partitions vs drives)

Which of the following device file names represents the second local terminal on the system?

/dev/tty2 (not ttyS2)

What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?

(typed)

/dev

You have put a new hard disk in your system and created two primary partitions (sdb1 and sdb2) and one extended partition (sdb3). You have just formatted sdb1 with ext3 and sdb2 as a swap area. When you try to format sdb3 as a swap area, you are unable to. What is the problem?

You cannot format an extended partition.

You have added a second hard disk to your Linux system. Which of the following commands will allow you to partition the new drive?

fdisk /dev/sdb

You want to view partition information for your sda device. Which commands could you use to view the partitions defined on sda? (Select two.)

fdisk /dev/sda, then press p fdisk -I

You have a system with a single hard disk. You add a new hard drive to your system. Which of the following commands would you use to partition the new drive?

fdisk /dev/sdb

Which hexadecimal code represents an extended partition?

0x85

How many logical partitions can you create on an extended partition?

Unlimited

How many primary partitions can you create on a single hard disk drive?

4

You have installed a new blank hard drive on your Linux system. This is the second drive on the system so it is represented in the file system by the /dev/sdb file. You need to create GUID partitions on this drive. What command do you use to start up the GUID disk management utility to create partitions on the /dev/sdb drive?

(typed)

gdisk /dev/sdb

With fdisk, you can create a maximum of 4 partitions per disk. What is the maximum number of partitions per disk that can be created using gdisk?

128

You have just used the gdisk utility to create 8 partitions on a new hard drive. Which of the following describes the partitions you have just created?

All 8 partitions are the same. They are just partitions. There are no primary, extended, or logical partitions.

What is the name of the partition management utility that will both create GUID partitions and create file systems on those partitions?

(typed)

parted

Which partition management utility can be used to define and change various different GUID partition configurations without committing the configuration to the disk until the w command is used?

gdisk

You are preparing to use a logical volume with LVM. Which of the following commands initializes a physical volume?

pvcreate

You are preparing to use a logical volume with LVM. Which of the following commands creates a volume group named backup on the third disk in the system?

vgcreate backup /dev/sdc (not: vgcreate /dev/sdc backup)

You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, what command should you use to add it to the backup volume group?

(typed)

vgextend ("add")

You are using LVM on your Linux system to manage the existing volumes. What command do you enter to scan for logical volumes on the system?

(typed)

Ivscan

You are using LVM on your Linux system to manage hard disk partitions. What command do you enter to scan for physical volumes on the system?

(typed)

pvscan

You need to create a logical volume named video in the home volume group and give it 2 TB of disk space. Which command would you use to complete this task?

Ivcreate -L 2T -n video home (-n <name> <in volume>)

After creating logical volumes with LVM, what are the next steps you need to do?

Create file systems on the volumes and mount them.

You have added a third hard disk to your Linux system. What command would you use to initialize a physical volume on this disk for later use by the Logical Volume Manager?

(typed)

pvcreate /dev/sdc (Don’t forget the drive)

During the Linux installation process you are asked to choose the file system type for your partitions. Which is the most common Linux file system to choose?

Ext3

You are assembling a workstation. The system requirements show that this system will be used primarily to store documents of small size. What is the best Linux file system to install?

Ext4

Which of these Linux file systems support journaling? (Choose three.)

Ext3 Ext4 XFS

You have successfully partitioned the forth hard drive into 2 primary partitions. You need to format the second partition with the ext3 file system. Which command will work?

mke2fs -j /dev/sdd2 (mke2fs= Ext, -j=ext3 for journaling )

Which of the following commands will create an ext2 file system on the first primary partition of the third hard drive? (Choose two.)

mkfs -t ext2 /dev/sdc1 mke2fs /dev/sdc1 (pay attention to spelling… answers are tricky)

You created a swap area on sda3, but it is not activated. Which command should you use to activate the swap partition?

(typed)

swapon /dev/sda3

You have a Linux system with two activated swap partitions: sda3 and sdb2. Which of the following commands can you use to deactivate the sda3 swap partition?

swapoff /dev/sda3 (just sda3)

Which file system is a FAT32 file system for Linux?

(typed)

VFAT (caps)

You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you enter at the command prompt?

(typed)

mkfs -t ext4 /dev/sdb1 (pay attention to disk vs partition)

Which of the following is not true regarding mount points?

Mount points use the partitions represented by device files located in the /lib directory.

You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?

mount /dev/sdcl /mnt/newdisk (pay attention to paths)

You are preparing to mount a device local to your system. Which directory holds the device files?

/dev

Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (Choose two.)

umount /mnt/temp umount /dev/sdb2

A user is trying to access a file system mounted at /mnt/sdbl but receives an error No such file or directory. Which commands can you use to see the current mount points? (Choose two.)

df mount

A number of new file systems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?

mount -a (-a forces a reread…?)

You want to mount a number of file systems each time the system is brought up. Which configuration file should hold the configuration information for the file systems to be mounted?

/etc/fstab

Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?

Edit /etc/fstab and add the swap partition.

Which file shows the currently mounted volumes?

/etc/mtab (mount tab)

You have added several new hard disks to your system. After partitioning and formatting you have modified a configuration file to mount these new file systems automatically. You want to document the change you made. What file would you document?

/etc/fstab

You are trying to umount /dev/sdd3 but are receiving a device is busy error message. What can you do to try to unmount the file system? (Choose all that apply.)

Find and close any open files on the file system, and try to unmount again. Make sure your current working directory is not on the file system and try to unmount again.

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you enter at the command prompt?

(typed)

mount /dev/cdrom /media/cdrom

Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?

/media (not /mnt)

You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?

/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto (Device, Mount pnt, type, options) (nouser= root only)

What is the full path and filename of the file that contains the file system table for a Linux system?

(typed)

/etc/fstab

You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as root user. Which command will display the available disk space on all partitions? (Choose two.)

df df-h

You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files. Which command will show you the amount of free space?

df /sales

You are asked to help a user who is complaining that file system errors are being reported during boot up. When you reboot the user’s system you see errors on sda2. You want to check the file system on sda2 and fix the errors. What can you do?

Change to single user mode and run fsck /dev/sda2. (Have to change to Single User mode)

Which command allows you to use an alternative superblock when the primary superblock has been corrupted?

e2fsck -b 16385 /dev/sdal (enhanced fdck)

You need to convert the file system of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What command and option should you enter at the command prompt?

(typed)

tune2fs -j /dev/sdb3 (-j= journaling, not data impact)

What is the effect of the tune2fs -j /dev/sdbl command?

Converts the /dev/sdbl device to ext3. (-j= journaling)

You suspect your /dev/sda3 partition is in need of repair. Which of the following e2fsck options will repair the errors without any interaction from you?

-p (-p= no questions asked)

You have an xfs file system in your Linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands should you use? (Select two. Each answer is an independent solution.)

xfs_info xfs_growfs -n

You have an XFS file system in your Linux system represented by /dev/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must be able to read the filenames in the /reviewxfs file. Which of the following commands should you use?

xfs_metadump -o /dev/sdbl /reviewxfs (-o= shows filenames)

Which command can you enter at the command prompt to list all files and directories in the badams home directory along with a file size and a total amount of space taken up by the directory?

(typed)

du -c /home/badams (-c= lists a total amount of space used in dir)

Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which debugfs option should you use to examine the file system?

-c (-c= catastrophic mode)

You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system. Which option should you use?

-b (-b= bad)

You are setting up disk quotas for users and groups on the /home directory. What mount options do you need to include in the entry for mounting the / home directory in the /etc/fstab file?

userjquota=aquota.user and grpjquota=aquota.group (remember the j in the middle = journaling)

What is the name of the package that must be installed if you want to use disk quotas on your Linux system?

(typed)

quota

Which command should you enter at the command prompt to change the quota settings for the gshant user?

(typed)

edquota -u gshant

Which of the following commands will open the quota file for a specific user?

edquota -u (open = edit file)

Which of the following statements best describes the function of the repquota /home -vu command?

A summary of disk usage and quotas is displayed for those users who have files within /home. (not current user’s quota limits)

After creating the aquota.user and aquota.group files in the /home directory, what command do you enter to enable quotas for the /home directory?

(typed)

quotaon /home (home directory)

Which command should you enter at the command prompt to display the current user’s quota limits and disk usage?

(typed)

quota (not rep)

Which repquota option will give quota limits and disk usage for all file systems listed in /etc/mtab?

-a

You need to implement disk quotas on your Linux system. You need the quotas on the / directory. What is the full path and name of the file that must be edited to implement quotas for users and groups?

(typed)

/etc/fstab

Which command will display the disk usage and quota limits for the development group?

quota -g development

What would you enter at the command prompt to change the group ownership for the devstyle.txt file to rand in the present working directory?

(typed)

chown .rand devstyle.txt

Which of the following commands make sales the group owner of the /sales/report file? (Select two. Each answer is an independent solution.)

chown :sales /sales/report chown .sales /sales/report (chgrp, not chgroup)

You need to see who has permissions to the sales_projection_q2 file. You use Is -I sales_projection_q2 and get this information:

drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2

Who is the user shown as owner of this file? (Note: your answer is case-sensitive)

What group is shown as owner of this file? (Note: your answer is case-sensitive)

(typed 2 parts)

pclark acct

You use Is -I /home/sales/sales_projection_q2 and get this information:

drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2

Which command will change the user owner to jyoung and the group owner to sales?

chown jyoung:sales /home/sales/sales_projection_q2

You must change ownership of a script called myscript so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands would accomplish this?

chmod 750 myscript

There is a directory called projects owned by the user cmarcela and the group rd. cmarcela has left the company. You need to give ownership of the projects directory, its files, and subdirectories to the user ebates, who is a member of the mgmt group. Which command should you use to change the user ownership?

chown -R ebates projects (just the user)

Which set of permissions represent the minimal permissions required to allow a user to list the contents of a directory?

r-x

You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?

-rw-r—– 1 george acctg 26256 June 1 04:16 yearend.xls

You are called into the office of a newly hired manager. He has copied a file from his old place of work onto his new workstation, but is now receiving an error message that access is denied each time he tries to access the file. He is not the owner of the file, and not a member of the group the file is associated with.

Which of the following represents the least set of file permissions needed for him to be able to read and write to the file?

666 (read + write)

A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file and he must use chmod to set them to 644. What command should you enter in the user’s profile to set the default permission for newly created files to 644?

umask 0022 (file default is -rw-rw-rw-)

While reading about file system permissions in Linux you discover that the default permissions assigned to new files when they are created are rw-rw-rw- (666 octal) and new directories are rwxrwxrwx (777 octal). However, when you create a new file in a directory called /data the permissions assigned are rw-r-r—. Why is this?

The umask must be set to 0022 and therefore block the write permission for the group owner and everyone else.

You need to create a large number of files and would like to ensure that you, the user owner, are the only one that has read and write permissions to the files. The files will be located in a number of different directories that already contain files that you don’t want their permissions modified. How could you create these files with the correct permissions using the least amount of effort?

Type umask 0066 to change your umask. (you are going to "create them")

What is the typical default umask value?

022

You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?

chmod 4777 rider

A file named acctg needs to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this?

chmod g+s acctg (category+permission: Group+Set ID) (Not s+g)

You have an application whose owner is root but you want all users to execute the application with root user permissions. Which of the following examples shows correct usage of the SUID flag?

-rwsr–r– 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx (instead of -rwx-r–r– 3… | x -> s)

You have an application whose group is sys but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows correct usage of the SGID flag?

-rwxr-sr– 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx (not -rwxr-sr-s… Not sure why…)

Setting the SUID flag is a powerful and useful feature. It can have weaknesses associated with its use. Which of the following statements identifies a weakness?

Setting the SUID flag for an application or process owned by the root user is a potential security hole. (They don’t become root, just run as root)

Which of the following special permissions will prevent a file’s deletion by anyone except the file owner?

Sticky Bit (value of 1xxx)

You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user and you try to run the program. The program stops and displays the following error:

Error: not running as root

What should you do so that all users can run this program?

Set the SUID on the program.

You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc, however, you want to ensure that no one on the team will delete the document by accident.

Your user name is bsmith.
A long listing of the file is as follows:

-rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc

Which of the following commands would accomplish this?

chrnod 1664 project_data.doc

You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?

Is /etc/*.conf | cpio -ovd > /dev/rfd0 (has to have the >)

You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?

cpio -ivd "*.cfg" < /mnt/hdd2/configs.cpio (cpoi command "file type" < location)

You have a tape archive mounted in /dev/rmt12. You need to get a list of the file contents. Which command will list the contents?

tar -tf /dev/rmt12 (-t= lists archive content, -f= file)

You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?

tar -vcf /dev/st0 /var/oracle (tar command "Destination" "Desired Backup")

You need to backup Jane’s files in her /home/user/jane directory. Which command will create an archive in the /root directory? (Select two.)

tar -czvf /root/jane.tgz /home/user/jane tar -cvf /root/jane.tar /home/user/jane (tar "To" "From") (-z=gz, -j=bz, -J=xz)

You need to restore a file, yearend.xls, from the archive 013004.tar.gz’m the backup directory. The file needs to be restored to /home/accounting. Which command will perform the restore?

tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls (needs the -z for decompression)

Which utility allows you to make an exact copy of a file?

dd (not: tar, cpio, cp)

You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?

-j (tar -z=gz, -j=bz, -J=xz)

You need to view the files within /home/gshant/expfile.bz2 , but you want to leave the compressed file unchanged. What bzip2 option should you use?

(typed)

-k (not the entire command) (bzip -k filename= keep orig file unchanged)

Share This
Flashcard

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more

NCLEX 300-NEURO

A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price

Successful message
sending