0 Basic Learning Cloud computing and Big Data DBA cluster Architect "Linux system configuration and network configuration December 31, 2015 Thursday"

Source: Internet
Author: User
Tags dba disk usage

2015.12. to/ThuAbstract **************View the operation partition of the disk DF du hard disk Fsdisk format Mkfs detect fsck mount mount unload umount Create swap slot:1. Split: fdisk t2. Format: Mkswap3. Using: Swapon4. Observation: FREEDF<==list the devices currently mounted DUMPE2FS [-BH] Device filename selection is not a parameter:-B: List the parts that are reserved for bad tracks (usually not!?))-H: List only the superblock data, not the other section content!ls-Il View the inode file system's simple operations disk and directory capacity DF: Lists the overall disk usage of the file system; Du: Evaluates the disk usage of the file system (commonly used in the estimated volume of the catalog) DF [-Ahikhtm] [Login ring file name] selection and parameters:-A: Lists all file systems, including system-specific/proc and other file systems-k: Display each file system in Kbytes capacity-m: Display each file system in MBytes capacity-h: GBytes, MBytes, Kbytes and other formats are displayed by people who are easier to read-H: Replace m= with m=1000k1024K-T: Along with the partition's filesystem name (e.g. ext3) also lists-I: No hard disk capacity, and the number of inode to display du [-ahskm] file \ Directory name selection and parameters:-A: List all files and directory capacity, because the default is only the number of files in the directory underground-H: A more readable capacity format (g/M) Display-S: Lists the total, not the size of each directory-S: Do not include totals under sub-directories-K: List capacity display in Kbytes-m: Display du with MBytes listing capacity-sm/*  <== lists the capacity occupied by each directory in the root directory ln [-SF] source file the partition, format, test, and Mount of the destination file disk: What to do when adding a hard drive: 1. Partitioning the disk to establish the available partition partition; <fdisk>2. Format the partition to establish the file system filesystem;<mkfs>3 available to the system. If you want to be careful, you can test the newly established filesystem; <fsck, Badblocks>4. On a Linux system, a mount point (directory) needs to be set up and mounted. <mount>5. If the ll/dev/new partition does not exist, use the partx-a/dev/vdb to have the newly created partition read in effect, or restart the computer # partition Fdisk [-l] Device name selection and parameters:-L: Outputs all partition contents of the device after the output. If there is only fdisk-l, the system will list the partition of the device that can be found in the whole system.   Command (M for help): after M <== input m, you will see these instructions below introducing command action a toggle a bootable flag B edit BSD Disklabel c Toggle the DOS compatibility flag d Delete a partition <== delete a partition l list known partition types M print thi S menu n Add a new partition <== add a partition o create a new empty DOS partition table p print the partition table = = Show split table on screen Q quit without saving changes<== do not store leave Fdisk program s create a new empty Sun Disklabel t change a PA Rtition ' s system ID u change display/entry units v Verify the partition Table W write table to disk and exit<== writes just the action to the split table x extra functionality (experts only) partprobe# disk format mkfs [-t file system format] The device file name is selected with parameters:-T: can be taken to file system format, such as Ext3, EXT4, VFAT, etc. (the system has the support to take effect) mkfs. [Tab]  [TAB] <== lists system-supported file systems Mkfs.cramfs MKFS.EXT3 mkfs.ext4dev mkfs.vfat mkfs.ext2 mkfs.ext4 Mkfs.msdos    MKE2FS [-B Block Size] [-I block size] [-L header] [-CJ] Device selection and Parameters:-B: You can set the size of each block, currently supports three, 2048, 4096 bytes; -I: How much capacity to give a inode-c: Check for disk errors, only once-C, will be a quick read test, if released two times-c-c, will be tested read/write (read-write), will be slow-l: Can be followed by the header name (label), the lab El is a useful e2label directive-j: #磁盘检验: fsck, Badblocks fsck [-t file system] [-acay] Appliance name Badblocks-[SVW] Appliance Name # mount/etc/fstab/etc/f Ilesystems: System-specified test mount file system type; The file system type that the/proc/filesystems:linux system has loaded.   1.mount usage mount [-LHV] mount-a [-FFNRSVW] [-t vfstype] [-O optlist] mount [-FNRSVW] [-o option[,option] ...] Device|dir Mount [-FNRSVW] [-t vfstype] [-O options] device dir 1) standard usage mount-t EXT4/DEV/VDB1/MNT/VDB1 2) Remote mount Mount IP:/XX/XX Mount 172.25.254.250:/content/mnt <== remote Mount case 3) Other options: A.-o Lo Op hangs in image file usage: Mount-o loop mounted file mount point for example: Mount-o loop rhel-server-6.5-x86_64-dvd.iso/test b.-o ro with read-only  Mount usage: Mount-o ro is hung on the device mount point for example: Mount-o ro/dev/vdb1/test c.-o remount re-hung in usage: Mount-o remount Device mount points being hung for example: Mount-o Remount,rw,auto/<== re-hung in root directory mount-o Remount,ro newdir <== re-mount as read-only d.-   T iso9660 hangs on CD/DVD usage: mount-t iso9660 is hung on the device mount point for example: Mount-t iso9660/dev/dvdrom/media/dvdrom 2.mount View Df-h Mount <== Viewing the relationship of device and directory mount points 3.umount [-FN] Appliance file name and mount point umount/mnt Note: 1. Using mount multiple times for a mount point hides the previous content and only sees the last hang Contents of the device files contained in 2. Do not load the mount point inside the execution umount command, will error 3. Try not to execute Mount Mount command in Mount point 4.mount command for temporary entry into force 4./etc/fstab will take effect forever #/etc/fstab# Cre  Ated by Anaconda in Thu Jul 2 15:35:54 2015## Accessible filesystems, by reference, is maintained under '/dev/disk ' # see Man pages Fstab (5), FINDFS (8), mount (8) and/or Blkid (8) for more INFO#/DEV/MAPPER/VG_RHEL6-LOGVOL01/EXT4 defaults 1 1uuid=83ef4943-80bd-418e-be7f-da87fd34bd61/boot ext4 Defaults 1 2/dev/mapper/vg_rhel6-lo                    Gvol00/home ext4 defaults 1 2uuid=02c63503-b951-4ede-8f58-b56fbeb16b09 swap                  Swap defaults 0 0tmpfs/dev/shm tmpfs defaults 0 0devpts        /dev/pts devpts gid=5,mode=620 0 0sysfs/sys Sysfs Defaults 0 0proc/proc proc Defaults 0 0 Device mount point file System type option whether backup needs to be detected (non-0 represents detection , the smaller the number, the higher the priority)/DEV/VDB1/MNT/VDB1 EXT4 defaults 0 0-------------------------------------------------modified save, by mount-a Let the configuration take effect to establish swap slots: 1. Split: Fdisk t2. Format: MKSWAP3. Use: Swapon4. Observation: Free uses archives to build swap:1. Create Document: DD If=/dev/zero of=/tmp/swap bs=1g count=22. Format: MKSWAP/TMP/SWAP3. Using: SWAPON/TMP/SWAP4. Observation: Free5. Close: Swapoff/tmp/swap 

0 Basic Learning Cloud computing and Big Data DBA cluster Architect "Linux system configuration and network configuration December 31, 2015 Thursday"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.