日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux自动挂载fcoe存储,在sdb上挂载USB 设备

發布時間:2023/12/2 linux 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux自动挂载fcoe存储,在sdb上挂载USB 设备 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在主機上掛載 USB 設備后我們查看系統當前磁盤設備:

1.?[root@FCoE ~]# fdisk -l

2.

3.?Disk /dev/sda: 43.0 GB, 42991616000 bytes

4.?255 heads, 63 sectors/track, 5226 cylinders

5.?Units = cylinders of 16065 * 512 = 8225280 bytes

6.?Sector size (logical/physical): 512 bytes / 512 bytes

7.?I/O size (minimum/optimal): 512 bytes / 512 bytes

8.?Disk identifier: 0x00032735

9.

10.?? Device Boot????? Start???????? End????? Blocks?? Id? System

11.?/dev/sda1?? *?????????? 1????????? 17????? 131072?? 83? Linux

12.?Partition 1 does not end on cylinder boundary.

13.?/dev/sda2????????????? 17???????? 147???? 1048576?? 82? Linux swap / Solaris

14.?Partition 2 does not end on cylinder boundary.

15.?/dev/sda3???????????? 147??????? 5227??? 40803328?? 83? Linux

16.

17.?Disk /dev/sdb: 2147 MB, 2147483648 bytes

18.?255 heads, 63 sectors/track, 261 cylinders

19.?Units = cylinders of 16065 * 512 = 8225280 bytes

20.?Sector size (logical/physical): 512 bytes / 512 bytes

21.?I/O size (minimum/optimal): 512 bytes / 512 bytes

22.?Disk identifier: 0x00000000

23.

24.?Disk /dev/sdb doesn't contain a valid partition table

ocp認證在新分區 sdb1 上創建文件系統:

1.?[root@FCoE ~]# mkfs.ext3 /dev/sdb1

2.?mke2fs 1.41.12 (17-May-2010)

3.?Filesystem label=

4.?OS type: Linux

5.?Block size=4096 (log=2)

6.?Fragment size=4096 (log=2)

7.?Stride=0 blocks, Stripe width=0 blocks

8.?131072 inodes, 524112 blocks

9.?26205 blocks (5.00%) reserved for the super user

10.?First data block=0

11.?Maximum filesystem blocks=536870912

12.?16 block groups

13.?32768 blocks per group, 32768 fragments per group

14.?8192 inodes per group

15.?Superblock backups stored on blocks:

16.??????? 32768, 98304, 163840, 229376, 294912

17.

18.?Writing inode tables: done

19.?Creating journal (8192 blocks): done

20.?Writing superblocks and filesystem accounting information: done

21.

22.?This filesystem will be automatically checked every 24 mounts or

23.?180 days, whichever comes first.? Use tune2fs -c or -i to override.

ocp認證掛載新的文件系統:

1.?[root@FCoE ~]# mount /dev/sdb1 /mnt/

ocp認證通常我們通過備份硬盤的 MBR 來備份硬盤分區表:

1.?[root@FCoE ~]# dd if=/dev/sda of=/mnt/sda.mbr bs=512 count=1

2.?1+0 records in

3.?1+0 records out

4.?512 bytes (512 B) copied, 0.000777948 s, 658 kB/s

ocp認證現在我們來寫零硬盤分區表來實現類似分區表被破壞的結果:

1.?[root@FCoE ~]# dd if=/dev/zero of=/dev/sda bs=1 count=64 skip=446 seek=446

2.?64+0 records in

3.?64+0 records out

4.?64 bytes (64 B) copied, 0.00160668 s, 39.8 kB/s

ocp認證查詢硬盤 sda 上的分區信息,發現其已不包含任何分區: 1.?[root@FCoE ~]# fdisk -l?? 2.? 3.?Disk /dev/sda: 43.0 GB, 42991616000 bytes?? 4.?255 heads, 63 sectors/track, 5226 cylinders?? 5.?Units = cylinders of 16065 * 512 = 8225280 bytes?? 6.?Sector size (logical/physical): 512 bytes / 512 bytes?? 7.?I/O size (minimum/optimal): 512 bytes / 512 bytes?? 8.?Disk identifier: 0x00032735?? 9.? 10.?? Device Boot????? Start???????? End????? Blocks?? Id? System?? 11.? 12.?Disk /dev/sdb: 2147 MB, 2147483648 bytes?? 13.?255 heads, 63 sectors/track, 261 cylinders?? 14.?Units = cylinders of 16065 * 512 = 8225280 bytes?? 15.?Sector size (logical/physical): 512 bytes / 512 bytes?? 16.?I/O size (minimum/optimal): 512 bytes / 512 bytes?? 17.?Disk identifier: 0xcdd48395?? 18.? 19.?? Device Boot????? Start???????? End????? Blocks?? Id? System?? 20.?/dev/sdb1?????????????? 1???????? 261???? 2096451?? 83? Linux? 當主機硬盤分區表丟失了之后,再次啟動后 GRUB 會因找不到配置文件而進入命令行模式。

總結

以上是生活随笔為你收集整理的linux自动挂载fcoe存储,在sdb上挂载USB 设备的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。