歡迎您光臨本站 註冊首頁

菜鳥求教硬碟使用情況

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

菜鳥求教硬碟使用情況

# fdisk -l

Disk /dev/cciss/c0d0: 500.0 GB, 500074307584 bytes
255 heads, 32 sectors/track, 119694 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          64      261104   83  Linux
/dev/cciss/c0d0p2              65        4176    16776960   83  Linux
/dev/cciss/c0d0p3            4177        8288    16776960   82  Linux swap / Solaris
/dev/cciss/c0d0p4            8289      119694   454536480    5  Extended
/dev/cciss/c0d0p5            8289      119694   454536464   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d1'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: The size of this disk is 3.0 TB (3000513552384 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/cciss/c0d1: 3000.5 GB, 3000513552384 bytes
255 heads, 63 sectors/track, 364791 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1               1      267350  2147483647+  ee  EFI GPT

================================================
小弟剛接手工作,有台Linux的伺服器,可能是硬碟空間快滿了。平時不熟悉Linux系統, 但感覺好像這個系統中只使用了500G左右的空間, 剩下的3T還沒有利用是么?

請教教小弟這機器的磁碟情況。告訴我應該怎麼辦。或者介紹一下相關文章, 我慢慢學也行
《解決方案》

DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).
使用parted進行管理 ^_^
《解決方案》

 

# parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags



Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d0: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      16.4kB  267MB   267MB   primary   ext3         boot
2      267MB   17.4GB  17.2GB  primary   ext3              
3      17.4GB  34.6GB  17.2GB  primary   linux-swap        
4      34.6GB  500GB   465GB   extended                    
5      34.6GB  500GB   465GB   logical   ext3
======================================


Disk /dev/cciss/c0d1: 3001GB  這個應該還沒有被分區呢吧?


《解決方案》

本帖最後由 biyexp 於 2012-07-19 11:04 編輯

如果沒有被分區, 我就需要手動分區,應該輸入 #parted /dev/cciss/c0d1    這樣對嗎?
《解決方案》

#  parted  /dev/sdb
GNU  Parted  1.8.1
Using  /dev/sdb
Welcome  to  GNU  Parted!  Type  'help'  to  view  a  list  of  commands.

(parted) mklabel gpt
將MBR磁碟格式化為GPT

(parted) mkpart primary 0 100
劃分一個起始位置為0大小為100M的主分區

(parted) mkpart primary 100 200
劃分一個起始位置為100M大小為100M的主分區

(parted)  mkpart  primary  0  -1

劃分所有空間到一個分區

(parted)  print
列印當前分區

(parted)  quit

可能還會用到的一些命令

(parted) mklable msdos
如果要反過來.將GPT磁碟轉化為MBR磁碟

在這樣分完分區后,還要使用mkfs.ext3來進行格式化
#partprobe
#mkfs.ext3 -F /dev/sdb1

記的哦,因為fdisk是不支持GPT磁碟,所以使用fdisk -l來查看磁碟剛才的分區是沒有用的.

命令行的模式:

將硬碟轉化為GPT磁碟后,執行下列命令

parted /dev/sdx mkpart primary 0 100
##劃分一個起始位置為0大小為100M的主分區


mount 命令

/dev/sdb1              /opt                     ext3    defaults        0 1


《解決方案》

本帖最後由 biyexp 於 2012-07-23 15:02 編輯

謝謝5樓大俠,小弟按照您的方法,開始做的沒問題,但是後來又出現問題了
我分了1個區。
(parted) print                                                           

Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      17.4kB  3001GB  3001GB               primary      

(parted) quit               
-------------------------------------------------------
查看一下:
#parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      17.4kB  3001GB  3001GB               primary   
------------------------------------------------
然後格式化#mkfs.ext3 -F /dev/cciss/c0d1 ,但是格式化到一半自動退出到命令行了,之後就出問題了

#parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 

Error: Unable to open /dev/cciss/c0d1 - unrecognised disk label.          


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d0: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      16.4kB  267MB   267MB   primary   ext3         boot
2      267MB   17.4GB  17.2GB  primary   ext3              
3      17.4GB  34.6GB  17.2GB  primary   linux-swap        
4      34.6GB  500GB   465GB   extended                    
5      34.6GB  500GB   465GB   logical   ext3  

我應該怎麼辦呢。。。請指教:em14:
《解決方案》

我先前碰到GPT分區都是在windows下,印象中只有獨立的分區才可以有MBR轉到GPT的;
但是在linux下沒有嘗試過,敢問你的硬碟有作什麼raid嗎?
《解決方案》

做raid了, 我又做了一次格式化, 成功了, 但是格式化了2個多小時
《解決方案》

第三條中國unix的回復
《解決方案》

/dev/cciss/c0d1p1
這塊盤很明顯沒有被使用,格式化后掛載上去就可以了吧

[火星人 ] 菜鳥求教硬碟使用情況已經有922次圍觀

http://coctec.com/docs/service/show-post-649.html