Professional Documents
Culture Documents
Red Hat Enterprise Linux 7 Security Guide en US
Red Hat Enterprise Linux 7 Security Guide en US
By admin (https://www.thegeekdiary.com/author/sandeep_patil/)
The post outlines the steps to resize an OCFS2 filesystem on Linux. The procedure
should first be tested in test before being performed against a production
environment.
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 2 of 9
# mounted.ocfs2 -f
Device FS Nodes
/dev/sdb1 ocfs2 node01, node02
/dev/sdc1 ocfs2 node01, node02
/dev/sdg1 ocfs2 node01, node02
# mounted.ocfs2 -f
Device FS Nodes
/dev/sdb1 ocfs2 Not mounted
/dev/sdc1 ocfs2 Not mounted
/dev/sdg1 ocfs2 Not mounted
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 3 of 9
# df -kl /cfs03
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 4193060 1578984 2614076 38% /cfs03
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 4 of 9
Before Resize
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 5 of 9
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 6 of 9
Note: If using device sizes greater than 2Tb, use the parted utilty instead
of fdisk to manage partitions.
After device/partition resize, ensure that all cluster nodes’ operating systems
detect the new sizing of the device/partition before proceeding. The following
utilities/methods can be used to dynamically detect device/partition changes;
partprobe, sfdisk, blockdev, cluster-wide node reboot. Use with caution, for
example:
# /sbin/partprobe /dev/sdb
OR
# /sbin/sfdisk -R /dev/sdb
OR
Verify the kernel sees the modified device partition sizing. After Resize (both LUN
and partition resized):
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 7 of 9
# tunefs.ocfs2 -S /dev/sdb1
tunefs.ocfs2 1.2.4
Changing volume size from 1048572 blocks to 2097148 blocks
Proceed (y/N): y
Resized volume
Wrote Superblock
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 8 of 9
c
number of blocks: 2097148
bytes per block: 4096
number of clusters: 2097148
bytes per cluster: 4096
max slots: 6
# mounted.ocfs2 -f
Device FS Nodes
/dev/sdc1 ocfs2 node01, node02
/dev/sdf1 ocfs2 node01, node02
/dev/sdb1 ocfs2 node01, node02
# mount -t ocfs2
/dev/sdb1 on /cfs03 type ocfs2 (rw,_netdev,heartbeat=local)
...
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019
How to resize an OCFS2 filesystem on Linux – The Geek Diary Page 9 of 9
https://www.thegeekdiary.com/how-to-resize-an-ocfs2-filesystem-on-linux/ 19/2/2019