Chinaunix首页 | 论坛 | 博客
  • 博客访问: 321621
  • 博文数量: 50
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1387
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-24 10:12
文章分类
文章存档

2014年(18)

2013年(32)

分类: 网络与安全

2014-02-18 15:49:51

在http://blog.csdn.net/tianlesoftware/article/details/8594958看到一种解决方法,但是不行!

我的方法如下:

先看环境:
1
2
3
4
5
6
7
8
9
10
11
    
[root@centos-fuwenchao data]# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x0004b51e
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1275    10240000   83  Linux
/dev/sda2            1275        1536     2095104   82  Linux swap / Solaris
/dev/sda3            1536        6528    40092672   83  Linux

----
1
2
3
4
5
    
[root@centos-fuwenchao ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.7G  4.6G  4.6G  51% /
tmpfs                 935M  228K  935M   1% /dev/shm
/dev/sr0              4.1G  4.1G     0 100% /media/CentOS_6.4_Final

没有看到/dev/sda3,以为是该分区上没有文件系统造成
1
2
3
    
[root@centos-fuwenchao ~]# mke2fs -t ext4 /dev/sda3
mke2fs 1.41.12 (17-May-2010)
/dev/sda3 is apparently in use by the system; will not make a filesystem here!

--
1
2
3
4
5
    
[root@centos-fuwenchao ~]# umount /dev/sda3
umount: /dev/sda3: not mounted
[root@centos-fuwenchao ~]# mkfs.ext4  /dev/sda3
mke2fs 1.41.12 (17-May-2010)
/dev/sda3 is apparently in use by the system; will not make a filesystem here!

---
1
2
3
4
5
    
[root@centos-fuwenchao ~]# dmsetup status
No devices found
[root@centos-fuwenchao ~]#  mkfs.ext4  /dev/sda3
mke2fs 1.41.12 (17-May-2010)
/dev/sda3 is apparently in use by the system; will not make a filesystem here!

想到系统在很久以前在该分区上做过一次DRBD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    
[root@centos-fuwenchao data]# service drbd stop
Stopping all DRBD resources: .
[root@centos-fuwenchao data]# mke2fs -t ext3 /dev/sda3
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2506752 inodes, 10023168 blocks
501158 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
306 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
Writing inode tables: done                          
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@centos-fuwenchao data]#
--
1
2
3
4
5
6
7
8
9
10
    
[root@centos-fuwenchao mntsda3]# mount /dev/sda3 .
[root@centos-fuwenchao mntsda3]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.7G  4.6G  4.7G  50% /
tmpfs                 935M  228K  935M   1% /dev/shm
/dev/sr0              4.1G  4.1G     0 100% /media/CentOS_6.4_Final
/dev/sda3              38G  176M   36G   1% /mnt/mntsda3
[root@centos-fuwenchao mntsda3]# pwd
/mnt/mntsda3
[root@centos-fuwenchao mntsda3]#
阅读(6743) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~