1. <var id="fe6gj"></var>

    <rp id="fe6gj"><nav id="fe6gj"></nav></rp>

    <noframes id="fe6gj"><cite id="fe6gj"></cite>

    <ins id="fe6gj"><button id="fe6gj"><p id="fe6gj"></p></button></ins>
    1. <tt id="fe6gj"><i id="fe6gj"><sub id="fe6gj"></sub></i></tt>
        始創于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊有禮 登錄
        • 掛牌上市企業
        • 60秒人工響應
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補償
        您的位置: 網站首頁 > 幫助中心>文章內容

        linux 磁盤操作

        發布時間:  2012/8/2 18:18:44

         公司內網的服務器硬盤空間不足,將新買來的150G硬盤掛載并設置成samba的共享目錄,下面介紹怎樣將一塊新硬盤分區、格式化、掛載到系統,如適合你請繼續閱讀。服務器上已經有兩塊硬盤,所以硬盤為sdc,后面就不做說明了,至于不知道sdc怎么回事的人,先去問問百度大哥再回來接著看。
          1、# fdisk -l      查看當前磁盤信息,就會發現最下面顯示新加入的硬盤不是有效分區,如下:
          Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
          255 heads, 63 sectors/track, 182401 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          Disk /dev/sdc doesn't contain a valid partition table
          2、# fdisk /dev/sdc      對新硬盤分區,并根據提示進一步操作
          Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
          Building a new DOS disklabel. Changes will remain in memory only,
          until you decide to write them. After that, of course, the previous
          content won't be recoverable.
          The number of cylinders for this disk is set to 182401.
          There is nothing wrong with that, but this is larger than 1024,
          and could in certain setups cause problems with:
          1) software that runs at boot time (e.g., old versions of LILO)
          2) booting and partitioning software from other OSs
          (e.g., DOS FDISK, OS/2 FDISK)
          Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
          Command (m for help): h      輸入h可查看幫助命令
          h: unknown command
          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
          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)
          Command (m for help): n      輸入n進行分區
          Command action
          e   extended
          p   primary partition (1-4)
          p      輸入p為主分區,e為邏輯分區
          Partition number (1-4): 1      由于是新盤我們輸入1來分第一個主分區,共可以分4個主分區
          First cylinder (1-182401, default 1):      選擇該分區的起始磁盤數,如無特殊需求強烈建議選擇默認,也就是1來分區(直接按回車)
          Using default value 1
          Last cylinder or +size or +sizeM or +sizeK (1-182401, default 182401):      定義該分區的大小,如果按默認(按回車)即是使用全部可用存儲額,如分一個1G的空間,輸入+1024m
          Using default value 182401
          Command (m for help): w      寫入分區
          The partition table has been altered!
          Calling ioctl() to re-read partition table.
          Syncing disks.
          3、# fdisk -l      可以找到我們剛才分的一個分區,內容如下:
          Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
          255 heads, 63 sectors/track, 182401 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          Device Boot      Start         End      Blocks   Id System
          /dev/sdc1               1      182401 1465136001   83 Linux
          4、# mkfs -t ext3 -c /dev/sdc1      對分區使用ext3格式化,如多個分區sdc2等以此類推,因為新硬盤加了-c參數要先檢測磁盤壞道,此過程萬分漫長(150G),等待。。。
          mke2fs 1.39 (29-May-2006)
          Filesystem label=
          OS type: Linux
          Block size=4096 (log=2)
          Fragment size=4096 (log=2)
          183156736 inodes, 366284000 blocks
          18314200 blocks (5.00%) reserved for the super user
          First data block=0
          Maximum filesystem blocks=0
          11179 block groups
          32768 blocks per group, 32768 fragments per group
          16384 inodes per group
          Superblock backups stored on blocks:
          32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
          4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
          102400000, 214990848
          Checking for bad blocks (read-only test): done
          Writing inode tables: done
          Creating journal (32768 blocks): done
          Writing superblocks and filesystem accounting information: done
          This filesystem will be automatically checked every 22 mounts or
          180 days, whichever comes first. Use tune2fs -c or -i to override.
          5、# mkdir /var/samba      新建掛載目錄
          6、# mount /dev/sdc1 /var/samba      掛載新硬盤
          7、# df -hl      查看分區大小是否和我們預定的一樣:
          文件系統               容量   已用 可用 已用% 掛載點
          /dev/sda7             9.5G 3.2G 5.9G 35% /
          /dev/sda6             9.5G 151M 8.9G   2% /tmp
          /dev/sda5              19G 3.6G   15G 20% /usr
          /dev/sda3              19G 719M   18G   4% /home
          /dev/sda2             230G   23G 196G 11% /var
          /dev/sda1              99M   25M   69M 27% /boot
          /dev/sdb1             233G 156G   78G 67% /var/samba2
          tmpfs                1008M     0 1008M   0% /dev/shm
          /dev/sdc1             1.4T 198M 1.3T   1% /var/samba      此行為新硬盤
          8、# vi /etc/fstab      設置系統自動掛載硬盤,加入一行:
          /dev/sdc1               /var/samba2             ext3    defaults        0 0
          9、重啟服務器,用步驟7檢查一下,一切正常掛載完成,祝好運~

        億恩科技地址(ADD):鄭州市黃河路129號天一大廈608室 郵編(ZIP):450008 傳真(FAX):0371-60123888
           聯系:億恩小凡
           QQ:89317007
           電話:0371-63322206


        本文出自:億恩科技【www.endtimedelusion.com】

        服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

      1. 您可能在找
      2. 億恩北京公司:
      3. 經營性ICP/ISP證:京B2-20150015
      4. 億恩鄭州公司:
      5. 經營性ICP/ISP/IDC證:豫B1.B2-20060070
      6. 億恩南昌公司:
      7. 經營性ICP/ISP證:贛B2-20080012
      8. 服務器/云主機 24小時售后服務電話:0371-60135900
      9. 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
      10. 專注服務器托管17年
        掃掃關注-微信公眾號
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
          0
         
         
         
         

        0371-60135900
        7*24小時客服服務熱線

         
         
        av不卡不卡在线观看_最近2018年中文字幕_亚洲欧美一区二区三区_一级A爱做片免费观看国产_日韩在线中文天天更新_伊人中文无码在线