Using physical volume(s) on command line --- Physical volume --- PV Name /dev/sdc1 VG Name mp3 PV Size 96.18 MiB / not usable 4.18 MiB Allocatable yes PE Size 4.00 MiB Total PE 23 Free PE 23 Allocated PE 0 PV UUID XUKAwo-eZRI-Gq12-7oUb-4w8w-25rN-t64cBITaking Snapshotslvcreate -s -L50M -n rock_snapshot /dev/mp3/rock_and_rollmount the snapshot, copy the frozen data and delete it.lvremove /dev/mp3/rock_snapshot-------------------------------------------------------------FileSystemsACLs:dumpe2fs /dev/xxx | grep Defaults will show which are the default mouting options. acl, user_xattr must be listed to have acl support in first place.tune2fs -o acl,user_xattr /dev/xxxcan be issued to set the defaults mounting options.tune2fs -o ^acl,^user_xattr /dev/xxxcan be issued to clear the defaults mounting options.These options are overwritten by /etc/fstab or options in the mount command line.BTW, if you set the defaults mount options and mount the volume you won't be able to see the acl option listed in the output of mount. This can cause some confusion but acl will be enabled anyway.----------------AuthenticationTo enable LDAP authentication runauthconfig-tuiorvi /etc/openldap/ldap.conf OR vi /etc/ldap.confURI ldap://127.0.0.1/BASE dc=lutierigabrielvim /etc/nsswitch.confadd ldap to group, shadow, passwdorsystem-config-authentication-------------------kickstartsome options:zerombrclearpart --all always use /root/anaconda-ks.cfg as a template. -------------------NFSFirewallTCP/2049UDP/111,32769TCP/32803,892 All ports but 111 and 2049 has to be specified in /etc/sysconfig/nfs yum install -y nfs-utils nfs4-acl-toolschkconfig nfs on; chkconfig nfslock on; chkconfig rpcbind onvim /etc/exports/mnt *(ro,sync)exportfs -avr -> reexport all directoriesAdjusting SELinux ( this will allow directories to be exported as RO and RW:getsebool -a | grep nfssetsebool -P nfs_export_all_ro=1 nfs_export_all_rw=1mounting a NFS share:mount localhost:/mnt /nfsVerifying the exported directories on the server side:# cat /var/lib/nfs/etab/mnt *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534)Verifying the mount NFS share on the cliente side:nfsstat -mPersistent NFS mounts:vim /etc/fstabrhel01:/opt/company_data /opt/company_data nfs4 rw,sync 0 0Client side mounting option soft -> means that if a timeout occurs the process will give up and try again later. the device will become unavailable meanwhilehard -> in the same situation as state above, the process will never give up on mounting/accessing the device. it will hang there 'til it gets mounted.intr -> usually used along the hard option. means the besides hard it can be interrupted. usually better have hard, intr than soft.-------------------------------automounthow to automount home directories:/etc/auto.master/home/guests /etc/auto.guests/etec/auto.guests* -rw,soft,intr instructor.example.com:/home/guests/&service autofs reloadls /home/guests/user1 -> will mount the user1 folder from the instructor box -----------SetUID and SetGIDsetuid allows users to execute a file with privileges of the file's ownerchmod u+s filechmod 4755 filefind / -perm -4000SetGIDchmod g+s filechmod 2755 filefind / -perm -2000Sticky bit (set on directories, only owner and root can delete contentes in the dir)chmod +t sticky/chmod 1755 sticky/find / -perm -1000-------Virtualization (only available in 64 bits OS)yum install qemu-kvm qemu-imgvirsh listvirshlist --allvirsh shutdown Xvirsh start NAMEvirt-viewer Xvirsh autostart --disable X virsh autostart Xvirt-viewer XCreate a guess VM:virt-install -name Client03 -ram 512 -disk path=/var/lib/libvirt/images/client03.img,size=8 -network network=default -cdrom /dev/cdromit's recommended to use /var/lib/libvirt/images to hold the virtual disks. to use other directory you should configure SELinux to allow it.Can also create via GUI with virt-manager.Useful commandsvirsh connect localhostvirsh start guest1-rhel6-64virsh stop guest1-rhel6-64virsh list -allvirsh consolevirsh autostart Xvirsh net-listvirsh net-start X------------------SELinuxMake sure you have setroubleshoot-server so you will get nicer SELinux messages.Check how SELinux is running:[root@zeus ~]# sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from