KFS 正式部署的時候遇到的問題

[b]一,大硬盤掛載[/b]

1 查看所有的磁盤
sudo fdisk -l |more 


2 設置磁盤
sudo fdisk /dev/sdb 


-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u')
WARNING : DOS

Command (m for help):c <enter>
DOS Compatibility flag is not set (不兼容DOS的模式,如果不用這個模式不能把硬盤設置成1T以上的)

Command (m for help): m <enter>
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help):n <enter>
Command action
e extended
p primary partition (1-4)
p <enter>
Partition number (1-4):
1 <enter>
Command (m for help):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.


3 格式化硬盤
sudo mke2fs -t ext3 /dev/sdb1


4 自動掛載
sudo nano /etc/fstab


加入以下信息
/dev/sdb1 /mnt/kfs ext3 defaults 0 2

注意掛盤的時候一定要掛自己建立的文件目錄,這樣纔可以很隨意的換硬盤


[b]二 修復了Ubuntu 變成了只讀文件系統的錯誤[/b]

發現修改/etc/fstab,提示只讀文件系統,:w!也失敗。

運行以下語句即可

mount /dev/sda1 / -o rw,remount


[b]三 SSH 配置互通[/b]

只需修改 authorized_keys 的IP 爲 192.168.1.*即可達到通配的效果
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章