<span id="vexk9"><table id="vexk9"></table></span>

      parted

      磁盤分區(qū)和分區(qū)大小調(diào)整工具

      補充說明

      parted命令 是由GNU組織開發(fā)的一款功能強大的磁盤分區(qū)和分區(qū)大小調(diào)整工具,與fdisk不同,它支持調(diào)整分區(qū)的大小。作為一種設(shè)計用于Linux的工具,它沒有構(gòu)建成處理與fdisk關(guān)聯(lián)的多種分區(qū)類型,但是,它可以處理最常見的分區(qū)格式,包括:ext2、ext3、fat16、fat32、NTFS、ReiserFS、JFS、XFS、UFS、HFS以及Linux交換分區(qū)。

      語法

      parted(選項)(參數(shù))
      

      選項

      -h:顯示幫助信息;
      -i:交互式模式;
      -s:腳本模式,不提示用戶;
      -v:顯示版本號。
      

      參數(shù)

      實例

      從串行技術(shù)出現(xiàn)以來,越來越多用戶選擇使用大容量的SATA硬盤創(chuàng)建磁盤陣列;特別是MD1000/MD3000,很輕易就突破2T的LUN,故在此給大家一些指引。

      紅帽企業(yè) Linux 4 Update 4供對大于 2 terabytes(TB)的磁盤設(shè)備的支持。

      請參考以下操作步驟:

      注:

      [root@localhost ~]# fdisk -l
      Disk /dev/sda: 35.8 GB, 35862976512 bytes
      255 heads, 63 sectors/track, 4360 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
         Device Boot      Start         End      Blocks   id  System
      /dev/sda1   *           1          13      104391   83  Linux
      /dev/sda2              14         144     1052257+  82  Linux swap
      /dev/sda3             145        4360    33865020   83  Linux
      Disk /dev/sdb: 2147 MB, 2147483648 bytes
      255 heads, 63 sectors/track, 261 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk /dev/sdb doesn't contain a valid partition table
      
      [root@localhost ~]# parted /dev/sdb
      GNU Parted Copyright (C) 1998 - 2004 free Software Foundation, Inc.
      This program is free software, covered by the GNU General Public License.
      This program is distributed in the hope that it will be useful, but WITHOUT ANY
      WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
      PARTICULAR PURPOSE.  See the GNU General Public License for more details.
      使用/dev/sdb
      (parted)mklabel gpt
      (parted)print
      /dev/sdb的磁盤幾何結(jié)構(gòu):0.000-2048.000兆字節(jié)
      磁盤標(biāo)簽類型:gpt
      Minor   起始點       終止點 文件系統(tǒng)   名稱                 標(biāo)志
      (parted)mkpart primary 0 2048  <-----上面print顯示的數(shù)字
      (parted)print
      /dev/sdb的磁盤幾何結(jié)構(gòu):0.000-2048.000兆字節(jié)
      磁盤標(biāo)簽類型:gpt
      Minor   起始點       終止點 文件系統(tǒng)   名稱                 標(biāo)志
      1          0.017   2047.983
      (parted)quit
      

      如果必要,不要忘記更新/etc/fstab

      [root@localhost ~]# fdisk -l
      Disk /dev/sda: 35.8 GB, 35862976512 bytes
      255 heads, 63 sectors/track, 4360 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *           1          13      104391   83  Linux
      /dev/sda2              14         144     1052257+  82  Linux swap
      /dev/sda3             145        4360    33865020   83  Linux
      WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
      
      Disk /dev/sdb: 2147 MB, 2147483648 bytes
      255 heads, 63 sectors/track, 261 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
         Device Boot      Start         End      Blocks   Id  System
      /dev/sdb1               1         262     2097151+  ee  EFI GPT
      Partition 1 has different physical/logical beginnings (non-Linux?):
           phys=(0, 0, 1) logical=(0,0, 2)
      Partition 1 has different physical/logical endings:
           phys=(1023, 254, 63) logical=(261, 21, 16)
      
      [root@localhost ~]# mkfs.ext3 /dev/sdb1
      mke2fs 1.35 (28-Feb-2004)
      Filesystem label=
      OS type: Linux
      Block size=4096 (log=2)
      Fragment size=4096 (log=2)
      262144 inodes, 524279 blocks
      26213 blocks (5.00%) reserved for the super user
      First data block=0
      Maximum filesystem blocks=536870912
      16 block groups
      32768 blocks per group, 32768 fragments per group
      16384 inodes per group
      Superblock backups stored on blocks:
              32768, 98304, 163840, 229376, 294912
      Writing inode tables: done
      Creating journal (8192 blocks): done
      Writing superblocks and filesystem accounting information: done
      This filesystem will be automatically checked every 28 mounts or
      180 days, whichever comes first.  Use tune2fs -c or -i to override.
      
      [root@localhost ~]# mount /dev/sdb1 /mnt
      [root@localhost ~]# df -h
      Filesystem            容量  已用 可用 已用% 掛載點
      /dev/sda3              <?xml:namespace prefix = st1 />32G  2.6G   28G   9% /
      /dev/sda1              99M   12M   82M  13% /boot
      none                  252M     0  252M   0% /dev/shm
      /dev/sdb1             2.0G   36M  1.9G   2% /mnt
      
      主站蜘蛛池模板: 色综合久久久久无码专区| 久久婷婷五月综合色国产香蕉| 色综合久久综精品| 久久婷婷是五月综合色狠狠| 色综合久久夜色精品国产| 亚洲色欲啪啪久久WWW综合网| 久久久久高潮综合影院| 国产在线视频色综合| 欧洲97色综合成人网| 国产成人麻豆亚洲综合无码精品 | 色综合色综合久久综合频道| 天天欲色成人综合网站| 色欲久久久天天天综合网| 亚洲日韩久久综合中文字幕| 一本色道久久88加勒比—综合 | 久久综合给合综合久久| 亚洲综合色丁香麻豆| 中文自拍日本综合| 天天做天天爱天天爽综合网| 色综合久久精品中文字幕首页| 亚洲色图综合在线| 天天狠狠色综合图片区| 狠狠色丁香久久婷婷综合_中| 国产亚洲综合色就色| 亚洲国产综合人成综合网站| 亚洲第一页综合图片自拍| 国产色丁香久久综合| 91精品国产综合久久香蕉 | 亚洲伊人久久大香线蕉综合图片| 久久综合亚洲色hezyo| 色婷婷天天综合在线| 天天综合在线观看| 色噜噜狠狠色综合中国| 色综合久久中文字幕综合网| 色综合久久中文字幕网| 色综合天天娱乐综合网| 国产成人综合久久精品亚洲| 狠狠色伊人久久精品综合网 | 亚洲成色在线综合网站| 久久综合香蕉久久久久久久| 色综合AV综合无码综合网站|