ubuntu系统操作以及软件安装

ubuntu 20.04新硬盘添加(Dell T630)2020

2020-12-21  本文已影响0人  土雕艺术家

硬盘插入工作站以后,需要先创建虚拟硬盘选择raid。
推荐参考:
https://blog.csdn.net/linkequa/article/details/103099032

按照图片顺序进行操作创建raid
开机过程中进入system setting
图中我已经选择F2


图片.png 图片.png 图片.png

进入以后有创建新raid选择,创建过程可以选择新的物理硬盘

进入系统加载挂载硬盘流程:

1.安装新硬盘并查看
2.硬盘格式化
3.挂载硬盘
4.自动挂载硬盘

系统加载挂载硬盘操作

1-查看新硬盘

显示新硬盘信息

sudo  fdisk  -l

Disk /dev/sdc: 14.57 TiB, 16000363790336 bytes, 31250710528 sectors
Disk model: PERC H730 Adp
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

删除分区,旧硬盘参考使用


fdisk /dev/sdb
欢迎使用 fdisk (util-linux 2.23.2)。

更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。

命令(输入 m 获取帮助):m
命令操作
   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)

2-格式化成xfs文件系统

xfs文件系统参考
https://www.jianshu.com/p/e7485d3ecae1

#参考命令
#-t选择不同的文件系统
#sudo mkfs -t ext4 /dev/sdc
#sudo mkfs -t xfs /dev/sdc

将硬盘格式化成xfs文件系统

sudo mkfs.xfs -f /dev/sdc
animal1@animalia:~$ sudo mkfs.xfs /dev/sdc
meta-data=/dev/sdc               isize=512    agcount=15, agsize=268435455 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=3906338816, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

查看未挂载的文件系统类型
查看/dev/sdc文件系统情况

lsblk -f
NAME   FSTYPE   LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sdb    ext4           25b1aeb1-8941-4b6f-8ebf-d439c05206fa  668.5G    89% /mnt/sdb
sdc    xfs            1f69bec6-8cdd-4e51-ae1c-076458ad88a1

3-创建&挂载目录

创建挂载目录

sudo mkdir /mnt/sdc
sudo mount /dev/sdc /mnt/sdc

查看已经挂载的分区和文件系统类型。

df -T 
Filesystem     Type       1K-blocks        Used   Available Use% Mounted on
/dev/sdb       ext4     11624913376 10338022664   700956276  94% /mnt/sdb
/dev/sdc       xfs      15623268352   108961224 15514307128   1% /mnt/sdc

查看文件系统磁盘使用情况统计

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb         11T  9.7T  669G  94% /mnt/sdb
/dev/sdc         15T  104G   15T   1% /mnt/sdc

4-自动挂载

为了让机器重启时也可以自动挂载,需要配置/etc/fstab文件

sudo vim /etc/fstab
#按insert在最后一行添加插入内容
/dev/sdc /mnt/sdc xfs defaults 0 0
#输入完成后按esc 
#保存并退出
: wq!
图片.png

参考
https://www.cnblogs.com/journeyonmyway/p/11089056.html
https://blog.51cto.com/12348890/20923

上一篇 下一篇

猜你喜欢

热点阅读