1. 程式人生 > 資訊 >IC Insights:25 大半導體公司營收年終盤點,AMD 增長率居首

IC Insights:25 大半導體公司營收年終盤點,AMD 增長率居首

centos 磁碟分割槽

Linux 磁碟管理

# 為什麼伺服器中有10塊硬碟,在 linux 系統中顯示少於10塊的情況
答:因為系統盤做了 raid 將幾塊資料盤做成了一塊,用與防止某一塊資料盤損壞導致資料丟失。
	sda sdb sdc sde 指的就是
# 系統分割槽是在作什麼?
答:系統分割槽是指在一塊硬碟中化一個到四個分割槽,類似 windows 中的 C 盤、D盤、 E盤

# 分割槽完成之後 /dev 資料夾下就會多了一個 /sde1 /sde2 /sde3 
# 給磁碟進行分割槽
$ fdisk /dev/sde

Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): m #輸入 m 檢視幫助
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   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  							# 建立主分割槽
Partition type:
   p   primary (2 primary, 0 extended, 2 free)		# 主分割槽最多有四個
   e   extended
Select (default p): p 								# 選擇 p 模式
Partition number (3,4, default 3): 
First sector (734005248-2343174143, default 734005248): 734005248  						# 從指定扇區開始
Last sector, +sectors or +size{K,M,G} (734005248-2343174143, default 2343174143): +300G # 主分割槽大小
Partition 3 of type Linux and of size 300 GiB is set
	
Command (m for help): w  							# 儲存並退出
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
$ lsblk # 檢視磁碟分割槽
[root@controller1 ~]# lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                 8:0    0 558.4G  0 disk 
├─sda1              8:1    0   200M  0 part /boot/efi
├─sda2              8:2    0     1G  0 part /boot
└─sda3              8:3    0 557.2G  0 part 
  ├─centos00-root 253:0    0 553.2G  0 lvm  /
  └─centos00-swap 253:1    0     4G  0 lvm  [SWAP]
sdb                 8:64   0   1.1T  0 disk 
sdc                 8:64   0   1.1T  0 disk 
sdd                 8:64   0   1.1T  0 disk 
sde                 8:64   0   1.1T  0 disk 
├─sde1              8:65   0    50G  0 part  
└─sde2              8:66   0   300G  0 part 
├─sde3              8:65   0    50G  0 part 
└─sde4              8:66   0   300G  0 part 
nvme0n1           259:0    0 745.2G  0 disk 
└─nvme0n1p1       259:1    0 745.2G  0 part