Safe way of extending xfs partition

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I created an xfs partition using fdisk and mkfs.xfs on my 6T hhd. I ended up with only 2T. What is the safest way of expanding the partition to take up all the remaining space without disturbing the files already in the drive? Will xfs_growfs do the job? What other things should I take into consideration?
partition xfs
|
show 2 more comments
up vote
1
down vote
favorite
I created an xfs partition using fdisk and mkfs.xfs on my 6T hhd. I ended up with only 2T. What is the safest way of expanding the partition to take up all the remaining space without disturbing the files already in the drive? Will xfs_growfs do the job? What other things should I take into consideration?
partition xfs
1
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
To verify this, can you runfdisk -l [disk]and update the question with its output?
– Haxiel
Dec 5 at 13:40
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Usingfdiskwas the problem. Next time, usepartedorgdiskfor disks > 2TB. GPT, not MBR.
– Christopher
Dec 5 at 14:29
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I created an xfs partition using fdisk and mkfs.xfs on my 6T hhd. I ended up with only 2T. What is the safest way of expanding the partition to take up all the remaining space without disturbing the files already in the drive? Will xfs_growfs do the job? What other things should I take into consideration?
partition xfs
I created an xfs partition using fdisk and mkfs.xfs on my 6T hhd. I ended up with only 2T. What is the safest way of expanding the partition to take up all the remaining space without disturbing the files already in the drive? Will xfs_growfs do the job? What other things should I take into consideration?
partition xfs
partition xfs
asked Dec 5 at 13:21
Ivan Jacob Pesigan
61
61
1
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
To verify this, can you runfdisk -l [disk]and update the question with its output?
– Haxiel
Dec 5 at 13:40
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Usingfdiskwas the problem. Next time, usepartedorgdiskfor disks > 2TB. GPT, not MBR.
– Christopher
Dec 5 at 14:29
|
show 2 more comments
1
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
To verify this, can you runfdisk -l [disk]and update the question with its output?
– Haxiel
Dec 5 at 13:40
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Usingfdiskwas the problem. Next time, usepartedorgdiskfor disks > 2TB. GPT, not MBR.
– Christopher
Dec 5 at 14:29
1
1
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
To verify this, can you run
fdisk -l [disk] and update the question with its output?– Haxiel
Dec 5 at 13:40
To verify this, can you run
fdisk -l [disk] and update the question with its output?– Haxiel
Dec 5 at 13:40
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Using
fdisk was the problem. Next time, use parted or gdisk for disks > 2TB. GPT, not MBR.– Christopher
Dec 5 at 14:29
Using
fdisk was the problem. Next time, use parted or gdisk for disks > 2TB. GPT, not MBR.– Christopher
Dec 5 at 14:29
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
I see two possible ways to resolve your case:
If you can backup files to external storage:
- destroy the filesystem
- create dedicated volume group
- create entire disk
/dev/sdgas PV:pvcreate /dev/sdg - add PV to the VG
- create LV
- create filesystem on LV
restore the files
If you do not have place to backup the files (here start with step 1, not 8, numeration in SE do not work well)
create two partitions
/dev/sdg2and/dev/sdg3to the end of the diskcreate VG
create PVs on the partitions
add PVs to the VG
create LV
create filesystem on this LV
mount this LV
copy files to the new filesystem
unmount
/dev/sdg1create on
/dev/sdg1PVadd PV to VG
extend LV to the full size of VG
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
);
);
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%2funix.stackexchange.com%2fquestions%2f486147%2fsafe-way-of-extending-xfs-partition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I see two possible ways to resolve your case:
If you can backup files to external storage:
- destroy the filesystem
- create dedicated volume group
- create entire disk
/dev/sdgas PV:pvcreate /dev/sdg - add PV to the VG
- create LV
- create filesystem on LV
restore the files
If you do not have place to backup the files (here start with step 1, not 8, numeration in SE do not work well)
create two partitions
/dev/sdg2and/dev/sdg3to the end of the diskcreate VG
create PVs on the partitions
add PVs to the VG
create LV
create filesystem on this LV
mount this LV
copy files to the new filesystem
unmount
/dev/sdg1create on
/dev/sdg1PVadd PV to VG
extend LV to the full size of VG
add a comment |
up vote
0
down vote
I see two possible ways to resolve your case:
If you can backup files to external storage:
- destroy the filesystem
- create dedicated volume group
- create entire disk
/dev/sdgas PV:pvcreate /dev/sdg - add PV to the VG
- create LV
- create filesystem on LV
restore the files
If you do not have place to backup the files (here start with step 1, not 8, numeration in SE do not work well)
create two partitions
/dev/sdg2and/dev/sdg3to the end of the diskcreate VG
create PVs on the partitions
add PVs to the VG
create LV
create filesystem on this LV
mount this LV
copy files to the new filesystem
unmount
/dev/sdg1create on
/dev/sdg1PVadd PV to VG
extend LV to the full size of VG
add a comment |
up vote
0
down vote
up vote
0
down vote
I see two possible ways to resolve your case:
If you can backup files to external storage:
- destroy the filesystem
- create dedicated volume group
- create entire disk
/dev/sdgas PV:pvcreate /dev/sdg - add PV to the VG
- create LV
- create filesystem on LV
restore the files
If you do not have place to backup the files (here start with step 1, not 8, numeration in SE do not work well)
create two partitions
/dev/sdg2and/dev/sdg3to the end of the diskcreate VG
create PVs on the partitions
add PVs to the VG
create LV
create filesystem on this LV
mount this LV
copy files to the new filesystem
unmount
/dev/sdg1create on
/dev/sdg1PVadd PV to VG
extend LV to the full size of VG
I see two possible ways to resolve your case:
If you can backup files to external storage:
- destroy the filesystem
- create dedicated volume group
- create entire disk
/dev/sdgas PV:pvcreate /dev/sdg - add PV to the VG
- create LV
- create filesystem on LV
restore the files
If you do not have place to backup the files (here start with step 1, not 8, numeration in SE do not work well)
create two partitions
/dev/sdg2and/dev/sdg3to the end of the diskcreate VG
create PVs on the partitions
add PVs to the VG
create LV
create filesystem on this LV
mount this LV
copy files to the new filesystem
unmount
/dev/sdg1create on
/dev/sdg1PVadd PV to VG
extend LV to the full size of VG
answered Dec 5 at 14:19
Romeo Ninov
5,06231727
5,06231727
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2funix.stackexchange.com%2fquestions%2f486147%2fsafe-way-of-extending-xfs-partition%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
Was your disk was partitioned with GPT? MBR has an inherent limitation of about 2 TB.
– Haxiel
Dec 5 at 13:33
I used fdisk to create the partition.
– Ivan Jacob Pesigan
Dec 5 at 13:37
To verify this, can you run
fdisk -l [disk]and update the question with its output?– Haxiel
Dec 5 at 13:40
Don't have access to the machine right now but I distinctly remember getting a size of 2T on /dev/sdg1 but fdisk correctly detects that the whole device (/dev/sdg) is around 6T.
– Ivan Jacob Pesigan
Dec 5 at 14:04
Using
fdiskwas the problem. Next time, usepartedorgdiskfor disks > 2TB. GPT, not MBR.– Christopher
Dec 5 at 14:29