Shared Flashcard Set

Details

rhel 5 training guide ch 14
File Systems and Swap
71
Computer Science
Professional
11/11/2010

Additional Computer Science Flashcards

 


 

Cards

Term
CD and DVD file system ISO number
Definition
ISO 9660
Term
command to make a file system
Definition
mkfs
Term
make an ext3 filesystem on sdb1
Definition
mkfs -t ext3 /dev/sdb1
Term
make an ext3 filesystem on lvol1 in VolGroup01
Definition
mkfs -t ext3 /dev/VolGroup01/lvol1
Term
add a journal to the ext2 file system on sdb1
Definition
tune2fs -j /dev/sdb1
Term
mount sdb1 to /data0
Definition
mount /dev/sdb1 /data0
Term
show all the currently mounted file systems
Definition
cat /proc/mounts
Term
unmount /data0
Definition
umount /data0
Term
you tried umount /data1 but it says it is busy, what now
Definition
use fuser with the -cu option for -c processid and -u username:
fuser -cu /data1
or
lsof /data1
Term
kill all the processes that are using /data1 so you can umount it
Definition
fuser -ck /data1
Term
unmount all the filesystem exect for those that can't be unmounted
Definition
umount -a
/var, /usr, and / can't be unmounted
Term
resize the sdb1 filesystem to 1000MB currently mounted on data1
Definition
umount /data1
resize2fs /dev/sdb1 1000M
Term
how does a filesystem mount on boot
Definition
The lines in /etc/fstab mount a filesystem on boot
Term
you have added two filesystems in /etc/fstab . mount everything in /etc/fstab
Definition
mount -a
Term
ACL
Definition
Access Control List
Term
look at the ACL on file1
Definition
getfacl file1
Term
add rw options for file1 for user2
Definition
setfacl -m u:user4:rw file1
Term
see if acl is enabled on sdb1
Definition
tune2fs -l /dev/sdb1 | grep acl
Term
delete all the acl entries for file1
Definition
setfacl -b file1
Term
set the acl for file2 to have user rwx, group rw, and others r, also add rwx for user3, use octal notation
Definition
setfacl -m u::7,g::6,o:4,u:user3:7 file2
Term
set the default acl on the /home/user3/project directory giving both user1 and user2 rw
Definition
set -m d:u:user1:6,d:u:user2:6 /home/user3/project
Term
what is the point of setting the default ACL
Definition
it is set on a directory so that all the files and sub-directories automatically are created with those acl permissions
Term
confirm that Disk quota is turned on
Definition
grep CONFIG_QUOTA /boot/config-`uname -r`
Term
what is a disk quota soft limit
Definition
an upper level threshhold. If a grace period is set a user must remove files within a time period set for further use
Term
quota hard limit
Definition
an absolute maximum
Term
determine if the quota package is installed on your computer
Definition
rpm -q quota
Term
check the mount status to determine if quota is supported on /home
Definition
mount -v | grep home
Term
remount /home with quota support enabled for the user and group levels
Definition
mount -o remount,acl,usrquota,grpquota /home
Term
confirm that /home is mounted with quota support enabled
Definition
mount -v | grep home
Term
check the quotas for users and groups for /home
Definition
quotacheck -cgmuv /home
Term
you have run "quotacheck -cgmuv /home" but your get errors about old group files, why
Definition
quotacheck creates two files when it is first run, aquota.user and aquota.group. Once created you will not see the errors again.
Term
quotacheck /home for user and group quota information
Definition
quotacheck -cgmuv /home
Term
activate quota on /home
Definition
quotaon -ugv /home
Term
modify the user quota information for user user2
Definition
edquota user2
This uses vi to edit aquota.user
Term
set the quota for the user user2 set a soft limit of 300MB and a hard limit of 350MB on the file system /home
Definition
setquota -u user2 300000 350000 0 0 /home
Term
edit the group quota for the dba group
Definition
edquota -g dba
Term
set the group quota for the dba group. Set a soft limit of 2GB and a hard limit of 2.2GB on the file system /home
Definition
setquota -g dba 2000000 2200000 0 0 /home
Term
look at the grace period for the soft limit
Definition
edquota -t
Term
modify the grace period for the user user2
Definition
edquota -T user2
Term
copy the user quota settings from user2 to user4 and user5
Definition
edquota -up user2 user4 user5
Term
activate the disk quota for groups and users when the system is rebooted when needs to be changed
Definition
/etc/fstab
for users and groups it needs the following options added to the appropriate line:
acl,usrquota,grpquota
Term
view a quota report for users
Definition
repquota -a
Term
view a quota report for groups
Definition
repquota -ag
Term
check the user quota on /home
Definition
repquota -v /home
Term
view the quota report for user2
Definition
quota user2
Term
you are logged in as a user, take a look at your quota usage
Definition
quota
Term
Turn off the quota for all users and groups
Definition
quotaoff -av
Term
turn off the quota for all users and groups on the file system /home
Definition
quotaoff -ugv /home
Term
check the filesystem /data1 which is a mount of /dev/VolGroup01/lvol0
Definition
umount /data1
fsck /dev/VolGroup01/lvol0
Term
run a file system check and automatically repair any errors
Definition
fsck -p /dev/VolGroup01/lvol0
Term
The primary superblock is missing or corrupted on the /dev/sdc1 file system, fix this
Definition
dumpe2fs /dev/sdc1
find the backup superblock location (ex: 32768)
fsck -b 32768 /dev/sdc1
-repair the primary superblock
Term
see how much space is free on each file system
Definition
df
Term
see how much space is free in MB on each file system
Definition
df -m
Term
Files have been recovered and placed in the lost+found directory, how can you find the original name
Definition
cat the file, or use strings to find some legible information in the file.
Term
mound /dev/sdf as a vfat
Definition
mkdir /usb0
mount -t vfat /dev/sdf /usb0
Term
look at the free space, make it easy to read
Definition
df -h
Term
find out how much disk space /home/user2 is using
Definition
du -h /home/user2
Term
find out how much swap space is in use
Definition
free
Term
show the memory information on a system
Definition
cat /proc/meminfo
Term
create a logical volume named swapvol in VolGroup01 with a size of 2000MB
Definition
lvcreate -L 2000 -n swapvol VolGroup01
Term
create the swap structures in /dev/VolGroup01/swapvol
Definition
mkswap /dev/VolGroup01/swapvol
Term
you have a volume swapvol that has already been created with mkswap. Use it for swap space
Definition
swapon /dev/VolGroup01/swapvol
Term
confirm that the system is using your newly enable swap volume
Definition
cat /proc/swaps
or
swapon -s
Term
look at the virtual memory statistics
Definition
vmstat
Term
two types of swap
Definition
device swap and file system swap
device swap is primary and file system swap should always be defined as secondary
Term
why use file system swap
Definition
Setting up such file system swap space allows for extra swap if there is occasional need for more than the allocated device swap space. It is used only when device swap space is insufficient.
Term
reserve 200MB of contiguous swap space in /data2
Definition
dd if=/dev/zero /of=dat2/fs_swap1 bs=1024 count=204800
This creates the file "fs_swap1"
Term
You have contiguous file that you created with dd, /data2/fs_swap1, turn it into swap space
Definition
mkswap /data2/fs_swap1
Term
turn on the file system swap space /data2/fs_swap1
Definition
swapon /data2fs_swap1
Term
enable swap space at system boot
Definition
edit fstab with a line like this:
/dev/VolGroup01/swapvol swap swap defaults 0 0
Term
list some swap best practices
Definition
<=1 swap space per disk
favor faster disks over slower
two small swaps on different disks faster than one large swap
Avoid file sysstem swap
Supporting users have an ad free experience!