/dev/md0 (RAID 장치) 를 fdisk 로 나누어서 사용가능한가요?
이렇게 software RAID 장치를 구성했습니다.
[root@localhost ~]# more /proc/mdstat
Personalities : [raid0]
read_ahead 1024 sectors
md0 : active raid0
scsi/host0/bus0/target8/lun0/disc[2]
scsi/host0/bus0/target4/lun0/disc[1]
scsi/host0/bus0/target3/lun0/disc[0]
107530752 blocks 32k chunks
unused devices: <none>
[root@localhost ~]#
이 장치를 fdisk 를 이용해 두 개의 파티션으로 나눠쓰려고 일단 나눠 봤습니다.
[root@localhost ~]# fdisk /dev/md0
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.The number of cylinders for this disk is set to 26882688.
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): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-26882688, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-26882688, default 26882688): 13441343Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (13441344-26882688, default 13441344):
Using default value 13441344
Last cylinder or +size or +sizeM or +sizeK (13441344-26882688, default 26882688):
Using default value 26882688Command (m for help): p
Disk /dev/md0: 2 heads, 4 sectors, 26882688 cylinders
Units = cylinders of 8 * 512 bytesDevice Boot Start End Blocks Id System
/dev/md0p1 1 13441343 53765370 83 Linux
/dev/md0p2 13441344 26882688 53765380 83 LinuxCommand (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.
[root@localhost ~]#
여기까진 잘 되는것 처럼 보입니다만 정작 중요한 /dev/md0p1 과 /dev/md0p2 장치가 없어서 mkfs 를 할 수가 없군요. 리부트도 해봤지만 역시 해당 장치파일은 생성되어 있지 않았구요.
이런 방법이 가능한 겁니까? 생각만으로는 될 것 같은데 잘 안되는 군요.
혹시 이런 시도를 해 본분 계시면 도움을 부탁드립니다.
생각을 조금 다르게 접근하시는게...
software RAID 자체가 파티션된 것들을 가지고 구성하는 것인데
이것을 다시 파티셔닝 할 필요가 있을까요???
정 원하신다면 구성하기전에 fd 형식의 파티션을 여러개로 나눠서
md 장치를 여러개 만드시면 결과물은 질문자님의 의도와 같으리라 판단 됩니다.
댓글 달기