Linux掛載硬盤后端開發(fā)
導(dǎo)讀:后端開發(fā)后端開發(fā) 使用虛擬機(jī)時(shí)發(fā)現(xiàn)磁盤空間不夠了,需要掛載一個(gè)磁盤以供繼續(xù)使用,但是磁盤不是添加就可以使用的,還需要進(jìn)行[v_notice]一、添加磁盤[/v_notice]添網(wǎng)站seo優(yōu)化課程公司網(wǎng)站建設(shè)。
使用虛擬機(jī)時(shí)發(fā)現(xiàn)磁盤空間不夠了,需要掛載一個(gè)磁盤以供繼續(xù)使用,但是磁盤不是添加就可以使用的,還需要進(jìn)行
[v_notice]一、添加磁盤[/v_notice]
添加加新硬盤重啟服務(wù)器
添加完之后就可以重啟機(jī)器了,如果你機(jī)器是開啟的,進(jìn)入系統(tǒng)并不能看見你剛添加的那塊磁盤,只有等系統(tǒng)重啟,重新加載之后才會顯示安裝的那塊磁盤
[v_notice]二、進(jìn)入系統(tǒng)[/v_notice]
使用root用戶進(jìn)入系統(tǒng)
[v_notice]三、 查看硬盤信息[/v_notice]
[root@localhost ~]# fdisk -l //磁盤命令 Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c4cb5 Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 2611 20458496 8e Linux LVM Disk /dev/sdb: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd0f5c869 Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux Disk /dev/sdc: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000可以看到這臺機(jī)器加載了三個(gè)磁盤sda、sdb、sdc 其中sda是初始磁盤,sdb已經(jīng)初始化且經(jīng)過使用,sdc是剛剛加載的,未格式化的新磁盤
[v_notice]四、創(chuàng)建新硬盤分區(qū)[/v_notice]
[root@localhost ~]# fdisk /dev/sdc #進(jìn)入磁盤 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x45a3cadb. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): m Command action a toggle a bootable flag #設(shè)定可啟動標(biāo)記 b edit bsd disklabel c toggle the dos compatibility flag d delete a partition #刪除一個(gè)分區(qū) l list known partition types #各分區(qū)類型所對應(yīng)的ID m print this menu #菜單 n add a new partition #添加一個(gè)分區(qū) o create a new empty DOS partition table p print the partition table #顯示該磁盤下的當(dāng)前分區(qū)信息 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)關(guān)鍵詞標(biāo)簽: 暫無
聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-28 ,文章Linux掛載硬盤后端開發(fā)主要講述暫無網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_11501.html
為你推薦與Linux掛載硬盤后端開發(fā)相關(guān)的文章
-
通王TWCMS 2.0.3網(wǎng)站模板程序下載
(126)人喜歡 2024-01-15 -
Windows官方原版在哪里下載
(175)人喜歡 2024-01-15 -
WordPress網(wǎng)站模板發(fā)帖標(biāo)題顏色設(shè)置
(131)人喜歡 2024-01-07 -
修改discuz論壇帖子標(biāo)題80字符的長度限制
(249)人喜歡 2024-01-07 -
wordpress程序調(diào)用不帶超鏈接的Tag標(biāo)簽
(234)人喜歡 2024-01-05 -
網(wǎng)站在不同時(shí)期需調(diào)整內(nèi)容更新的方向
(112)人喜歡 2023-08-12