Increase/Expand xfs partition in CentOS 7 (not using LVM)?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/
But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 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: 0x00070da2
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 38914047 19456000 83 Linux
/dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris
As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?
By the way, I have increased the size of the underlying storage already.
linux centos filesystems
add a comment |Â
up vote
0
down vote
favorite
I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/
But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 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: 0x00070da2
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 38914047 19456000 83 Linux
/dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris
As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?
By the way, I have increased the size of the underlying storage already.
linux centos filesystems
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/
But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 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: 0x00070da2
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 38914047 19456000 83 Linux
/dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris
As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?
By the way, I have increased the size of the underlying storage already.
linux centos filesystems
I'm trying to increase the system partition size of my CentOS 7 in vmware machine following the tutorial https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/
But there is a difference with my output of fdisk -l that I dare not to implement the procedure in the tutorial:
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 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: 0x00070da2
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 38914047 19456000 83 Linux
/dev/sda2 38914048 41924607 1505280 82 Linux swap / Solaris
As you can see, there isn't a LVM mark followed my partition, does that mean I have no need to follow the tutorial in question which is written for LVM partitions? Can I simply use xfs_growfs /dev/sda1 as this tutorial says?
By the way, I have increased the size of the underlying storage already.
linux centos filesystems
edited 22 hours ago
Rui F Ribeiro
34.6k1269113
34.6k1269113
asked Apr 11 at 16:21
Edward
1386
1386
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.
You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).
You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).
After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.
You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).
You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).
After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
add a comment |Â
up vote
2
down vote
accepted
You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.
You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).
You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).
After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.
You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).
You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).
After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.
You're not using LVM, so you won't be able to follow the guide you link to. You won't be able to just run xfs_growfs either.
You effectively need to move the swap partition to the end of the disk and then grow your first partition into the created space. From there you will be able to extend your filesystem. Alternatively you can delete it and recreate it at the end of the disk (probably easier and quicker).
You would first need to turn swap off and delete the swap partition /dev/sda2. This will allow you to be able to extend /dev/sda1. You should then recreate the swap partition /dev/sda2 and update /etc/fstab to use the new swap space you created, depending on how the swap space is referenced (e.g. UUID or disk name).
After these steps have been completed you should be able grow the xfs filesystem using xfs_growfs. You may need to reboot / run partprobe before this will work.
answered Apr 11 at 17:08
sapensadler
48016
48016
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
add a comment |Â
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
Will my data be erased with the easier method: delete and recreate the first partition?
â Edward
Apr 11 at 17:12
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
No, as when you turn the swap off, everything stores on the swap partition will moves back into ram. You can turn swap off using swappoff -a
â sapensadler
Apr 11 at 17:59
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437074%2fincrease-expand-xfs-partition-in-centos-7-not-using-lvm%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password