Mount
需要幫助安裝硬碟
我在執行 fdisk -l 後得到這個
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 522 4192933+ 83 Linux /dev/sda2 523 60540 482094585 83 Linux /dev/sda3 60541 60801 2096482+ 82 Linux swap / Solaris Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104391 83 Linux /dev/sdb2 14 60801 488279610 8e Linux LVM
和我的 df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 446G 397G 27G 94% / /dev/sda1 3.9G 84M 3.6G 3% /boot tmpfs 2.0G 0 2.0G 0% /dev/shm
我可以獲得安裝此硬碟的分步說明嗎?我嘗試線上搜尋,但一切似乎都與我所擁有的不同。另外,如果我希望 apache 可以訪問這些文件,我應該掛載到哪個目錄?
Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104391 83 Linux /dev/sdb2 14 60801 488279610 8e Linux LVM
據我了解,您想掛載
/dev/sdb2
. 注意Id
和System
列,它顯示8e
和LVM
音量。您不能以與標準分區(ext3、ext4、…)相同的方式掛載它列出所有物理卷:
# pvs PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a- 931.41G 0 /dev/sdb2 VolGroup00 lvm2 a- 931.50G 0
接下來,列出邏輯卷
VolGroup00
:# lvdisplay /dev/VolGroup00 --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID Eq8ceD-6A07-lfTw-QHoB-l8Hj-Rz0l-Ijsoro LV Write Access read/write LV Status available # open 1 LV Size 1.81 TB Current LE 59175 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV UUID pQG1xT-0PTT-xn35-QdVd-67Di-zYmr-xkb3WK LV Write Access read/write LV Status available # open 0 LV Size 13.69 GB Current LE 438 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1
查看
LV Size
並掛載您想要的邏輯卷:mount /dev/VolGroup00/LogVol00 /mnt/data
要使 Apache 可以寫入此文件夾:
chown -R apache:apache /mnt/data
如果沒有現有數據,並且您想將其格式化為“普通”分區,請執行以下操作:
fdisk /dev/sdb
並按照提示進行操作。
創建一個 ext3 文件系統:
mkfs.ext3 /dev/sdb1
安裝它:
mount /dev/sdb1 /mnt/data