제로 기초 학습 클 라 우 드 컴 퓨 팅 및 빅 데이터 DBA 클 라 우 드 구조 사 [Linux 시스템 설정 및 네트워크 설정 2015 년 12 월 31 일 목요일]

7274 단어
2015.12.31/Thu

*************  **************
     df du
      
       fsdisk
       mkfs
       fsck
       mount
       umount
   swap    :
1.   :fdisk t
2.    :mkswap
3.   :swapon
4.   :free








df <==         

dumpe2fs [-bh]      
     :
-b :          (      !?)
-h :    superblock    ,           !

ls -il   inode


         
        
df:              ;
du:            (           )
df [-ahikHTm] [      ]
     :
-a :        ,       /proc      
-k :  KBytes          
-m :  MBytes          
-h :       GBytes, MBytes, KBytes        
-H :  M=1000K    M=1024K 
-T :    partition   filesystem    (   ext3)    
-i :      ,   inode       


du [-ahskm]   \    
     :
-a :           ,               
-h :            (G/M)   
-s :      ,               
-S :           
-k :  KBytes       
-m :  MBytes       

du -sm /*  <==                

 ln [-sf]          

     、   、     :

       ,    :
1.        ,         partition ; <fdisk>
2.    partition      ( format ),            filesystem;<mkfs>
3.        ,          filesystem     ;<fsck, badblocks>
4.   Linux    ,       (  ),       。<mount>
5.   ll /dev/         ,   partx -a /dev/vdb           ,      

#  
fdisk [-l]     
       :
    -l :           partition   。    fdisk -l  ,                    partition     。

Command (m for help): m <==   m  ,            
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition <==      
   l   list known partition types
   m   print this menu
   n   add a new partition <==      
   o   create a new empty DOS partition table
   p   print the partition table==         
   q   quit without saving changes<==      fdisk   
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit<==           
   x   extra functionality (experts only)


 
partprobe

#     
mkfs [-t       ]      
       :
    -t :         ,   ext3, ext4, vfat  (         )
    mkfs.[tab][tab] <==           
    mkfs.cramfs   mkfs.ext3     mkfs.ext4dev  mkfs.vfat
    mkfs.ext2     mkfs.ext4     mkfs.msdos  

mke2fs [-b block   ] [-i block   ] [-L   ] [-cj]   
       :
    -b :       block    ,     1024, 2048, 4096 bytes   ;
    -i :         inode 
    -c :      ,      -c  ,         ;       -c -c ,     (read-write),   
    -L :          (Label),   label      e2label  
    -j :

#    : fsck, badblocks
    fsck [-t     ] [-ACay]     
    badblocks -[svw]     

#  
/etc/fstab
/etc/filesystems:               ;
/proc/filesystems:Linux              。
1.mount   
  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)      mount -t ext4 /dev/vdb1 /mnt/vdb1 
  2)      mount ip:/xx  /xx   mount 172.25.254.250:/content /mnt <==      
  3)     :
    A.-o loop       
          :mount -o loop            
          :mount -o loop rhel-server-6.5-x86_64-dvd.iso /test
    B.-o ro        
          :mount -o ro           
          :mount -o ro /dev/vdb1 /test
    C.-o remount     
          :mount -o remount           
          :mount -o remount,rw,auto / <==       
             mount -o remount,ro newdir <==       
    D.-t iso9660   CD/DVD
          :mount -t iso9660            
          :mount -t iso9660 /dev/dvdrom /media/dvdrom
  
2.mount   
  df -h 
  mount <==             

3.umount [-fn]          

  umount /mnt
      :
    1.          mount,           ,                   
    2.          umount  ,   
    3.           mount    
        4.mount       

4./etc/fstab      
#
# /etc/fstab
# Created by anaconda on Thu Jul  2 15:35:54 2015
#
# Accessible filesystems, by reference, are 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 1
UUID=83ef4943-80bd-418e-be7f-da87fd34bd61 /boot                   ext4    defaults        1 2
/dev/mapper/vg_rhel6-LogVol00 /home                   ext4    defaults        1 2
UUID=02c63503-b951-4ede-8f58-b56fbeb16b09 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
                              ( 0    ,         )
/dev/vdb1  /mnt/vdb1 ext4 defaults 0 0
-------------------------------------------------
     ,  mount -a      




   swap    :
1.   :fdisk t
2.    :mkswap
3.   :swapon
4.   :free

      swap:
1.    :dd if=/dev/zero of=/tmp/swap bs=1G count=2
2.   :mkswap /tmp/swap
3.  :swapon /tmp/swap
4.  :free
5.  :swapoff /tmp/swap

좋은 웹페이지 즐겨찾기