resize2fs gives error for decimal value
Hi Guys,
Need your guidance to understand why I am getting an error for resize2fs command. Code:
[root@localhost ~]# resize2fs $(cat /etc/fstab |grep "/home"|awk '{print $1}') 2.4G When I did with just 2GB it worked fine! why not for 2.4GB then? Code:
[root@localhost ~]# resize2fs $(cat /etc/fstab |grep "/home"|awk '{print $1}') 2G Code:
df -h /home Thank you very much. |
Although it doesn't explicitly say so in the man page, I suspect the size parameter needs to be an integer.
Two thoughts: set one of the -d debug-flags to see what's happening or use megabytes instead of gigabites: 2400M (I think that's the same as 2.4G) see Code:
man resize2fs |
Maybe the devs had better things to concentrate on.
Surely you can figure out how to supply an integral parameter. |
Quote:
|
The size must be in cylinders. The program takes the numerical value and converts it to the nearest whole number of cylinders. One cylinder is 512 B/Sector x 64 sectors/track x 255 heads = 8,355,840 Bytes. 4k/sector drives use a different geometry, and GPT uses still a different geometry. The bottom line is, when you specify a certain size for a filesystem, it never is exactly that size.
|
Quote:
Code:
The size parameter specifies the requested new size of the filesystem. If no units are specified, the units of the size parameter shall be the |
All times are GMT -5. The time now is 04:27 AM. |