Author:
erics, February 19th, 2021
|
# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/nvme0n1p1 xfs 20G 2.8G 18G 14% / # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 40G 0 disk ├─nvme0n1p1 259:1 0 20G 0 part / └─nvme0n1p128 259:2 0 1M 0 part |
Note how the partition at 259:1 is only 20GB, while the entire disk at 259:0 is 40GB. A partition resize is required in this case.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# sudo growpart /dev/nvme0n1 1 CHANGED: partition=1 start=4096 old: size=41938911 end=41943007 new: size=83881951 end=83886047 # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 40G 0 disk ├─nvme0n1p1 259:1 0 40G 0 part / └─nvme0n1p128 259:2 0 1M 0 part # df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/nvme0n1p1 xfs 20G 2.8G 18G 14% / # sudo xfs_growfs -d / meta-data=/dev/nvme0n1p1 isize=512 agcount=11, agsize=524159 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1 spinodes=0 data = bsize=4096 blocks=5242363, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 5242363 to 10485243 # df -hT /dev/nvme0n1p1 xfs 40G 2.8G 38G 7% / |
For more information, please visit the AMW Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html
Categories: How-To's, Technology Tags: Amazon, Amazon Linux 2, AWS, df, df -hT, Disk, EBS, Expand, Filesystem, Grow, howto, Linux, Linux2, lsblk, NVMe, partition, Resize, tips, volume, XFS
|
No comments
Author:
erics, March 6th, 2018
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html This only works on the new expandable volumes. YMMV, as always. 1. Examine file -s /dev/xvd* lsblk df -h 2. Grow partition Expand the modified partition using growpart (and note the unusual syntax of separating the device name from the partition number): growpart /dev/xvda 1 lsblk 3. Expand filesystem resize2fs /dev/xvda1 df -h
Categories: How-To's, Technology Tags: Examine, Expand, file system, Filesystem, Grow, growpart, howto, lsblk, partition, Resize, resize2fs, tips
|
No comments
Author:
erics, February 4th, 2017
Make sure you have Ghostscript installed, then:
|
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS="/ebook" -sOutputFile=output.pdf input.pdf |
-dPDFSETTINGS={value} where {value} is one of: /screen – the lowest resolution and lowest file size, fine for viewing on a screen /ebook – mid-range resolution and file size /printer – high-quality setting used for printing PDFs /prepress – high-quality setting used for printing PDFs As always, YMMV…
Categories: How-To's, Technology Tags: Adobe, cli, Command line, Ghostscript, gs, howto, Linux, macosx, PDF, Reduce, Resize, Smaller, tips
|
No comments
Author:
erics, August 31st, 2014
I had to replace an ailing root volume on AWS, so I decided to double the size when I created the new volume from snapshot. After booting, I realized that df still showed the old filesystem size of 10GB, not the new size of 20GB Here is the solution: resize2fs /dev/xvda1
|
root@prod02:/root # df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 9.9G 6.4G 3.4G 66% / root@prod02:/root # resize2fs /dev/xvda1 resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/xvda1 is mounted on /; on-line resizing required old desc_blocks = 1, new_desc_blocks = 2 Performing an on-line resize of /dev/xvda1 to 5242880 (4k) blocks. The filesystem on /dev/xvda1 is now 5242880 blocks long. root@prod02:/root # df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 20G 6.4G 14G 33% / |
Categories: How-To's, Technology Tags: AWS, CentOS, ext3, Filesystem, howto, Online, Resize, resize2fs, Snapshot, tips, volume
|
No comments
Author:
erics, June 27th, 2014
PROCEDURE FOR NON-ROOT FILESYSTEMS: Run the df command and record the device path for the mount point you wish to grow. Unmount the filesystem to insure consistency. Detach the volume from the instance. Create a snapshot of the unmounted filesystem. Create a volume from the snapshot, specifying a larger size in the new volume form. […]
Categories: How-To's, Technology Tags: AWS, EBS, Grow, howto, Increase, Resize, tips, volume
|
No comments