Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Disks and Volumes

Fsck operations

Submitted by on November 19, 2005 – 10:36 pm 4 Comments

The following is a collection of examples using fsck command. It is important to unmount VXFS before running fsck on Veritas filesystem.

to fsck a Veritas FS:

fsck -F vxfs /dev/dsk/c2t2d0s0

to do a full fsck of Veritas FS:

fsck -F vxfs -o full /dev/dsk/c2t2d0s0

to assume “yes” response to prompts”

fsck -F vxfs -y /dev/dsk/c2t2d0s0

to scan and automatically correct all local non-Veritas mounted filesystems:

df -k | fgrep "/dev/dsk" | awk '{print $6}' | while read line
do
        fsck -y "$line"
done

to scan and automatically correct all local
non-Veritas unmounted filesystems:

cat /etc/vfstab | fgrep "/dev/dsk" | awk '{print $1}' | while read line
do
        fsck -y "$line"
done
Print Friendly, PDF & Email

4 Comments »

  • apleaforbrandon says:

    Ubuntu users:
    run:
    sudo apt-get moo

    % cat “food in cans”
    cat: can’t open food in cans

    % nice man woman
    No manual entry for woman.

    % “How would you rate Quayle’s incompetence?
    Unmatched “.

    % Unmatched “.
    Unmatched “.

    % [Where is Jimmy Hoffa?
    Missing ].

    % ^How did the sex change operation go?^
    Modifier failed.

    % If I had a ( for every $ the Congress spent, what would I have?
    Too many (‘s.

    % make love
    Make: Don’t know how to make love. Stop.

    % sleep with me
    bad character

    % got a light?
    No match.

    % man: why did you get a divorce?
    man:: Too many arguments.

    % !:say, what is saccharine?
    Bad substitute.

    % %blow
    %blow: No such job.

    % (-
    (-: Command not found.

    $ PATH=pretending! /usr/ucb/which sense
    no sense in pretending!

    $ drink matter
    matter: cannot create

    I took these all from somewhere else

  • Mackenzie P says:

    I need a registry cleaning program that works well, but I have a mac computer. I found a site at http://www.registrycleanersrated.com thats good but im not sure if any of these work for macs or not. Anyone know? Thanks

  • Joe M says:

    I have an exam this week and the review contained 200 exam prep questions. I have answered and worked my A. off on the and these are the 25 out of 200 I couldn’t figure out. They may seem remediale to some of you but I am asking to please help me with these last few so I can study the correct answers thanks.

    1.Which of the following are power management protocols?
    A)ACPI
    B)PPP
    C)SMTP
    D)APM

    2. Which of the following would you want to remove from a system that would serve solely as a firewall?(Choose all that apply.)
    A)init
    B)Telnet client
    C)Linux Kernel
    D)Apache server

    3. Which tool would you use to setup a firewall on a Linux system?
    A)Apache
    B)iptables
    C)wall
    D)TCP wrappers

    4. What is the intended purpose of the rc.local or boot.local startup script?
    A)Sets system time zone and language defaults
    B)Holds startup commands for its specific computer
    C)Displays startup messages
    D)Verifies that all other startup scripts are operating correctly

    5. Which of the following protocols can help with configuration of SCSI devices?
    A)SCAM
    B)SMB
    C)ASPI
    D)ATAPI

    6. Which of the following is not a responsibility of lpd?
    A)Maintaining printer queues
    B)Accepting print jobs from remote machines
    C)Informing applications of printer’s capabilities
    D)Sending data to printers

    7. Which of the following would show the contents of a tarball, including size and time stamps?
    A)tar xzf
    B)tar tzf
    C)tar tvzf
    D)tar x

    8. Which of the following does an ethernet switch allow but a hub does not?
    A)100Mbps operation
    B)Linking more than five computers
    C)Full duplex operation
    D)Use with 10 Base 5 cabling

    9. What types of devices may be attached via the USB port?(Choose all that apply)
    A)Keyboards
    B)Modems
    C)RAM
    D)Mouse

    10. How would you direct the output of the uptime command to a file called uptimestats.txt?
    A)echo uptimestats.txt
    B)uptime > uptimestats.txt
    C)uptime | uptimestats.txt
    D)uptime < uptimestats.txt

    11. What role does BIND fill?
    A)Allows programs to use dynamic library files
    B)Translates between names and IP addresses
    C)Ties together POP and SMTP servers
    D)Binds and IP address to a network interface

    12. You think that a router between you and a server is preventing access, which command would you use to narrow down where the problem is?
    A)nslookup
    B)ping
    C)traceroute
    D)netstat

    13. Which of the following when typed in Vi's command mode, saves the file and quits the program?
    A):rq
    B):wq
    C):rp
    D):we

    14.Where may the Linux root(/) partition reside?
    A)On a primary or logical partition
    B)On a logical partition only
    C)On a primary partition only
    D)On a partition that falls below the 1,024th cylinder

    15. Where in a network may a network firewall reside?(Choose all that apply.)
    A)In the walls between important offices
    B)On an individual computer
    C)In a router between network segments
    D)In expensive network cables

    16. Which of the following commands would provide information on programs that are consuming too much CPU time?
    A)cat /proc/cpuinfo
    B)df
    C)top
    D)uptime

    17. Which of the following commands would allow you to view the last few lines of a file?
    A)lastlines
    B)bash
    C)cp
    D)tail

    18. Which tool can you use to measure a hard disks speed on a Linux machine?
    A)fdisk
    B)e2fsck
    C)speedtest
    D)hdparm

    19. Which of the following may be used to create a swap partition?(Choose all that apply)
    A)dd
    B)mknod
    C)Linux fdisk
    D)PartitionMagic

    20. Which of the following commands will install an RPM package?
    A)rpm -Uvh
    B)rpm -i
    C)rpm -U
    D)rpm -e

    21. Which of the following is true of public domain and open source software?
    A)They're the same thing
    B)Both allow free distribution of software
    C)Represent opposing philosophies
    D)They can not legally appear on the same distribution medium

    22. Under which of the following circumstances might you need to edit the /etc/fstab file?
    A)A hard disk has been added to the computer
    B)A zip disk has been added into the zip drive
    C)System performs a disk check and reports no errors
    D)/boot/grub/menu.lst boot options has been changed

    23. What tool can diagnose and correct many common Linux filesystem problems?
    A)mkfs
    B)fsck
    C)chkdsk
    D)scandisk

    24. Which programs can be used to load a module?(Choose all that apply)
    A)insmod
    B)rmmod
    C)modprobe
    D)depmod

    25. Which of the following directories must reside on its own partition.
    A)/boot
    B)/
    C)/home
    D)None, it's optional for all directories

  • Brody S says:

    I was using the “Erase Free Space” on my Late 2009 MacBook (10.6.3 Snow Leopard) with a 500 GB hard disk. I had to cancel the operation before it was done, and now I have less than a gigabyte free. How can I regain the rest of my >100 GB free space that I had before? Thanks in advance, I really don’t want to call AppleCare.

Leave a Reply

%d bloggers like this: