
當我嘗試安裝其中一個硬碟時,它無法找到該硬碟所在的資料夾。
這是命令的輸出df
:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 33000428 119124 32881304 1% /
none 33000428 119124 32881304 1% /
198.27.85.63:/home/pub/rescue.v7 886788312 250295096 591423904 30% /nfs
198.27.85.63:/home/pub/pro-power 886788312 250295096 591423904 30% /power
198.27.85.63:/home/pub/commonnfs 886788312 250295096 591423904 30% /common
tmpfs 10240 204 10036 2% /dev
tmpfs 6600088 72 6600016 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 13200160 0 13200160 0% /run/shm
當我運行命令 fdisk -l 時會出現這種情況:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 3907029167 1953514583+ ee GPT
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 3907029167 1953514583+ ee GPT
Disk /dev/md3: 1978.9 GB, 1978886193152 bytes
2 heads, 4 sectors/track, 483126512 cylinders, total 3865012096 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md3 doesn't contain a valid partition table
Disk /dev/md2: 21.0 GB, 20970405888 bytes
2 heads, 4 sectors/track, 5119728 cylinders, total 40957824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md2 doesn't contain a valid partition table
當我嘗試/dev/sda1
使用命令安裝硬碟時mount -o barrier=0 /dev/sda1
,它會顯示以下訊息:
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab
我該如何解決這個問題,以便我可以備份我的所有內容?
當我嘗試掛載 /dev/sdb3 時會出現這種情況:
mount: unknown filesystem type 'linux_raid_member'
然後我嘗試使用該命令mdadm --assemble --run /mnt /dev/sdb3
,但它只給了我這個:
mdadm: /dev/sdb3 is busy - skipping
我怎樣才能解決這個問題?
編輯這是我使用的輸出cat /proc/mdstat
md2 : active raid1 sda2[0] sdb2[1]
20478912 blocks [2/2] [UU]
md3 : active raid1 sda3[0] sdb3[1]
1932506048 blocks [2/2] [UU]
unused devices: <none>
答案1
對於第一個問題:
當我嘗試使用命令 mount -o Barrier=0 /dev/sda1 掛載 /dev/sda1 硬碟時,它給我以下訊息:
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab
我該如何解決這個問題,以便我可以備份我的所有內容?
答案是mount
尋找掛載點在 或 中/etc/fstab
,/etc/mtab
但沒有為 進行配置/dev/sda1
。您可以在命令列上指定掛載點(空目錄就可以了)mount
,例如
mkdir /mnt/hd
mount -o barrier=0 /dev/sda1 /mnt/hd
如果成功,您可以新增配置設置,/etc/fstab
以便無需指定目錄即可掛載(掛載將讀取 fstab 並使用配置的目錄),您也可以為該分割區設定引導時自動掛載。
對於第二個問題:
當我嘗試掛載 /dev/sdb3 時會出現這種情況:
mount: unknown filesystem type 'linux_raid_member'
然後我嘗試使用命令 mdadm --assemble --run /mnt /dev/sdb3 但它只是給了我這個:
mdadm: /dev/sdb3 is busy - skipping
我怎樣才能解決這個問題?
您不應掛載屬於 MD 陣列一部分的分割區。您應該根據您的掛載相應的 raid 設備,例如/dev/md2
或,並且在這種情況下,空目錄將用作掛載點:/dev/md3
/proc/mdstat
mkdir /mnt/raid2
mount /dev/md2 /mnt/raid2
和以前一樣,您可以在檔案中設定一個條目/etc/fstab
並在命令中省略目錄mount
,和/或從系統引導期間的自動掛載中受益。