一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

Linux|Centos|Ubuntu|系統(tǒng)進(jìn)程|Fedora|注冊(cè)表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務(wù)器之家 - 服務(wù)器系統(tǒng) - Solaris - Ubuntu服務(wù)器掛載新硬盤的步驟

Ubuntu服務(wù)器掛載新硬盤的步驟

2023-05-08 22:02未知服務(wù)器之家 Solaris

最近公司新購了一臺(tái)戴爾R720的服務(wù)器,昨天u盤安裝ubuntu系統(tǒng)后,首先要做的就是把另外兩個(gè)raid設(shè)備掛載到服務(wù)器。現(xiàn)在在虛擬機(jī)中用root用戶操作,掛載的具體步驟如下。 1、測(cè)試硬盤是否已連接 首先先查看硬盤信息。sda是虛擬的

Ubuntu服務(wù)器掛載新硬盤的步驟

最近公司新購了一臺(tái)戴爾R720的服務(wù)器,昨天u盤安裝ubuntu系統(tǒng)后,首先要做的就是把另外兩個(gè)raid設(shè)備掛載到服務(wù)器。現(xiàn)在在虛擬機(jī)中用root用戶操作,掛載的具體步驟如下。

1、測(cè)試硬盤是否已連接

首先先查看硬盤信息。sda是虛擬的第一塊硬盤,sdb是第二塊硬盤,以此類推。


root@zhang:~# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 2013-08-13 08:33 /dev/sda
brw-rw---- 1 root disk 8, 1 2013-08-13 08:33 /dev/sda1
brw-rw---- 1 root disk 8, 2 2013-08-13 08:33 /dev/sda2
brw-rw---- 1 root disk 8, 5 2013-08-13 08:33 /dev/sda5
brw-rw---- 1 root disk 8, 16 2013-08-13 08:33 /dev/sdb

#此命令測(cè)試linux系統(tǒng)是否能找到掛載的未分區(qū)硬盤

root@zhang:~# hdparm -I /dev/sdb

#這個(gè)是未掛載之前的硬盤信息

root@zhang:~# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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: 0x000cf88c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 994 7977984 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 994 1045 407553 5 Extended
/dev/sda5 994 1045 407552 82 Linux swap / Solaris

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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

Disk /dev/sdb doesn\'t contain a valid partition table

2、創(chuàng)建硬盤分區(qū)


root@zhang:~# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xcbd0c60e.
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\').

# 輸入m,查看幫助信息 Command (m for help): m
Command action

a toggle a bootable flag 將分區(qū)設(shè)置為啟動(dòng)區(qū)
b edit bsd disklabel 編輯bsd的disklabel
c toggle the dos compatibility flag 設(shè)置該分區(qū)為dos分區(qū)
d delete a partition 刪除分區(qū)
l list known partition types 列出已知的分區(qū)類型
m print this menu 打印幫助列表
n add a new partition 創(chuàng)建新分區(qū)
o create a new empty DOS partition table
p print the partition table查看分區(qū)信息
q quit without saving changes 退出不保存
s create a new empty Sun disklabel
t change a partition\'s system id改變分區(qū)類型
u change display/entry units
v verify the partition table
w write table to disk and exit 保存退出
x extra functionality (experts only)

#查看sdb這塊硬盤的分區(qū)
Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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: 0xcbd0c60e

Device Boot Start End Blocks Id System

#創(chuàng)建sdb這塊硬盤的分區(qū)

Command (m for help): n
Command action
 e extended
 p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder,  cylinders or  size{K,M,G} (1-1044, default 1044):
Using default value 1044

#查看創(chuàng)建sdb硬盤的分區(qū)

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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: 0xcbd0c60e

Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898  83 Linux

#保存退出,分區(qū)創(chuàng)建結(jié)束。

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

#再用fdisk -l查看硬盤信息就可以看到sdb1新分區(qū)了

root@zhang:~# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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: 0x000cf88c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 994 7977984 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 994 1045 407553 5 Extended
/dev/sda5 994 1045 407552 82 Linux swap / Solaris

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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: 0xcbd0c60e

Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898  83 Linux

3、格式化硬盤


