Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Resizing a local OVS disk partition

boketiMay 4 2016 — edited May 11 2016

Hi Everyone,

I've got OVS 3.3.3 installed on an HP DL385p Server. The disk partition /OVS is very full. It's locally defined storage (NOT using a SAN or NFS)

as shown below

# df -h

...

/dev/mapper/3600508b1001c8147bdc36577fdf29212

                      3.3T  3.3T   60G  99% /OVS/Repositories/0004fb0000030000b78a6a96707bc8cd

I've successfully added 2 more additional disk drives to the RAID Array and all the physical disks are assigned

# hpssacli ctrl slot=0 pd all show status

   physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 300 GB): OK

   physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 300 GB): OK

   physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 900.1 GB): OK

   physicaldrive 1I:1:4 (port 1I:box 1:bay 4, 900.1 GB): OK

   physicaldrive 1I:1:5 (port 1I:box 1:bay 5, 900.1 GB): OK

   physicaldrive 1I:1:6 (port 1I:box 1:bay 6, 900.1 GB): OK

   physicaldrive 1I:1:7 (port 1I:box 1:bay 7, 900.1 GB): OK

   physicaldrive 1I:1:8 (port 1I:box 1:bay 8, 900.1 GB): OK

   physicaldrive 1I:1:9 (port 1I:box 1:bay 9, 900.1 GB): OK

   physicaldrive 1I:1:10 (port 1I:box 1:bay 10, 900.1 GB): OK

The /OVS partition resides on  /dev/sdb

Using fdisk I get the following output:

# fdisk -l

Disk /dev/sda: 299.9 GB, 299966445568 bytes

255 heads, 63 sectors/track, 36468 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14       17522   140641042+  83  Linux

/dev/sda3           17523       18827    10482412+  83  Linux

/dev/sda4           18828       36468   141701332+   5  Extended

/dev/sda5           18828       18958     1052226   82  Linux swap / Solaris

/dev/sda6           18959       36468   140649043+  83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 3600.6 GB, 3600605274112 bytes

255 heads, 63 sectors/track, 437748 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/dm-0'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/dm-0: 3600.6 GB, 3600605274112 bytes

255 heads, 63 sectors/track, 437748 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

I've noted that /dev/mapper/3600508b1001c8147bdc36577fdf29212 is a sym link to /dev/dm-0

As /dev/sdb is > 2TB I cannot use fdisk so I try parted

# parted /dev/sdb

GNU Parted 1.8.1

Using /dev/sdb

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

Error: Unable to open /dev/sdb - unrecognised disk label.

(parted)

I did the same on /dev/dm-0

]# parted /dev/dm-0

GNU Parted 2.1

Using /dev/dm-0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

Error: /dev/dm-0: unrecognised disk label

(parted)

My Question is how do I resize this partition?

I don't want to run mklabel as this would create a new partition table.

I've done the following on another server with a partition > 2TB using parted except this partition had a GPT label.

  • Run parted on your device: parted /dev/sdX
  • Change display unit to sectors: unit s
  • Print current partition table and note the start sector for your partition: p
  • Delete your partition (won't delete the data or filesystem): rm <number>
  • Recreate the partition with the starting sector from above: mkpart primary <start> <end>
  • Exit parted: quit
  • Check the filesystem: sudo e2fsck -f /dev/sdXX
  • Resize filesystem: sudo resize2fs /dev/sdXX

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2016
Added on May 4 2016
5 comments
1,663 views