Linux System Administration 07-- file system and LVM

First, create a file system mkfs

1, mkfs command: create a file system (format)

2, the mkfs  -t partition device file system type

3, -t: specifies the type of file format

     -b: Specifies block size, in bytes.

     -U: set the UUID number

4, swap (virtual memory)

    mkfs.xfs

    mkfs.ext4

    mkfs.vaft  -F  32

Second, to expand the swap file system file-based way

touch  tan

dd    if=/dev/zero  of=/root/tan  bs=500M  count=1

Statistics size:

You SH / root / tan

format:

mkswap  /root/tan 

Third, create a swap file system mkswap

1, format

    mkswap  partition device

2, View

    cat  /proc/meminfo  |  grep  -i  “swaptotal”

    free -m // check memory, in MB

    SWAPO the n-  -s // View

3, open

    swapon   partition device

4, closed

   swapoff    partition device

Fourth, mount a file system, ISO image

1, format: Mount   a storage device mount point directory

                 Mount   -o the -loop ISO image file mount point directory

                Mount   // view the current mount

                 Mount   -a // Mount / etc / fstab to mount all recorded in

Fifth, uninstall

1, format: umount  storage device file

                umount   mount point directory

               umount  -a // unmount all mounted recorded

Sixth, set automatically mount file / etc / fstab file

1、vim  /etc/fstab

    /dev/sdb1   /xuexi  /ext4  defaults  0  2

     / Dev / sdb1 device 

     / Xuexi mount point 

      / Ext4 file system 

      defaults mount option 

      0 whether to dump backup 

      Check that the integrity of the system boot time 2

2, parameters:

   defaults: Default

   auto: automatically mount

   noauto: boot does not automatically mount

   nouser: superuser before mount

   ro: read-only

   rw: readable and writable

   user: Any user can mount

3, dump backup settings

    When the value 1, to allow the backup. When set to 0, the backup operation is ignored

4, fsck disk checking settings

    When its value is 0, never checked; / root directory is always 1, the other partition for 2

Seven, to view disk usage df command

1, Options

     -h: display more readable unit of capacity

     -T: displays a corresponding file system type

     -i: control the number of files that can be saved

Eight, to view UUID number  blkid command

1, format: blkid   partition device

2, steps:

    UUID blkid / dev / sdb6 // display device

    End blkid / dev / sdb6 >> / etc / fstab // UUID write the check out / etc / fstab file

Guess you like

Origin www.cnblogs.com/tanxiaojuncom/p/11289259.html