root@zhang:~# mkfs -t ext4 /dev/sdb1
mke2fs 1.41.11 (14-Mar-2010)
文件系統(tǒng)標(biāo)簽=
操作系統(tǒng):Linux
塊大小=4096 (log=2)
分塊大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
524288 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
第一個(gè)數(shù)據(jù)塊=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

正在寫入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

4、給新建的sdb1設(shè)置卷標(biāo)命名,創(chuàng)建掛載點(diǎn)。


root@zhang:~# e2label /dev/sdb1 /data

root@zhang:~# mkdir /data

5、設(shè)置開機(jī)自動(dòng)掛載

在上面一個(gè)步驟中,我已經(jīng)把sdb1這個(gè)分區(qū)重新命名,當(dāng)然也可以在設(shè)置自動(dòng)掛載的時(shí)候用UUID。


root@zhang:~# ls -l /dev/disk/
total 0
drwxr-xr-x 2 root root 280 2013-08-13 08:47 by-id
drwxr-xr-x 2 root root 60 2013-08-13 08:52 by-label
drwxr-xr-x 2 root root 180 2013-08-13 08:47 by-path
drwxr-xr-x 2 root root 100 2013-08-13 08:51 by-uuid

#查看設(shè)置的卷標(biāo)名稱,這里有上一步中命名的分區(qū)/data
root@zhang:~# ls -l /dev/disk/by-label/
total 0
lrwxrwxrwx 1 root root 10 2013-08-13 08:52 \\x2fdata -> ../../sdb1

#查看各個(gè)分區(qū)的uuid號(hào)
root@zhang:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2013-08-13 08:33 b6dbd10c-7995-4b3d-abf0-2da1622298da -> ../../sda1
lrwxrwxrwx 1 root root 10 2013-08-13 08:33 d0d8b0bf-dc99-4d38-937d-f34d88072ce9 -> ../../sda5
lrwxrwxrwx 1 root root 10 2013-08-13 08:52 f90991b0-1082-45d8-b00d-87dceb81115e -> ../../sdb1

#設(shè)置開機(jī)自動(dòng)掛載分區(qū)sdb1

root@zhang:~# vi /etc/fstab

# /etc/fstab: static file system information.
#
# Use \'blkid -o value -s UUID\' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=b6dbd10c-7995-4b3d-abf0-2da1622298da / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=d0d8b0bf-dc99-4d38-937d-f34d88072ce9 none swap sw 0 0
LABEL=/data /data ext4 defaults 0 2
#或者用UUID,效果都是一樣的。
#UUID=f90991b0-1082-45d8-b00d-87dceb81115e /data ext4 defaults 0 2

6、重新啟動(dòng)查看掛載結(jié)果


root@zhang:~# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.5G 1.5G 5.7G 20% /
none 243M 216K 243M 1% /dev
none 247M 0 247M 0% /dev/shm
none 247M 56K 247M 1% /var/run
none 247M 0 247M 0% /var/lock
none 247M 0 247M 0% /lib/init/rw
/dev/sdb1 7.9G 146M 7.4G 2% /data

#掛載成功

西部數(shù)碼(west.cn)是經(jīng)工信部審批,持有ISP、云牌照、IDC、CDN全業(yè)務(wù)資質(zhì)的正規(guī)老牌云服務(wù)商,自成立至今20余年專注于域名注冊(cè)虛擬主機(jī)云服務(wù)器企業(yè)郵箱、企業(yè)建站等互聯(lián)網(wǎng)基礎(chǔ)服務(wù)!
公司自研的云計(jì)算平臺(tái),以便捷高效、超高性價(jià)比、超預(yù)期售后等優(yōu)勢(shì)占領(lǐng)市場(chǎng),穩(wěn)居中國接入服務(wù)商排名前三,為中國超過50萬網(wǎng)站提供了高速、穩(wěn)定的托管服務(wù)!先后獲評(píng)中國高新技術(shù)企業(yè)、中國優(yōu)秀云計(jì)算服務(wù)商、全國十佳IDC企業(yè)、中國最受歡迎的云服務(wù)商等稱號(hào)!
目前,西部數(shù)碼高性能云服務(wù)器正在進(jìn)行特價(jià)促銷,最低僅需48元!
https://www.west.cn/cloudhost/

延伸 · 閱讀

