Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux file system management partition, format, mount - label mount     - OpenStack package problems and solutions under CentOS6 (Linux)

- 12 Linux Process Management Commands (Linux)

- MySQL performance view and configure finishing Daquan (Database)

- MongoDB collection data migration to MySQL database (Database)

- The signature can not be verified under Debian (Linux)

- Ubuntu resolve sudo: source: command not found error (Linux)

- Optimized to minimize the installation of CentOS 5.8 (Linux)

- How to install Linux Go Language (Linux)

- CentOS7 install JAVA notes (Linux)

- Java proxy use and proxy principle (Programming)

- Calculate CPU utilization (Linux)

- Linux use chattr and lsattr commands to manage file and directory attributes (Linux)

- How to clear the v $ archived_log view expiration information (Database)

- On the design of Oracle database backup (Database)

- Memcache explain in detail (Server)

- Python script file directory traversal examples (Programming)

- How to Install Apache on Linux servers (Server)

- Unetbootin make use U disk loading Linux system (Linux)

- Linux System Tutorial: Ubuntu on the desktop is disabled by default keyring to unlock tips (Linux)

- Ubuntu install code editor Sublime Text 3 (Linux)

 
         
  Linux file system management partition, format, mount - label mount
     
  Add Date : 2018-11-21      
         
         
         
  Operating System: RHEL6.4 - 64

Increase 30G disk Linux operating system (virtual machine) in

Partition, the first primary partition 18G, formatted as ext4 file system, hanging on to the / u01

To implement a system reboot is still valid (boot automatically mount) be mounted using LABEL

1.1.1 confirm the system disk device

df -Th view the current file system usage

[Root @ rhel64 ~] # df -Th

View the current disk partitioning and equipment

[Root @ rhel64 ~] # fdisk -cul

1.1.2 increase 30G SCSI disk

Shut down the operating system

[Root @ rhel64 ~] # shutdown -h now

Add a SCSI storage controller

Add a 30G disk in the SCSI controller

Add a disk is complete, start the virtual machine operating system.

1.1.3 Check Device disk case

[Root @ rhel64 ~] # fdisk -cul

After each restart, the disk name may vary.

After the reboot, the newly added disk name is / dev / sda

1.1.4 partition fdisk

See the newly added disk partitioning

[Root @ rhel64 ~] # fdisk -cul / dev / sda

[Root @ rhel64 ~] # fdisk / dev / sda

Tip recommended cu, press m help, q quit

Re-partition mode using fdisk -cu

[Root @ rhel64 ~] # fdisk -cu / dev / sda

m View command help

n Add a new partition p primary partition 1 first sector carriage laster sector input default partition size + 18G

m View help p Print the partition table

m View help save the partition table w

See the new disk partitioning again

[Root @ rhel64 ~] # fdisk -cul / dev / sda

See the corresponding device

[Root @ rhel64 ~] # ll / dev / sda *

1.1.5 Formatting mkfs.ext4

Enterprise Edition 6 default ext4 file system

[Root @ rhel64 ~] # mkfs.ext4 / dev / sda1

1.1.6 playing tag e2label

[Root @ rhel64 ~] # e2label

[Root @ rhel64 ~] # e2label / dev / sda1 u01

Check the label, UUID

[Root @ rhel64 ~] # blkid

1.1.7 Create the mount point

Essence mount point is a directory entry is accessed disk partition

[Root @ rhel64 ~] # mkdir / u01

[Root @ rhel64 ~] # ls -ld / u01

1.1.8 temporary mount

Create the file file1 in front mount / u01 in

[Root @ rhel64 ~] # touch / u01 / file1

[Root @ rhel64 ~] # ll / u01

View the file system, then the / u01 just an ordinary directory, occupancy / file system space

[Root @ rhel64 ~] # df -Th

Use the mount command to mount / dev / sda1 to / u01

[Root @ rhel64 ~] # mount / dev / sda1 / u01

[Root @ rhel64 ~] # df -Th

Once mounted / u01 is a separate file system, corresponding to a hard disk partition, with its own separate disk space

View / u01, file1 file does not already display

[Root @ rhel64 ~] # ll / u01

1.1.9 unmount the file system

Before uninstalling, the new file file2 in / u01 in

[Root @ rhel64 ~] # touch / u01 / file2

[Root @ rhel64 ~] # ll / u01

Uninstall / u01 Document System / u01 files, display does not show the previous file1 file2

[Root @ rhel64 ~] # umount / u01

[Root @ rhel64 ~] # df -Th

[Root @ rhel64 ~] # ll / u01

1.1.10 written to / etc / fstab for system startup automatically mount

Check the configuration file / etc / fstab

[Root @ rhel64 ~] # cat / etc / fstab

Backup configuration file, and add a new entry in the configuration file

[Root @ rhel64 ~] # cp / etc / fstab /etc/fstab.bak

[Root @ rhel64 ~] # vi / etc / fstab

G quickly move the cursor to the last row o the next line is inserted, you can use the Tab key to separate the alignment

LABEL = u01 / u01 ext4 defaults 0 0

You can use the LABEL to mount, you can use UUID to mount.

Do not use the following method to mount! ! !

The current state is not the problem, reboot, disk name may change after the newly added disk 30G restart may become / dev / sdb !!!

/ Dev / sda1 / u01 ext4 defaults 0 0

Check the file system, the use mount / u01 mount, if the / etc / fstab is configured correctly, properly mount

[Root @ rhel64 ~] # df -Th

[Root @ rhel64 ~] # mount / u01

[Root @ rhel64 ~] # df -Th

[Root @ rhel64 ~] # ll / u01

1.1.11 operating system shutdown, restart verification

[Root @ rhel64 ~] # shutdown -h now

[Root @ rhel64 ~] # df -Th

/ U01 file system can be displayed, indicating a successful restart automatically mount.

Note: At this point / u01 corresponding partition is shown as / dev / sdb1, explained after the shutdown restart, 30G disk name is / dev / sdb!

There may still be / dev / sda, depending on the disk in response to the order to determine the name.
     
         
         
         
  More:      
 
- KUbuntu / Ubuntu 14.04 (downgrade) installed SVN 1.7 (Linux)
- C ++ Supplements - malloc free and new delete the same and different (Programming)
- Ubuntu and Archlinux install Notepadqq 0.50.2 (Linux)
- Fedora 22 installation and configuration optimization (Linux)
- Mybatis + binding Struts2: achieving user to insert and find (Programming)
- Teach you self-built Linux firewall free (Linux)
- Java Set and List in the relationship and difference (Programming)
- Oracle background processes daemons (Database)
- Linux Powerful command Awk Introduction (Linux)
- Linux (CentOS) SSH login without password authentication (Linux)
- 11 examples in Linux df command (Linux)
- iptables allow only specific ip address to access the specified port (Linux)
- Thinking in Java study notes - initialization and cleanup (Programming)
- How to customize your Linux desktop: Gnome 3 (Linux)
- Build Nginx + uWSGI + Flask operating environment under CentOS 6.4 tutorial (Server)
- WEB-based Android Remote Tools Python implementation (Programming)
- TPCC-MySQL Benchmark (Database)
- Linux POST fstab configuration file read-only variable can not be modified problem (Linux)
- Nginx installation configuration Zabbix (Server)
- Ubuntu 15.04 / CentOS 7.0 to set custom boot (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.