Operating System - Linux
1823749 Members
3755 Online
109664 Solutions
New Discussion юеВ

Creating a partition after Array/Logical Drive expansion.

 
Sean Smykes
New Member

Creating a partition after Array/Logical Drive expansion.

Hi,
I'm new to Linux so please be patient....

I had a 3 disk RAID5 array with one logical drive on an HP Proliant DL380 G4 with a Smart Array 6i controller. The OS is Red Hat Ent 3.

I need more space and added two additional drives to the array and then expanded the logical volume as HP support instructed me to do. The volume size increased just fine. Now parted and fdisk both see the additional space. I would like to create another partition out of the free space and mount it as say /backup. However when I try to create a partition with parted I get:
"Warning: Unable to align partition properly. This probably means that another
partitioning tool generated an incorrect partition table, because it didn't have
the correct BIOS geometry. It is safe to ignore,but ignoring may cause
(fixable) problems with some boot loaders."

So I cancel. Then I attempt to create an additional partition with fdisk and get:
"No free sectors available"

Aside from backing up the data and re-formatting does anyone know a way for me to mount a partition using the additional space?

At this point HP support said I needed to contact Red Hat for help. As you can imagine we don't have a support contract with them. So thats why I'm posting here.

Thanks for your help.
-Sean
2 REPLIES 2
Ivan Ferreira
Honored Contributor

Re: Creating a partition after Array/Logical Drive expansion.

This is a test I did in a "test" machine. It worked correctly, but you must take in account:

- It was a test machine.
- It was a virtual machine (vmware).
- The partition table type was msdos (not GPT).
- The file system was ext3.
- LVM was not used.

* List /dev/sdb geometry

# fdisk -l /dev/sdb

Disco /dev/sdb: 1073 MB, 1073741824 bytes
255 cabezas, 63 sectores/pista, 130 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Boot Start End Blocks Id System
/dev/sdb1 1 130 1044193+ 83 Linux

* List the file system in sdb1, 1GB.

# df -h /d1
S.ficheros Tama├Г ├В┬▒o Usado Disp Uso% Montado en
/dev/sdb1 1004M 54M 899M 6% /d1

* Virtual Machine powered off

* LUN resize

vmware-vdiskmanager -x 1500MB SAN.vmdk

* Power on Virtual Machine

* With fdisk, check the new disk geometry. The old partition was deleted, and a new partition, with the same number, and the same start cylinder was created.

# fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 1572 MB, 1572864000 bytes
255 heads, 63 sectors/track, 191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 130 1044193+ 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-191, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-191, default 191):
Using default value 191

Command (m for help): p

Disk /dev/sdb: 1572 MB, 1572864000 bytes
255 heads, 63 sectors/track, 191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 191 1534176 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

* Resize file system

# fsck -f /dev/sdb1
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 12/130560 files (8.3% non-contiguous), 17870/261048 blocks


# resize2fs /dev/sdb1
resize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/sdb1 to 383544 (4k) blocks.
The filesystem on /dev/sdb1 is now 383544 blocks long.


* Check new size. Data available.

# df -h /d1
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 1.5G 55M 1.4G 4% /d1
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Karthikeyan.j
Frequent Advisor

Re: Creating a partition after Array/Logical Drive expansion.

Hi Sean

I understood ur problem
But im bit confused about your raid confiuration pls tell is it u have three disks with raid 5 and other 2 disks as raid 0+1 or Raid 5 ?
If its either of the two
U can check while booting the servers ie in the bios boot screen it shows as 2 logical drives or 1 Logical drives .

after the server boot
run this command dmesg | grep c0d* as root and check for two raid containers as
/dev/cciss/c0d0 and /dev/cciss/c0d1
then run fdisk -l /dev/cciss/c0d1 and check the space of the disk .
if it is raid 0+1 it should newdisks total size dived by two it is mirrored and now u can proceed with
1)fdsik /dev/cciss/c0d1
2) p prints the current available partitions on the disk.
3) n creates a new partition
4) p or e ie primary or extedned
5) choose p
6) default start cylinder values select it
7) and at end of cylinder +sizeM and enter
8)create as many partitions u want to create by using again n
after all this run w writes to the disk
(dont worry u can q quit without changes if u have not sure )
11) fdisk -l /dev/cciss/c0d1 and check for newly created filesystem as /dev/cciss/c0d1p1 and format the newly created file system mkfs.ext3 /dev/cciss/c0d1p1 and mkdir /backup
mount /dev/cciss/c0d0p1 /backup and edit the fstab and add the /dev/cciss/c0d0p1 /backup defaults 1 1
save and exit by :wq
try by df -h
all the best
Regards
Karthik