Original Publish Date - September 5, 2012
I had a problem trying to create a second partition in my OpenFiler unit through the GUI. Everytime I clicked on the “Create” button, the page simply refreshed without creating a new partition. I stumbled up this great article and followed the instructions. Everything went well, except OpenFiler saw the new partition as an unknown Type. I had to run a few extra commands to get this to work so I wrote an addition to the linked article.
For this example I am using /dev/sdb, the default in parted is /dev/sda.
Using PuTTY, connect to your filer using SSH and login as root. Once in, type the following commands
parted unit cyl select /dev/sdb print
This is the output form my “print” command
Model: DELL PERC 6/i (scsi) Disk /dev/sdb: 729401cyl Sector size (logical/physical): 512B/512B BIOS cylinder,head,sector geometry: 729401,255,63. Each cylinder is 8225kB. Partition Table: gpt Number Start End Size File system Name Flags 1 0cyl 124931cyl 124931cyl primary lvm
Not the start and end are in Cylinders, if you see MB/GB/TB then you need to set the unit to cyl again (unit cyl) and re-run the print command
Now we create a new partition
mkpart [name?] primary [file system type? ext2] ext3 [start?] 124932 [end?] I pulled this from the GUI of the OpenFiler
Now, the GUI will not recognize this yet. If you run a print command again, you will notice that the Flags are set to msftres instead of lvm
Model: DELL PERC 6/i (scsi) Disk /dev/sdb: 6000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1028GB 1028GB primary lvm 2 1028GB 6000GB 4972GB primary msftres
We need to set this to LVM. Note that the 1st partition will be /dev/sdb1 and the second will be /dev/sdb2 and so on
set 2 lvm
Now a print command will show the flags as lvm
The last thing we need to do is initialize the disk using pvcreate
Now the OpenFiler GUI will show the partition.
Credit goes to sysadmin.circularvale.com