Linux System Administration
Here are some sample entries from /etc/fstab from a Linux system:
# device mount type options dump fsck /dev/hda2 / ext2 defaults 1 1 /dev/hdb1 /aux msdos noauto 1 2 /dev/hda1 none swap sw 0 0 /dev/sda1 /chem ext2 defaults 1 1
The general format for an entry is:
special-file loc type opts dump-freq pass-number
The fields have the following meanings:
special-file: The name of the special file on which the filesystem resides. This must be a block device name.
loc: The directory at which to mount the filesystem. If the partition will be used for swapping, use none for this field.
type: The kind of partition the entry refers to. The value for local filesystems under Linux is ext2. Other common type values are nfs for volumes mounted remotely via NFS, and swap for swap partitions and ignore, which tells mount to ignore the entry.
opts: This field consists of one or more options, separated by commas. The type field, above, determines which options are allowed for any given kind of filesystem. For ignore type entries, this field is ignored. For local filesystems, the options field may include the following keywords, separated by commas:
The SUID access mode is permitted (default)
The SUID access mode is not permitted
Don't automatically mount this filesystem
User quotas may be placed in effect
Group quotas may be placed in effect
Multiple options are separated by commas, without intervening spaces. On many systems, the keyword defaults may be placed into this field if no options are needed.
If the filesystem type is nfs, many more options are supported (see Chapter 13).
dump-freq: A decimal number indicating the frequency with which this filesystem should be backed up by the dump utility. The dump utility is in alpha testing and is not available on most Linux systems, so unless you use dump, you can ignore this field.
pass-number: A decimal number indicating the order in which fsck should check the filesystems. A pass-number of 1 indicates that the filesystem should be checked first, 2 indicates that the filesystem should be checked second, and so on. The root filesystem must have a pass-number of 1. All other filesystems should have the same or higher pass numbers. For optimal performance, two filesystems that are on the same disk drive should have different pass numbers; however, filesystems on different drives may have the same pass number, letting fsck check the two filesystems in parallel. fsck will usually be fastest if all filesystems checked on the same pass have roughly the same size. This field should be 0 for swap devices (0 disables checking by fsck).
The tune2fs command may be used to list and alter fields within the superblock of an ext2 filesystem. Here is an example of its display-mode output:
# tune2fs -l /dev/hdb1 Filesystem magic number: 0xEF53 Filesystem state: clean Errors behavior: Continue Inode count: 13104 Block count: 52208 Reserved block count: 2610 Free blocks: 50528 Free inodes: 13093 First block: 1 Block size: 1024 Fragment size: 1024 Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 1872 Last mount time: Wed Dec 31 19:00:00 1969 Last write time: Thu Mar 2 04:19:16 1995 Mount count: 6 Maximum mount count: 20 Last checked: Thu Mar 7 15:27:34 1996 Check interval: 2592000 Next check after: Fri Apr 5 16:27:34 1996
The final items in the list concern when fsck will check the filesystem, even if it is clean. The Linux version of fsck for ext2 filesystems will check the filesystem if either the maximum number of mounts without a check has been exceeded or the maximum time interval between checks has expired (20 times and 30 days in the preceding output; the check interval is given in seconds).
tune2fs's -i option may be used to specify the maximum time interval between checks in days, and the -c option may be used to specify the maximum number of mounts between checks. For example, the following command disables the time-between-checks function and sets the maximum number of mounts to 25:
# tune2fs -i 0 -c 25 /dev/hdb1 Setting maximal mount count to 25 Setting interval between check 0 seconds
Another useful option to tune2fs is -m, which allows you to change the percentage of filesystem space held in reserve dynamically.
- An Introduction to Tabled Logic Programming with Picat
- Ubuntu MATE, Not Just a Whim
- Build Your Own Raspberry Pi Camera
- Nasdaq Selects Drupal 8
- Non-Linux FOSS: Screenshotting for Fun and Profit!
- Secure Desktops with Qubes: Compartmentalization
- Canonical Ltd.'s Ubuntu Core
- A New Mental Model for Computers and Networks
- Getting a Windows Refund in California Small Claims Court
- The Peculiar Case of Email in the Cloud
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide