centos纾佺洏鍒嗗尯鎬庝箞鎸傝浇
鍦–entOS绯荤粺涓紝纾佺洏鍒嗗尯鐨勬寕杞藉彲浠ラ€氳繃浠ヤ笅姝ラ杩涜锛?/p>
-
纭纾佺洏鍒嗗尯锛氫娇鐢ㄥ懡浠?code>lsblk鎴?code>fdisk -l鏌ョ湅绯荤粺涓殑纾佺洏鍜屽垎鍖轰俊鎭€?/p>
-
鍒涘缓鎸傝浇鐐癸細閫夋嫨涓€涓洰褰曚綔涓虹鐩樺垎鍖虹殑鎸傝浇鐐癸紝姣斿
/mnt/data
銆傚彲浠ヤ娇鐢ㄤ互涓嬪懡浠ゅ垱寤烘寕杞界偣锛?/p>sudo mkdir /mnt/data
-
鎸傝浇鍒嗗尯锛氫娇鐢?code>mount鍛戒护灏嗗垎鍖烘寕杞藉埌鎸傝浇鐐广€傝娉曞涓嬶細
sudo mount /dev/[鍒嗗尯璁惧鍚峕 /mnt/data
鍏朵腑锛?code>[鍒嗗尯璁惧鍚峕鏄鎸傝浇鐨勫垎鍖鸿澶囨枃浠跺悕锛屽
/dev/sdb1
銆?/p> -
楠岃瘉鎸傝浇锛氬彲浠ヤ娇鐢?code>df -h鍛戒护鏌ョ湅宸叉寕杞界殑鍒嗗尯鍒楄〃锛屽苟纭鏂版寕杞界殑鍒嗗尯鏄惁鍦ㄥ垪琛ㄤ腑銆?/p>
-
鑷姩鎸傝浇锛氫负浜嗗湪绯荤粺閲嶅惎鍚庤嚜鍔ㄦ寕杞藉垎鍖猴紝闇€瑕佸湪
/etc/fstab
鏂囦欢涓坊鍔犲搴旂殑鎸傝浇淇℃伅銆傚彲浠ヤ娇鐢ㄤ互涓嬪懡浠ゆ墦寮€璇ユ枃浠惰繘琛岀紪杈戯細sudo vi /etc/fstab
鍦ㄦ枃浠舵湯灏炬坊鍔犱竴琛岀被浼间簬涓嬮潰鐨勫唴瀹癸紙浠?code>ext4鏂囦欢绯荤粺涓轰緥锛夛細
/dev/[鍒嗗尯璁惧鍚峕 /mnt/data ext4 defaults 0 0
淇濆瓨骞堕€€鍑虹紪杈戝櫒銆?/p>
-
閲嶆柊鎸傝浇锛氫负浜嗕娇
/etc/fstab
鏂囦欢涓殑鎸傝浇淇℃伅鐢熸晥锛屽彲浠ヤ娇鐢ㄤ互涓嬪懡浠ら噸鏂版寕杞芥墍鏈夋枃浠剁郴缁燂細sudo mount -a
瀹屾垚涓婅堪姝ラ鍚庯紝鍒嗗尯灏变細琚垚鍔熸寕杞藉埌鎸囧畾鐨勬寕杞界偣銆?/p>
相关问答