Expanding Linux Repository

VMware specific discussions

Expanding Linux Repository

Veeam Logoby postmaal » Tue Jun 28, 2016 3:40 pm

I have a 3 TB repository setup on a Centos 7 VM. The VM is setup with 2 HDDs, one for the OS and the other for the repo. I have extended the drive in VMware from 3 to 4 TB. If I run parted /dev/sdb it says the size is 4 tb. What step am I missing to make it so the repository realizes there is 4 tb instead of just 3? Thanks in advance for any help you can provide. We run backup and replication ver. 9.
postmaal
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Jun 28, 2016 3:21 pm

Re: Expanding Linux Repository

Veeam Logoby Vitaliy S. » Tue Jun 28, 2016 3:57 pm

All changes in the infrastructure should be detected by a topology scan job that is scheduled to run every day. Please note that you can also force this job, by triggering a rescan job manually.
Vitaliy S.
Veeam Software
 
Posts: 19570
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Expanding Linux Repository

Veeam Logoby postmaal » Tue Jun 28, 2016 4:08 pm

I have tried rescanning the repository in VEEAM. If you are referring to something different can you tell me how to manually kick off this job?
postmaal
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Jun 28, 2016 3:21 pm

Re: Expanding Linux Repository

Veeam Logoby Vitaliy S. » Tue Jun 28, 2016 4:50 pm

I was referring to the rescan job for the repository. If this doesn't update the free space value, then I would suggest to let our support engineer take a look at the rescan job log.
Vitaliy S.
Veeam Software
 
Posts: 19570
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Expanding Linux Repository

Veeam Logoby postmaal » Tue Jun 28, 2016 5:07 pm

I will do that. Thanks. I just feel like I am missing something on the Linux end.
postmaal
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Jun 28, 2016 3:21 pm

Re: Expanding Linux Repository

Veeam Logoby dellock6 » Tue Jun 28, 2016 5:38 pm

/dev/sdb is the disk, but did you also extended the partition created on top of that volume?
Luca Dell'Oca
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5055
Liked: 1334 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Expanding Linux Repository

Veeam Logoby PTide » Tue Jun 28, 2016 5:47 pm

Once you extend the partition please make sure that you resize the filesystem on that partition as well. Be very careful while doing all operations as one wrong move can wipe all your data!

Thanks
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Expanding Linux Repository

Veeam Logoby postmaal » Tue Jun 28, 2016 5:52 pm

I'm fairly new to Linux so forgive my ignorance but how check the partition status and/or how do I resize the filesystem?
postmaal
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Jun 28, 2016 3:21 pm

Re: Expanding Linux Repository

Veeam Logoby PTide » Tue Jun 28, 2016 5:56 pm

Could you please show the output of fdisk -l command?
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Expanding Linux Repository

Veeam Logoby postmaal » Tue Jun 28, 2016 6:11 pm

Code: Select all
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00028868

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    41943039    20458496   8e  Linux LVM

Disk /dev/sdb: 4398.0 GB, 4398046511104 bytes, 8589934592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 18.8 GB, 18756927488 bytes, 36634624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
postmaal
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Jun 28, 2016 3:21 pm

Re: Expanding Linux Repository

Veeam Logoby PTide » Tue Jun 28, 2016 6:25 pm 1 person likes this post

Looking at the output I assume that you chose not to create any partitions and used the whole sdb instead, is that correct? If so then you should do the following:

1. Make sure that fdisk shows the correct size of sdb device
2. Run resize2fs /dev/sdb to resize the filesystem
3. Rescan the repository

If you feel nervous about doing that on a live repository then you should train on a dummy harddrive: attach another virtual drive, create a filesystem on it, mount it, create a file on it, resize the virtual drive, resize the filesystem, make sure that the size has changed and the file is still there.
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Expanding Linux Repository

Veeam Logoby jmmarton » Tue Jun 28, 2016 8:29 pm

The only way to use all of sdb would be to create /dev/sdb1 and use the maximum size which is all of the disk. If there truly isn't a partition there then something may have went wrong. I'd be curious what filesystems are mounted currently via the mount command. Maybe there's something else somehow using sdb?

Joe
jmmarton
Veeam Software
 
Posts: 821
Liked: 89 times
Joined: Tue Nov 17, 2015 2:38 am
Location: Chicago, IL
Full Name: Joe Marton

Re: Expanding Linux Repository

Veeam Logoby PTide » Wed Jun 29, 2016 9:56 am

The only way to use all of sdb would be to create /dev/sdb1 and use the maximum size which is all of the disk

AFAIK nothing prevents user from doing mkfs against the whole drive:
Code: Select all
[root@localhost ~]# mkfs.ext4 /dev/sdc
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2621440 inodes, 10485760 blocks
524288 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2157969408
320 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

[root@localhost ~]# mount /dev/sdc /sdc
[root@localhost ~]# mount | grep sdc
/dev/sdc on /sdc type ext4 (rw,relatime,seclabel,data=ordered)
[root@localhost ~]#
[root@localhost ~]# df -ah | grep sdc
/dev/sdc                  40G   49M   38G   1% /sdc

That also allows filesystem hot-resize.

Any pitfalls with such approach that I should be aware of?

Thanks
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Expanding Linux Repository

Veeam Logoby jmmarton » Wed Jun 29, 2016 1:34 pm

Hmm... I've never seen that. Then again, I've been a SLES guy for many years and I almost always use YaST so perhaps it's just a YaST limitation that it always creates a partition. As long as it works, that's all that matters. :-) But even if a partition is created, hot resize should still be available (depending on the filesystem). And really the only downside I can think of off the top of my head is that you might not be able to create an additional partition on that drive if you ever wanted to. If you expand the disk, even if the filesystem isn't expanded automatically, I wouldn't expect you to be able able to lay down a partition table and split up the expanded disk while still keeping the existing filesystem.

Joe
jmmarton
Veeam Software
 
Posts: 821
Liked: 89 times
Joined: Tue Nov 17, 2015 2:38 am
Location: Chicago, IL
Full Name: Joe Marton

Re: Expanding Linux Repository

Veeam Logoby PTide » Wed Jun 29, 2016 2:49 pm

My bad, I meant to say that in case a physical partition does not have enough room for a filesystem to expand then you'll have to expand the partition first, which requires unmounting (or a reboot).
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Next

Return to VMware vSphere



Who is online

Users browsing this forum: No registered users and 10 guests