Difference between revisions of "resize regular luks partition"
From thelinuxwiki
Line 1: | Line 1: | ||
+ | <syntaxhighlight lang="bash"> | ||
localhost ~ # parted /dev/sdb | localhost ~ # parted /dev/sdb | ||
GNU Parted 3.2 | GNU Parted 3.2 | ||
Line 6: | Line 7: | ||
End? [750GB]? 1000GB | End? [750GB]? 1000GB | ||
− | |||
− | |||
localhost ~ # resize2fs /dev/sdb1 | localhost ~ # resize2fs /dev/sdb1 | ||
resize2fs 1.43.1 (08-Jun-2016) | resize2fs 1.43.1 (08-Jun-2016) | ||
resize2fs: Device or resource busy while trying to open /dev/sdb1 | resize2fs: Device or resource busy while trying to open /dev/sdb1 | ||
Couldn't find valid filesystem superblock. | Couldn't find valid filesystem superblock. | ||
− | |||
localhost ~ # resize2fs /dev/mapper/vol1 | localhost ~ # resize2fs /dev/mapper/vol1 | ||
Line 48: | Line 46: | ||
Resizing the filesystem on /dev/mapper/vol1 to 244139857 (4k) blocks. | Resizing the filesystem on /dev/mapper/vol1 to 244139857 (4k) blocks. | ||
The filesystem on /dev/mapper/vol1 is now 244139857 (4k) blocks long. | The filesystem on /dev/mapper/vol1 is now 244139857 (4k) blocks long. | ||
+ | |||
+ | </syntaxhighlight> |
Revision as of 04:32, 20 July 2016
localhost ~ # parted /dev/sdb GNU Parted 3.2 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) resizepart 1 End? [750GB]? 1000GB localhost ~ # resize2fs /dev/sdb1 resize2fs 1.43.1 (08-Jun-2016) resize2fs: Device or resource busy while trying to open /dev/sdb1 Couldn't find valid filesystem superblock. localhost ~ # resize2fs /dev/mapper/vol1 resize2fs 1.43.1 (08-Jun-2016) Please run 'e2fsck -f /dev/mapper/vol1' first. localhost ~ # e2fsck -f /dev/mapper/vol1 e2fsck 1.43.1 (08-Jun-2016) Pass 1: Checking inodes, blocks, and sizes Inode 18612229 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612260 extent tree (at level 1) could be narrower. Fix<y>? yes Inode 18612799 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612835 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612860 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612861 extent tree (at level 1) could be narrower. Fix<y>? yes Inode 18612864 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612865 extent tree (at level 2) could be narrower. Fix<y>? yes Inode 18612866 extent tree (at level 1) could be narrower. Fix<y>? yes Inode 18612879 extent tree (at level 1) could be narrower. Fix ('a' enables 'yes' to all) <y>? yes Inode 18612915 extent tree (at level 1) could be narrower. Fix ('a' enables 'yes' to all) <y>? yes Inode 18613562 extent tree (at level 2) could be narrower. Fix ('a' enables 'yes' to all) <y>? yes to all Inode 18613565 extent tree (at level 1) could be narrower. Fix? yes Pass 1E: Optimizing extent trees Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/mapper/vol1: ***** FILE SYSTEM WAS MODIFIED ***** /dev/mapper/vol1: 352906/45793280 files (0.3% non-contiguous), 160544229/183142878 blocks localhost ~ # resize2fs /dev/mapper/vol1 resize2fs 1.43.1 (08-Jun-2016) Resizing the filesystem on /dev/mapper/vol1 to 244139857 (4k) blocks. The filesystem on /dev/mapper/vol1 is now 244139857 (4k) blocks long.