免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1116 | 回复: 8
打印 上一主题 下一主题

RedHat AS4逻辑卷和裸设备求救!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-16 17:43 |只看该作者 |倒序浏览
本地磁盘
[root@shpx1 ~]# fdisk -l /dev/cciss/c0d0

Disk /dev/cciss/c0d0: 72.8 GB, 72833679360 bytes
255 heads, 63 sectors/track, 8854 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

          Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          33      265041   83  Linux
/dev/cciss/c0d0p2              34        2644    20972857+  8e  Linux LVM
/dev/cciss/c0d0p3            2645        5255    20972857+  8e  Linux LVM
/dev/cciss/c0d0p4            5256        8854    28908967+   5  Extended
/dev/cciss/c0d0p5            5256        6560    10482381   8e  Linux LVM
/dev/cciss/c0d0p6            6561        7865    10482381   8e  Linux LVM
[root@shpx1 ~]#

共享磁盘
[root@shpx1 ~]# fdisk -l /dev/cciss/c0d1

Disk /dev/cciss/c0d1: 218.5 GB, 218513571840 bytes
255 heads, 63 sectors/track, 26566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

          Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1   *           1          33      265041   8e  Linux LVM
/dev/cciss/c0d1p2              34          66      265072+  8e  Linux LVM
/dev/cciss/c0d1p3              67       26566   212861250   8e  Linux LVM
[root@shpx1 ~]#


[root@shpx1 dev]# pvscan
  PV /dev/cciss/c0d1p1   VG datavg   lvm2 [256.00 MB / 256.00 MB free]
  PV /dev/cciss/c0d1p2   VG datavg   lvm2 [256.00 MB / 256.00 MB free]
  PV /dev/cciss/c0d1p3   VG datavg   lvm2 [202.97 GB / 202.97 GB free]
  PV /dev/cciss/c0d0p2   VG rootvg   lvm2 [20.00 GB / 0    free]
  PV /dev/cciss/c0d0p3   VG rootvg   lvm2 [20.00 GB / 0    free]
  PV /dev/cciss/c0d0p5   VG rootvg   lvm2 [9.97 GB / 9.97 GB free]
  PV /dev/cciss/c0d0p6   VG rootvg   lvm2 [9.97 GB / 9.97 GB free]
  Total: 7 [263.41 GB] / in use: 7 [263.41 GB] / in no VG: 0 [0   ]
[root@shpx1 dev]#

以上是我系统的情况

论坛徽章:
0
2 [报告]
发表于 2005-09-16 17:48 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

现在我疑惑的情况是:
在我们的/dev的目录下,有rootvg的目录,但是没有datavg的目录。
在/dev/cciss目录下,都是块设备的文件,没有字符设备的文件。
[root@shpx1 cciss]# ls -l
鎬荤敤閲?0
brw-------  1 root root 104,  0 2005-09-17  c0d0
brw-------  1 root root 104,  1 2005-09-17  c0d0p1
brw-------  1 root root 104,  2 2005-09-17  c0d0p2
brw-------  1 root root 104,  3 2005-09-17  c0d0p3
brw-------  1 root root 104,  4 2005-09-17  c0d0p4
brw-------  1 root root 104,  5 2005-09-17  c0d0p5
brw-------  1 root root 104,  6 2005-09-17  c0d0p6
brw-------  1 root root 104, 16 2005-09-17  c0d1
brw-------  1 root root 104, 17 2005-09-17  c0d1p1
brw-------  1 root root 104, 18 2005-09-17  c0d1p2
brw-------  1 root root 104, 19 2005-09-17  c0d1p3
[root@shpx1 cciss]#


我现在想在c0d1p3上使用fdisk进一步的划分,但是在w的时候,出现如下的提示:
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: 无效的参数.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

最后看的时候,是增加上了,但是在dev中却没有设备和其对应

论坛徽章:
0
3 [报告]
发表于 2005-09-16 21:20 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

The new table will be used at the next reboot

提示要重新启动才能利用新的分区表,如果是热插拔的硬盘,热插拔一下也可以

可以用vgdisplay 看看datavg在dev下的路径是什么

论坛徽章:
0
4 [报告]
发表于 2005-09-16 23:56 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

是不是用vgmknodes将datavg的目录建在别的地方了!
至于/dev/cciss中无字符文件,我也不知道为什么!!
/dev/cciss/c0d1p3已经是218.5GB那个Raid的第三个分区了呀!!还能用fdisk怎么分呀??

论坛徽章:
0
5 [报告]
发表于 2005-09-17 10:38 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

vgdisplay显示的结果如下,没有指明在哪个目录下
[root@shpx1 ~]# vgdisplay
--- Volume group ---
VG Name               datavg
System ID
Format                lvm2
Metadata Areas        3
Metadata Sequence No  1
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                3
Act PV                3
VG Size               203.47 GB
PE Size               32.00 MB
Total PE              6511
Alloc PE / Size       0 / 0
Free  PE / Size       6511 / 203.47 GB
VG UUID               7FtsI5-5mEz-XP91-uipq-mLzX-Ldoj-PIKtpI

--- Volume group ---
--- Volume group ---
VG Name               rootvg
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  8
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                7
Open LV               7
Max PV                0
Cur PV                4
Act PV                4
VG Size               59.94 GB
PE Size               32.00 MB
Total PE              1918
Alloc PE / Size       1280 / 40.00 GB
Free  PE / Size       638 / 19.94 GB
VG UUID               2SnTEB-sXfp-7t7n-8iPI-EE1l-O13z-N8hBOr

[root@shpx1 ~]#

论坛徽章:
0
6 [报告]
发表于 2005-09-17 10:42 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

原帖由 "zlg88" 发表:
是不是用vgmknodes将datavg的目录建在别的地方了!
至于/dev/cciss中无字符文件,我也不知道为什么!!
/dev/cciss/c0d1p3已经是218.5GB那个Raid的第三个分区了呀!!还能用fdisk怎么分呀??


可以再使用fdisk进行划分的

[root@shpx1 ~]# fdisk /dev/cciss/c0d0p3

The number of cylinders for this disk is set to 5140.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/cciss/c0d0p3: 21.4 GB, 21476206080 bytes
255 heads, 32 sectors/track, 5140 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

            Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p3p1               1         480     1958384   da  Non-FS data

Command (m for help):

论坛徽章:
0
7 [报告]
发表于 2005-09-17 16:25 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

搞定了

论坛徽章:
5
荣誉会员
日期:2011-11-23 16:44:17CU大牛徽章
日期:2013-09-18 15:15:15CU大牛徽章
日期:2013-09-18 15:15:45未羊
日期:2014-02-25 14:37:19射手座
日期:2014-12-26 22:55:37
8 [报告]
发表于 2005-09-19 14:18 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

关于字符设备,LINUX和普通UNIX不同,不是会自动在/dev下面为磁盘绕过文件系统CACHE的字符设备。你需要用raw这个东西来绑定块设备到/dev/raw/raw*那样的字符设备。有点麻烦。

论坛徽章:
0
9 [报告]
发表于 2005-09-20 01:02 |只看该作者

RedHat AS4逻辑卷和裸设备求救!!

呵呵,搞错了,应该是lvdisplay
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP