Skip to main content
added 117 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336
  1. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB... See How to Resize a Partition using fdisk - Red Hat Customer Portal.
  2. And then I did [resize2fs /dev/vdb1]...

We can see this did not change the size of your filesystem. Here is why:

resize2fs reads the size of the partition from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel after it has written the partition table. However this will fail if the disk is in use, e.g. you have mounted one of its partitions.

This is why resize2fs showed the "nothing to do" message. It did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent messagewarning when this happens, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document, on the Red Hat Customer Portal:

How to use a new partition in RHEL6 without reboot?

From

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
  1. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB.
  2. And then I did [resize2fs /dev/vdb1]...

We can see this did not change the size of your filesystem. Here is why:

resize2fs reads the size of the partition from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel after it has written the partition table. However this will fail if the disk is in use, e.g. you have mounted one of its partitions.

This is why resize2fs showed the "nothing to do" message. It did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message when this happens, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document, on the Red Hat Customer Portal:

How to use a new partition in RHEL6 without reboot?

From

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
  1. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB... See How to Resize a Partition using fdisk - Red Hat Customer Portal.
  2. And then I did [resize2fs /dev/vdb1]...

We can see this did not change the size of your filesystem. Here is why:

resize2fs reads the size of the partition from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel after it has written the partition table. However this will fail if the disk is in use, e.g. you have mounted one of its partitions.

This is why resize2fs showed the "nothing to do" message. It did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent warning when this happens, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document, on the Red Hat Customer Portal:

How to use a new partition in RHEL6 without reboot?

From

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
added 249 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336
  1. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB.
  2. And then I did [resize2fs /dev/vdb1]...

We can see this did not change the size of your filesystem. Here is why:

resize2fs reads the partition size of the partition from the kernel, similar to reading the size of any other file.   fdisk tries to update the kernel whenafter it writeshas written the partition table, but it. However this will fail if the disk is in use -, e.g. if you have mounted one of its partitions. This

This is why resize2fs showed the "nothing to do" message; itmessage. It did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message aboutwhen this happens, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document here, on the Red Hat Customer Portal:

https://access.redhat.com/solutions/57542

How to use a new partition in RHEL6 without reboot?How to use a new partition in RHEL6 without reboot?

From

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.

resize2fs reads the partition size from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel when it writes the partition table, but it will fail if the disk is in use - e.g. if you have mounted one of its partitions. This is why resize2fs showed the "nothing to do" message; it did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message about this, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document here:

https://access.redhat.com/solutions/57542

How to use a new partition in RHEL6 without reboot?

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
  1. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB.
  2. And then I did [resize2fs /dev/vdb1]...

We can see this did not change the size of your filesystem. Here is why:

resize2fs reads the size of the partition from the kernel, similar to reading the size of any other file.   fdisk tries to update the kernel after it has written the partition table. However this will fail if the disk is in use, e.g. you have mounted one of its partitions.

This is why resize2fs showed the "nothing to do" message. It did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message when this happens, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document, on the Red Hat Customer Portal:

How to use a new partition in RHEL6 without reboot?

From

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
added 5 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336

resize2fs reads the partition size from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel when it writes the partition table, but it will fail if the disk is in use - e.g. if you have mounted one of its partitions. This is why resize2fs showed the "nothing to do" message; it did not see the extra partition space :-).

I believe fdisk logs a prominent message about this, as screen-shotted in this (otherwise outdated) document.

The kernel reads the partition table during startup. So you can simply restart the computer. Then when you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message about this, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document here, which includes a more risky alternative:

https://access.redhat.com/solutions/57542

How to use a new partition in RHEL6 without reboot?

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.

resize2fs reads the partition size from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel when it writes the partition table, but it will fail if the disk is in use - e.g. if you have mounted one of its partitions. This is why resize2fs showed the "nothing to do" message; it did not see the extra partition space :-).

I believe fdisk logs a prominent message about this, as screen-shotted in this (otherwise outdated) document.

The kernel reads the partition table during startup. So you can simply restart the computer. Then when you run resize2fs, it will see the extra partition space and expand the filesystem to fit.


There is a less friendly but actually up-to-date document here, which includes a more risky alternative:

https://access.redhat.com/solutions/57542

How to use a new partition in RHEL6 without reboot?

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.

resize2fs reads the partition size from the kernel, similar to reading the size of any other file. fdisk tries to update the kernel when it writes the partition table, but it will fail if the disk is in use - e.g. if you have mounted one of its partitions. This is why resize2fs showed the "nothing to do" message; it did not see the extra partition space.

The kernel reads the partition table during startup. So you can simply restart the computer. Then you can run resize2fs, it will see the extra partition space, and expand the filesystem to fit.


I believe fdisk logs a prominent message about this, as screen-shotted in this (otherwise outdated) document.

There is a less friendly but actually up-to-date document here:

https://access.redhat.com/solutions/57542

How to use a new partition in RHEL6 without reboot?

partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.

So in general we would suggest:

  1. Unmount all the partitions of the disk before modifying the partition table on the disk, and then run partprobe to update the partitions in system.
  2. If this is not possible (e.g. the mounted partition is a system partition), reboot the system after modifying the partition table. The partitions information will be re-read after reboot. If a new partition was added and none of the existing partitions were modified, consider using the partx command to update the system partition table. Do note that the partx command does not do much checking between the new and the existing partition table in the system and assumes the user knows what they are are doing. So it can corrupt the data on disk if the existing partitions are modified or the partition table is not set correctly. So use at one's own risk.
added 5 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336
Loading
added 96 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336
Loading
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336
Loading