今天在测试一款云主机产品(其实就是VPS),国内喜欢偷换概念卖产品……
云主机可以安装Windows2003与CentOS6.2系统,在测试的过程中我将Windows2003系统切换至CentOS6.2系统后发现110G的数据盘丢失了……
这是个神奇的事情,本想直接让客服来搞,想想有时间就自己看了下,把数据盘都弄出来了。
过程如下:
[root@localhost ~]# df -h
- 文件系统 容量 已用 可用 已用%% 挂载点
- /dev/mapper/VolGroup-lv_root
- 7.5G 1.2G 5.9G 17% /
- tmpfs 2.5G 0 2.5G 0% /dev/shm
- /dev/sda1 485M 65M 395M 14% /boot
[root@localhost ~]# ll /dev/sd*
- brw-rw---- 1 root disk 252, 0 11月 8 12:55 /dev/sda
- brw-rw---- 1 root disk 252, 1 11月 8 12:55 /dev/sda1
- brw-rw---- 1 root disk 252, 2 11月 8 12:55 /dev/sda2
- brw-rw---- 1 root disk 252, 16 11月 8 12:55 /dev/sdb
[root@localhost ~]# 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 0xadb9341e.
- 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').
- Command (m for help): p
- Disk /dev/sdb: 118.1 GB, 118111600640 bytes
- 16 heads, 63 sectors/track, 228855 cylinders
- Units = cylinders of 1008 * 512 = 516096 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0xadb9341e
- Device Boot Start End Blocks Id System
- Command (m for help): new
- Command action
- e extended
- p primary partition (1-4)
- p
- Partition number (1-4): 1
- First cylinder (1-228855, default 1):
- Using default value 1
- Last cylinder, +cylinders or +size{K,M,G} (1-228855, default 228855):
- Using default value 228855
- Command (m for help): p
- Disk /dev/sdb: 118.1 GB, 118111600640 bytes
- 16 heads, 63 sectors/track, 228855 cylinders
- Units = cylinders of 1008 * 512 = 516096 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0xadb9341e
- Device Boot Start End Blocks Id System
- /dev/sdb1 1 228855 115342888+ 83 Linux
- Command (m for help): w
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- Syncing disks.
[root@localhost ~]# mkfs -t ext3 /dev/sdb1
- mke2fs 1.41.12 (17-May-2010)
- 文件系统标签=
- 操作系统:Linux
- 块大小=4096 (log=2)
- 分块大小=4096 (log=2)
- Stride=0 blocks, Stripe width=0 blocks
- 7208960 inodes, 28835722 blocks
- 1441786 blocks (5.00%) reserved for the super user
- 第一个数据块=0
- Maximum filesystem blocks=0
- 880 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, 2654208,
- 4096000, 7962624, 11239424, 20480000, 23887872
- 正在写入inode表: 完成
- Creating journal (32768 blocks): 完成
- Writing superblocks and filesystem accounting information: 完成
- This filesystem will be automatically checked every 39 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# mkdir /data
[root@localhost ~]# mount -t ext3 /dev/sdb1 /data
[root@localhost ~]# df -h
- 文件系统 容量 已用 可用 已用%% 挂载点
- /dev/mapper/VolGroup-lv_root
- 7.5G 1.2G 5.9G 17% /
- tmpfs 2.5G 0 2.5G 0% /dev/shm
- /dev/sda1 485M 65M 395M 14% /boot
- /dev/sdb1 109G 188M 103G 1% /data
[root@localhost ~]# echo "/dev/sda1 /data ext3 defaults 0 0">>/etc/fstab