how to run resize2fs with Rocks Cluster

Issues related to hardware problems
Post Reply
RobbieTheK
Posts: 17
Joined: 2016/07/31 04:26:10

how to run resize2fs with Rocks Cluster

Post by RobbieTheK » 2019/07/31 15:41:35

We hae a 3Ware RAID controller set to RAID 5. I added 3 1.5 TB drives successfully. How do we get Centos and Rocks to recognize the additional space? resize2fs says nothing to do.

Code: Select all

resize2fs /dev/sdb1
resize2fs 1.41.12 (17-May-2010)
The filesystem is already 1887577600 blocks long.  Nothing to do!
I also tried parted

Code: Select all

parted /dev/sdb resizepart 1 yes -- -1s
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
interactive mode.

Code: Select all

fdisk -l

Disk /dev/sda: 268.4 GB, 268435455488 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00015273

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        5100    40960000   83  Linux
/dev/sda2            5100        5355     2048000   82  Linux swap / Solaris
/dev/sda3   *        5355       32636   219133952   83  Linux

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


Disk /dev/sdb: 13731.5 GB, 13731486499328 bytes
255 heads, 63 sectors/track, 1669424 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267350  2147483647+  ee  GPT

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

Code: Select all

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       206G   55G  141G  29% /
tmpfs            16G     0   16G   0% /dev/shm
/dev/sda1        39G   16G   23G  41% /var
tmpfs           7.7G   57M  7.6G   1% /var/lib/ganglia/rrds
tmpfs           7.7G   57M  7.6G   1% /var/lib/ganglia/rrds
/dev/sdc1        16T  6.5T  8.6T  43% /drobo
/dev/sdb1       7.0T  5.7T  967G  86% /export

Code: Select all

lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom  
sda      8:0    0  250G  0 disk 
├─sda1   8:1    0 39.1G  0 part /var
├─sda2   8:2    0    2G  0 part [SWAP]
└─sda3   8:3    0  209G  0 part /
sdb      8:16   0 12.5T  0 disk 
└─sdb1   8:17   0    7T  0 part /home/cnslab
sdc      8:32   0   16T  0 disk 
└─sdc1   8:33   0   16T  0 part /drobo

Code: Select all

 blkid
/dev/sda1: UUID="3700496c-853a-496f-aea3-7a98a42c2594" TYPE="ext4" 
/dev/sdc1: UUID="f056e864-d5bd-4705-b968-1c4f4afc2024" TYPE="ext3" 
/dev/sda2: UUID="5408877b-8e94-4a4f-98a8-c1bcd6ee84d1" TYPE="swap" 
/dev/sda3: UUID="353257d1-738d-446e-8852-f74154ae80ab" TYPE="ext4" 
/dev/sdb1: UUID="d32d837c-6821-453f-a975-b05716c89bca" TYPE="ext4" 

Code: Select all

 mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /var type ext4 (rw)
tmpfs on /var/lib/ganglia/rrds type tmpfs (rw,size=8252074000,gid=99,uid=99)
tmpfs on /var/lib/ganglia/rrds type tmpfs (rw,size=8218470000,gid=99,uid=99)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/export/home/cnslab on /home/cnslab type none (rw,bind)
/dev/sdc1 on /drobo type ext3 (rw)
/dev/sdb1 on /export type ext4 (rw)
/export/apps on /share/apps type none (rw,bind)

Code: Select all

parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print all                                                        
Model: LSI 9750-8i DISK (scsi)
Disk /dev/sdb: 13.7TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  7732GB  7732GB  ext4         primary


Model: LSI 9750-8i DISK (scsi)
Disk /dev/sda: 268GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  41.9GB  41.9GB  primary  ext4
 2      41.9GB  44.0GB  2097MB  primary  linux-swap(v1)
 3      44.0GB  268GB   224GB   primary  ext4            boot
What else can I try?

User avatar
TrevorH
Forum Moderator
Posts: 26942
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: how to run resize2fs with Rocks Cluster

Post by TrevorH » 2019/07/31 16:20:15

You need to expand the /dev/sdb1 partition from ~8TB to the full size of the "disk" - i.e. 13.5TB. You cannot use fdisk to do that on CentOS 6 as it is not GPT enabled and will corrupt your current set up so do not use fdisk to make any changes to /dev/sdb. You attempted to use parted resizepart but you got the syntax wrong so it did not work... actually, it's worse than that: parted on CentOS 6 doesn't even have a resizepart command, it's just 'resize' on el6 but that says it wants to do both partition and filesystem in one go.

Personally I think I might be tempted to download a copy of systemrescuecd and use its GUI version of gparted to make the changes. Might be wise to just resize the partition that way and get resize2fs to do the actual filesystem resize on CentOS.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

RobbieTheK
Posts: 17
Joined: 2016/07/31 04:26:10

Re: how to run resize2fs with Rocks Cluster

Post by RobbieTheK » 2019/08/05 18:39:40

TrevorH wrote:
2019/07/31 16:20:15
Personally I think I might be tempted to download a copy of systemrescuecd and use its GUI version of gparted to make the changes. Might be wise to just resize the partition that way and get resize2fs to do the actual filesystem resize on CentOS.
Thanks for the recommendation and that worked well! So much easier with the gparted GUI!

Post Reply

Return to “CentOS 6 - Hardware Support”