问题描述
我承认我不是 Linux 方面的专家,但我整天都在谷歌上搜索,并认为我对这应该如何进行有很好的理解。
我有一个 RHEL 6.9 VM,我增加了 VM 上的磁盘大小。
在 Linux 中,因为是 ext4 我需要先增加分区的大小,然后是文件系统。 从我读到的这个坏魔术错误通常意味着它是一个 xfs 文件系统,而不是一个 ext4,但在我的 fstab 中它显然是一个 ext4。有什么建议吗,还是我的做法全错了?
谢谢
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_odinb-lv_root
50G 29G 18G 62% /
tmpfs 32G 80K 32G 1% /dev/shm
/dev/vdc1 917G 247G 624G 29% /arcdata
/dev/vda1 477M 153M 299M 34% /boot
/dev/mapper/vg_odinb-lv_home
378G 16G 343G 5% /home
/dev/vdb1 459G 459G 0 100% /odata
umount /dev/vdb1
fdisk /dev/vdb
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): p
disk /dev/vdb: 2000.0 GB,2000000385024 bytes
255 heads,63 sectors/track,243152 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: 0x000bb98e
Device Boot Start End Blocks Id System
/dev/vdb1 1 60789 488281088 83 Linux
Command (m for help): d
Selected partition 1
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-243152,default 1):
Using default value 1
Last cylinder,+cylinders or +size{K,M,G} (1-243152,default 243152):
Using default value 243152
Command (m for help): p
disk /dev/vdb: 2000.0 GB,243152 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: 0x000bb98e
Device Boot Start End Blocks Id System
/dev/vdb1 1 243152 1953118408+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
resize2fs /dev/vdb1
resize2fs 1.41.12 (17-May-2010)
resize2fs: Bad magic number in super-block while trying to open /dev/vdb1
Couldn't find valid filesystem superblock.
vi /etc/fstab
/dev/mapper/vg_odinb-lv_root / ext4 defaults 1 1
UUID=d4abe2e1-eac8-4eda-9ef7-b8306d1e6ece /arcdata ext4 defaults 1 2
UUID=34761c97-7977-4bb7-b31d-f626cfaa410d /boot ext4 defaults 1 2
/dev/mapper/vg_odinb-lv_home /home ext4 defaults 1 2
UUID=62a6ec80-67a7-4594-8974-5be62a9795af /odata ext4 defaults 1 2
/dev/mapper/vg_odinb-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)