[問題] 關於mdadm

看板Linux作者 (*unicef)時間14年前 (2011/09/27 01:17), 編輯推噓0(004)
留言4則, 4人參與, 最新討論串1/1
大家好: 最近在學Raid,實驗過程中發生了一個問題, 首先我建立了一個Raid5裝置,內容有5個10GB的分區, root@ubuntu:~# mdadm --detail /dev/md0 Active Devices : 5 Working Devices : 5 Failed Devices : 0 Spare Devices : 0 Number Major Minor RaidDevice State 0 8 5 0 active sync /dev/sda5 1 8 6 1 active sync /dev/sda6 2 8 7 2 active sync /dev/sda7 3 8 8 3 active sync /dev/sda8 4 8 9 4 active sync /dev/sda9 root@ubuntu:~# df -h /dev/md0 37G 176M 37G 1% /home 然後,我希望在不重製/dev/md0的情況下,新增兩個容量一樣的裝置, 爬了Google,找到下面兩段指令, mdadm /dev/md0 -a /dev/sda11 /dev/sda10 mdadm /dev/md0 --grow --raid-disks=7 執行完,沒有錯誤訊息,再看一次mdadm --detail /dev/md0, Active Devices : 7 Working Devices : 7 Failed Devices : 0 Spare Devices : 0 Number Major Minor RaidDevice State 0 8 5 0 active sync /dev/sda5 1 8 6 1 active sync /dev/sda6 2 8 7 2 active sync /dev/sda7 3 8 8 3 active sync /dev/sda8 4 8 9 4 active sync /dev/sda9 5 8 10 5 active sync /dev/sda10 6 8 11 6 active sync /dev/sda11 感覺上,的確都正常了,可是我打df -h,卻還是看到這樣的結果, /dev/md0 37G 176M 37G 1% /home Google好像說要「更改FileSystem的大小」, 想請問要下什麼指令才能讓磁碟空間變正常呢? 感恩大家! -- 靜思語分享:一切苦,源自慾念。 帝瑋 感恩合十 ---------------------------------------------------- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 175.180.136.94 ※ 編輯: hdw770715 來自: 175.180.136.94 (09/27 01:29)

09/27 10:19, , 1F
你先說你的 filesystem = ?
09/27 10:19, 1F

09/27 14:38, , 2F
ext4
09/27 14:38, 2F

09/27 15:24, , 3F
檔案系統大小好像還沒聽說可以online變更的.也許我落伍了.
09/27 15:24, 3F

09/29 02:41, , 4F
try resize2fs
09/29 02:41, 4F
文章代碼(AID): #1EWBEiXw (Linux)