精彩推薦
  • SolarisSolaris設(shè)置ADSL撥號(hào)上網(wǎng)

    Solaris設(shè)置ADSL撥號(hào)上網(wǎng)

    Solaris設(shè)置ADSL撥號(hào)上網(wǎng)...

    Solaris教程網(wǎng)2722019-11-22
  • SolarisSolaris10.0下掛載光驅(qū)

    Solaris10.0下掛載光驅(qū)

    Solaris10.0下掛載光驅(qū)...

    Solaris教程網(wǎng)3882019-11-07
  • SolarisSolaris中對(duì)tar.z進(jìn)行安裝卸載詳解

    Solaris中對(duì)tar.z進(jìn)行安裝卸載詳解

    今天小編將要為大家?guī)淼氖荢olaris中對(duì)tar.z進(jìn)行安裝卸載詳解!希望對(duì)大家會(huì)有幫助!有需要的朋友一起去看看吧 ...

    sanyao12074912019-11-06
  • SolarisSolaris 基礎(chǔ)知識(shí)

    Solaris 基礎(chǔ)知識(shí)

    1. Q: Solaris 的系統(tǒng)配置文件一般在什么地方? A: 可以查看/etc/system文件,里面有一些solaris啟動(dòng)時(shí)默認(rèn)加載的選項(xiàng),包括 共享內(nèi)存大小等的設(shè)置。 2. Q: 在sol...

    Solaris教程網(wǎng)3272019-11-20
  • SolarisSolaris8安裝OPENSSH方法

    Solaris8安裝OPENSSH方法

    Solaris8安裝OPENSSH方法...

    Solaris教程網(wǎng)4112019-11-19
  • Solarissolaris下VNC的安裝方法

    solaris下VNC的安裝方法

    solaris下VNC的安裝方法,有需要的朋友可以參考一下。 ...

    solaris教程網(wǎng)6232019-11-19
  • SolarisSolaris系統(tǒng)下配置MPXIO

    Solaris系統(tǒng)下配置MPXIO

    用的LSI的存儲(chǔ) 和普安的存儲(chǔ) SUN V245平臺(tái)+LPE11002 或者Qlogic QLE2460 環(huán)境SUN的V245 +LSI 3994 想測(cè)試下 LSI的存儲(chǔ)在Solaris下的路徑冗余,因?yàn)橛肔SI帶的RDAC裝完系統(tǒng)就...

    Solaris教程網(wǎng)3952019-11-11
  • SolarisSolaris系統(tǒng)硬盤分區(qū)知識(shí)

    Solaris系統(tǒng)硬盤分區(qū)知識(shí)

    Solaris 下,一個(gè)磁盤包含8個(gè)分區(qū),標(biāo)記為0-7。此信息可以通過format命令,然后選擇一個(gè)硬盤來看到,例如,在我自己的系統(tǒng)中(Solaris9,Ultra60),顯示出來的信...

    Solaris教程網(wǎng)6252019-11-18
主站蜘蛛池模板: 激情小说欧美图片 | 亚洲日本aⅴ片在线观看香蕉 | 情趣内衣情趣玩具play | 国产一区二区在线免费观看 | 久久精品国产欧美日韩99热 | www黄| 99久久精品久久久久久清纯 | 国产综合欧美日韩视频一区 | 精品国产品香蕉在线观看 | 给我视频免费看 | 黄色aaa级片 | 亚洲国产综合另类视频 | 国产精品videosse | 美女吃jj| 亚洲第一色网 | 国模娜娜一区二区三区 | 国产va免费精品高清在线 | 热久久最新地址 | 成人夜视频寂寞在线观看 | 91正在 播放 | 交换性关系中文字幕6 | 无码一区二区三区视频 | 精品AV综合导航 | va在线视频| chinese456老年gay china外卖员gay帮口 | 楚乔传第二部全60集免费观看 | 岛国在线播放v片免费 | 国产成人精品曰本亚洲77美色 | 日本福利片国产午夜久久 | 色综合视频在线观看 | 亚洲精品 欧美 | 精品人人做人人爽久久久 | 狠狠色成人综合 | 女同色图 | 久久99r66热这里只有精品 | 小早川怜子亚洲综合中文字幕 | 亚洲www美色 | 天堂网在线.www天堂在线视频 | 欧美腐剧mm在线观看 | 日本一区二区精品88 | 人人爽人人草 |