Different results between df & fdisk commands The 2019 Stack Overflow Developer Survey...
How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?
Make it rain characters
Would an alien lifeform be able to achieve space travel if lacking in vision?
How to support a colleague who finds meetings extremely tiring?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
One-dimensional Japanese puzzle
Button changing its text & action. Good or terrible?
How to type a long/em dash `—`
60's-70's movie: home appliances revolting against the owners
What do I do when my TA workload is more than expected?
Do working physicists consider Newtonian mechanics to be "falsified"?
Simulating Exploding Dice
Is 'stolen' appropriate word?
how can a perfect fourth interval be considered either consonant or dissonant?
Could an empire control the whole planet with today's comunication methods?
Mortgage adviser recommends a longer term than necessary combined with overpayments
"... to apply for a visa" or "... and applied for a visa"?
What information about me do stores get via my credit card?
Match Roman Numerals
Is there a writing software that you can sort scenes like slides in PowerPoint?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Why did Peik Lin say, "I'm not an animal"?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
Python - Fishing Simulator
Different results between df & fdisk commands
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Linux server boot issueHow to migrate SD Card with Linux?fsck.ext4 unable to resolve UUIDReplaced a RAID 10 drive on my Debian server - what do I do next?Unable to mount external drive or sshfsNo boot partition at all, but the server still boots upI connected my usb hdd driver. CentOS7 don't mount itDual boot Windows 10 after initial Arch Linux instilationHow to set or change the 2.2 GiB size of AWS instance-store backed root volume?Masked/Hidden Partition
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I did resizing of my disk partition (/dev/mmcblk0p2), but after the process is done, what i get is the following results:
df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 3.1G 3.1G 2.5M 100% /
devtmpfs 360M 0 360M 0% /dev
tmpfs 489M 4.0K 489M 1% /dev/shm
tmpfs 489M 26M 464M 6% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk0p1 40M 16M 25M 40% /boot
tmpfs 98M 0 98M 0% /run/user/0
tmpfs 98M 0 98M 0% /run/user/1000
and fdisk -l
result is :
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 49152 131071 81920 40M 83 Linux
/dev/mmcblk0p2 131072 15523839 15392768 7.3G 83 Linux
why in df
i don't get the full size of /dev/mmcblk0p2
???
resizing done by the following set of commands
totalSize=`sfdisk -l /dev/mmcblk0 | grep "Disk /dev/mmcblk0" | cut -d ' ' -f 7`;
p2Start=`sfdisk -d /dev/mmcblk0 | grep "/dev/mmcblk0p2" | cut -d ',' -f 1 | cut -d '=' -f 2 | awk '{$1=$1};1'`;
newSize=$((totalSize - p2Start));
sfdisk -d /dev/mmcblk0 > /tmp/DiskLayout;
sed -i -E "s//dev/mmcblk0p2.*size=[ ]*[0-9]+, type=83//dev/mmcblk0p2 : start= ${p2Start}, size= ${newSize}, type=83/" /tmp/DiskLayout;
sfdisk /dev/mmcblk0 --no-reread < /tmp/DiskLayout;
reboot
resize2fs /dev/mmcblk0p2
reboot
resize2fs output:
Filesystem at /dev/mmcblk0p2 is mounted on /;
on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
this is a part of a process for preparing sd in mass production, so it must be done dynamically using a split script parts
linux ubuntu partitioning
New contributor
|
show 3 more comments
I did resizing of my disk partition (/dev/mmcblk0p2), but after the process is done, what i get is the following results:
df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 3.1G 3.1G 2.5M 100% /
devtmpfs 360M 0 360M 0% /dev
tmpfs 489M 4.0K 489M 1% /dev/shm
tmpfs 489M 26M 464M 6% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk0p1 40M 16M 25M 40% /boot
tmpfs 98M 0 98M 0% /run/user/0
tmpfs 98M 0 98M 0% /run/user/1000
and fdisk -l
result is :
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 49152 131071 81920 40M 83 Linux
/dev/mmcblk0p2 131072 15523839 15392768 7.3G 83 Linux
why in df
i don't get the full size of /dev/mmcblk0p2
???
resizing done by the following set of commands
totalSize=`sfdisk -l /dev/mmcblk0 | grep "Disk /dev/mmcblk0" | cut -d ' ' -f 7`;
p2Start=`sfdisk -d /dev/mmcblk0 | grep "/dev/mmcblk0p2" | cut -d ',' -f 1 | cut -d '=' -f 2 | awk '{$1=$1};1'`;
newSize=$((totalSize - p2Start));
sfdisk -d /dev/mmcblk0 > /tmp/DiskLayout;
sed -i -E "s//dev/mmcblk0p2.*size=[ ]*[0-9]+, type=83//dev/mmcblk0p2 : start= ${p2Start}, size= ${newSize}, type=83/" /tmp/DiskLayout;
sfdisk /dev/mmcblk0 --no-reread < /tmp/DiskLayout;
reboot
resize2fs /dev/mmcblk0p2
reboot
resize2fs output:
Filesystem at /dev/mmcblk0p2 is mounted on /;
on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
this is a part of a process for preparing sd in mass production, so it must be done dynamically using a split script parts
linux ubuntu partitioning
New contributor
1
It looks like it should have worked... are you sure thatresize2fs
completed without errors? (no harm running it again)
– Attie
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output fromdf -h
andfdisk -l
?
– Attie
yesterday
just updated the output
– rami khawaly
yesterday
Things still don't add up...fdisk
andresize2fs
now agree, anddf
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?
– Attie
yesterday
|
show 3 more comments
I did resizing of my disk partition (/dev/mmcblk0p2), but after the process is done, what i get is the following results:
df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 3.1G 3.1G 2.5M 100% /
devtmpfs 360M 0 360M 0% /dev
tmpfs 489M 4.0K 489M 1% /dev/shm
tmpfs 489M 26M 464M 6% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk0p1 40M 16M 25M 40% /boot
tmpfs 98M 0 98M 0% /run/user/0
tmpfs 98M 0 98M 0% /run/user/1000
and fdisk -l
result is :
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 49152 131071 81920 40M 83 Linux
/dev/mmcblk0p2 131072 15523839 15392768 7.3G 83 Linux
why in df
i don't get the full size of /dev/mmcblk0p2
???
resizing done by the following set of commands
totalSize=`sfdisk -l /dev/mmcblk0 | grep "Disk /dev/mmcblk0" | cut -d ' ' -f 7`;
p2Start=`sfdisk -d /dev/mmcblk0 | grep "/dev/mmcblk0p2" | cut -d ',' -f 1 | cut -d '=' -f 2 | awk '{$1=$1};1'`;
newSize=$((totalSize - p2Start));
sfdisk -d /dev/mmcblk0 > /tmp/DiskLayout;
sed -i -E "s//dev/mmcblk0p2.*size=[ ]*[0-9]+, type=83//dev/mmcblk0p2 : start= ${p2Start}, size= ${newSize}, type=83/" /tmp/DiskLayout;
sfdisk /dev/mmcblk0 --no-reread < /tmp/DiskLayout;
reboot
resize2fs /dev/mmcblk0p2
reboot
resize2fs output:
Filesystem at /dev/mmcblk0p2 is mounted on /;
on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
this is a part of a process for preparing sd in mass production, so it must be done dynamically using a split script parts
linux ubuntu partitioning
New contributor
I did resizing of my disk partition (/dev/mmcblk0p2), but after the process is done, what i get is the following results:
df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 3.1G 3.1G 2.5M 100% /
devtmpfs 360M 0 360M 0% /dev
tmpfs 489M 4.0K 489M 1% /dev/shm
tmpfs 489M 26M 464M 6% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/mmcblk0p1 40M 16M 25M 40% /boot
tmpfs 98M 0 98M 0% /run/user/0
tmpfs 98M 0 98M 0% /run/user/1000
and fdisk -l
result is :
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 49152 131071 81920 40M 83 Linux
/dev/mmcblk0p2 131072 15523839 15392768 7.3G 83 Linux
why in df
i don't get the full size of /dev/mmcblk0p2
???
resizing done by the following set of commands
totalSize=`sfdisk -l /dev/mmcblk0 | grep "Disk /dev/mmcblk0" | cut -d ' ' -f 7`;
p2Start=`sfdisk -d /dev/mmcblk0 | grep "/dev/mmcblk0p2" | cut -d ',' -f 1 | cut -d '=' -f 2 | awk '{$1=$1};1'`;
newSize=$((totalSize - p2Start));
sfdisk -d /dev/mmcblk0 > /tmp/DiskLayout;
sed -i -E "s//dev/mmcblk0p2.*size=[ ]*[0-9]+, type=83//dev/mmcblk0p2 : start= ${p2Start}, size= ${newSize}, type=83/" /tmp/DiskLayout;
sfdisk /dev/mmcblk0 --no-reread < /tmp/DiskLayout;
reboot
resize2fs /dev/mmcblk0p2
reboot
resize2fs output:
Filesystem at /dev/mmcblk0p2 is mounted on /;
on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
this is a part of a process for preparing sd in mass production, so it must be done dynamically using a split script parts
linux ubuntu partitioning
linux ubuntu partitioning
New contributor
New contributor
edited yesterday
rami khawaly
New contributor
asked yesterday
rami khawalyrami khawaly
11
11
New contributor
New contributor
1
It looks like it should have worked... are you sure thatresize2fs
completed without errors? (no harm running it again)
– Attie
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output fromdf -h
andfdisk -l
?
– Attie
yesterday
just updated the output
– rami khawaly
yesterday
Things still don't add up...fdisk
andresize2fs
now agree, anddf
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?
– Attie
yesterday
|
show 3 more comments
1
It looks like it should have worked... are you sure thatresize2fs
completed without errors? (no harm running it again)
– Attie
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output fromdf -h
andfdisk -l
?
– Attie
yesterday
just updated the output
– rami khawaly
yesterday
Things still don't add up...fdisk
andresize2fs
now agree, anddf
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?
– Attie
yesterday
1
1
It looks like it should have worked... are you sure that
resize2fs
completed without errors? (no harm running it again)– Attie
yesterday
It looks like it should have worked... are you sure that
resize2fs
completed without errors? (no harm running it again)– Attie
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output from df -h
and fdisk -l
?– Attie
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output from df -h
and fdisk -l
?– Attie
yesterday
just updated the output
– rami khawaly
yesterday
just updated the output
– rami khawaly
yesterday
Things still don't add up...
fdisk
and resize2fs
now agree, and df
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?– Attie
yesterday
Things still don't add up...
fdisk
and resize2fs
now agree, and df
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?– Attie
yesterday
|
show 3 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
rami khawaly is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1424231%2fdifferent-results-between-df-fdisk-commands%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
rami khawaly is a new contributor. Be nice, and check out our Code of Conduct.
rami khawaly is a new contributor. Be nice, and check out our Code of Conduct.
rami khawaly is a new contributor. Be nice, and check out our Code of Conduct.
rami khawaly is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1424231%2fdifferent-results-between-df-fdisk-commands%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
It looks like it should have worked... are you sure that
resize2fs
completed without errors? (no harm running it again)– Attie
yesterday
No, seems ok. here is the output: Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mmcblk0p2 to 1924096 (4k) blocks.
– rami khawaly
yesterday
1924096 * 4096 = 7.3 GiB
... which isn't 3.1 G or ~14.8 G... can you refresh your question with new output fromdf -h
andfdisk -l
?– Attie
yesterday
just updated the output
– rami khawaly
yesterday
Things still don't add up...
fdisk
andresize2fs
now agree, anddf
is the odd one out... are you sure you're interrogating the correct / same system? IP conflict or something weird?– Attie
yesterday