Resize LUKS Volume(s)Extend a LUKS encrypted partition to fill diskafter adding one more physical volume and enlarging logical volume, grub failsHow to identify LVM-over-LUKS or LUKS-over-LVMHow to install Arch Linux root file system on LVM thin LVs on LUKS on GUID partitioned device?recovering LUKS partitionIs Easy-to-use Multi-factor Full Disk Encryption Available?Chainloading in LUKS on LVM from ESPIs it possible to unlock multiple LUKS devices to form a LVM at boot?I want multiple prompts to decrypt multiple hard disks which contain root filesystemUbuntu 18.04 LUKS boot problemsRename LVM group and volumes
What is the purpose of a disclaimer like "this is not legal advice"?
Is it a Cyclops number? "Nobody" knows!
Has a sovereign Communist government ever run, and conceded loss, on a fair election?
Why restrict private health insurance?
What does it take to become a wilderness skills guide as a business?
How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?
How does learning spells work when leveling a multiclass character?
Insult for someone who "doesn't know anything"
Averaging over columns while ignoring zero entries
Limpar string com Regex
Precision notation for voltmeters
Short SF story. Females use stingers to implant eggs in yearfathers
Propulsion Systems
Ultrafilters as a double dual
An Undercover Army
How to install "rounded" brake pads
I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?
Did Amazon pay $0 in taxes last year?
What exactly is the meaning of "fine wine"?
What does *dead* mean in *What do you mean, dead?*?
Short story about cities being connected by a conveyor belt
Unidentified signals on FT8 frequencies
Does the US political system, in principle, allow for a no-party system?
How would an energy-based "projectile" blow up a spaceship?
Resize LUKS Volume(s)
Extend a LUKS encrypted partition to fill diskafter adding one more physical volume and enlarging logical volume, grub failsHow to identify LVM-over-LUKS or LUKS-over-LVMHow to install Arch Linux root file system on LVM thin LVs on LUKS on GUID partitioned device?recovering LUKS partitionIs Easy-to-use Multi-factor Full Disk Encryption Available?Chainloading in LUKS on LVM from ESPIs it possible to unlock multiple LUKS devices to form a LVM at boot?I want multiple prompts to decrypt multiple hard disks which contain root filesystemUbuntu 18.04 LUKS boot problemsRename LVM group and volumes
I have a laptop with Arch on it, and I sized the root partition too small. Now I want to expand the partition by taking some from the home partition. I will put the details of the specifics below. My question(s) to you is
1) Am I just expanding the root? Or shrinking the home? Or is it both? If both then does order matter? I see several online tuts that sort of do them different ways. So it's confusing to me.
2) Should I follow the arch documentation exactly? It's not like other tuts I've seen which may not be distro specific. Also asking because it mentions things like make a new partition under expand, but never says anything about what to do with the old one. It would be great if you could explain this if the answer is yes.
3) Do I need to update my fstab afterwards?
4) If all goes well, I should still have my data on these partitions right? Obviously I'm backing up just to be sure.
Here are my specific details:
> df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.7G 0 7.7G 0% /dev
run 7.7G 1.2M 7.7G 1% /run
/dev/mapper/archvg-root 9.8G 9.3G 0 100% /
tmpfs 7.7G 723M 7.0G 10% /dev/shm
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
tmpfs 7.7G 16K 7.7G 1% /tmp
/dev/nvme0n1p1 749M 62M 688M 9% /boot
/dev/mapper/archvg-home 456G 3.0G 430G 1% /home
tmpfs 1.6G 16K 1.6G 1% /run/user/1000
/dev/fuse 250G 78M 250G 1% /run/user/1000/keybase/kbfs
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 750M 0 part /boot
└─nvme0n1p2 259:2 0 476.2G 0 part
└─archlv 254:0 0 476.2G 0 crypt
├─archvg-swap 254:1 0 2G 0 lvm [SWAP]
├─archvg-root 254:2 0 10G 0 lvm /
└─archvg-home 254:3 0 464.2G 0 lvm /home
> sudo pvdisplay -m
--- Physical volume ---
PV Name /dev/mapper/archlv
VG Name archvg
PV Size 476.20 GiB / not usable <1.32 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 121908
Free PE 0
Allocated PE 121908
PV UUID m11dPA-mPYo-6dLS-mXPF-V1Ww-jXuO-QXfB8e
--- Physical Segments ---
Physical extent 0 to 511:
Logical volume /dev/archvg/swap
Logical extents 0 to 511
Physical extent 512 to 3071:
Logical volume /dev/archvg/root
Logical extents 0 to 2559
Physical extent 3072 to 121907:
Logical volume /dev/archvg/home
Logical extents 0 to 118835
Here is the steps I plan on taking
Boot from a live USB
# Step 1: Clone the current partition to a new partition
> dd if=/dev/mapper/archvg-root of=/dev/mapper/archvg2-root bs=4M
# Step 2: Extend the new partition
> cryptsetup open /dev/mapper/archvg2-root archlv
# Step 3: Enlarge the PV to use all the available remaining space of the partition
> pvresize /dev/mapper/archlv
## Review
> pvdisplay -m
# Step 4: Resize /home Logical Volume (trying to make it 100G)
> lvresize -L +90.2G /dev/CryptVolumeGroup/root
## Review
> pvdisplay -m
# Step 5: Resize encrypted volume (Trying to give it some space)
> resize2fs -p /dev/CryptVolumeGroup/root 101G
# Reboot
Here are other references of other's doing this differently which I'm still looking into if they have better methods or not.
https://serverfault.com/questions/394902/resizing-a-luks-encrypted-volume (He's unmounting, not mentioned in Arch docs. Not sure I need to)- Extend a LUKS encrypted partition to fill disk
https://blog.tinned-software.net/increase-the-size-of-a-luks-encrypted-partition/ (seems like less steps)
If more detailed information about the specifics is helpful, please let me know and I'll update this with them.
arch-linux luks
add a comment |
I have a laptop with Arch on it, and I sized the root partition too small. Now I want to expand the partition by taking some from the home partition. I will put the details of the specifics below. My question(s) to you is
1) Am I just expanding the root? Or shrinking the home? Or is it both? If both then does order matter? I see several online tuts that sort of do them different ways. So it's confusing to me.
2) Should I follow the arch documentation exactly? It's not like other tuts I've seen which may not be distro specific. Also asking because it mentions things like make a new partition under expand, but never says anything about what to do with the old one. It would be great if you could explain this if the answer is yes.
3) Do I need to update my fstab afterwards?
4) If all goes well, I should still have my data on these partitions right? Obviously I'm backing up just to be sure.
Here are my specific details:
> df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.7G 0 7.7G 0% /dev
run 7.7G 1.2M 7.7G 1% /run
/dev/mapper/archvg-root 9.8G 9.3G 0 100% /
tmpfs 7.7G 723M 7.0G 10% /dev/shm
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
tmpfs 7.7G 16K 7.7G 1% /tmp
/dev/nvme0n1p1 749M 62M 688M 9% /boot
/dev/mapper/archvg-home 456G 3.0G 430G 1% /home
tmpfs 1.6G 16K 1.6G 1% /run/user/1000
/dev/fuse 250G 78M 250G 1% /run/user/1000/keybase/kbfs
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 750M 0 part /boot
└─nvme0n1p2 259:2 0 476.2G 0 part
└─archlv 254:0 0 476.2G 0 crypt
├─archvg-swap 254:1 0 2G 0 lvm [SWAP]
├─archvg-root 254:2 0 10G 0 lvm /
└─archvg-home 254:3 0 464.2G 0 lvm /home
> sudo pvdisplay -m
--- Physical volume ---
PV Name /dev/mapper/archlv
VG Name archvg
PV Size 476.20 GiB / not usable <1.32 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 121908
Free PE 0
Allocated PE 121908
PV UUID m11dPA-mPYo-6dLS-mXPF-V1Ww-jXuO-QXfB8e
--- Physical Segments ---
Physical extent 0 to 511:
Logical volume /dev/archvg/swap
Logical extents 0 to 511
Physical extent 512 to 3071:
Logical volume /dev/archvg/root
Logical extents 0 to 2559
Physical extent 3072 to 121907:
Logical volume /dev/archvg/home
Logical extents 0 to 118835
Here is the steps I plan on taking
Boot from a live USB
# Step 1: Clone the current partition to a new partition
> dd if=/dev/mapper/archvg-root of=/dev/mapper/archvg2-root bs=4M
# Step 2: Extend the new partition
> cryptsetup open /dev/mapper/archvg2-root archlv
# Step 3: Enlarge the PV to use all the available remaining space of the partition
> pvresize /dev/mapper/archlv
## Review
> pvdisplay -m
# Step 4: Resize /home Logical Volume (trying to make it 100G)
> lvresize -L +90.2G /dev/CryptVolumeGroup/root
## Review
> pvdisplay -m
# Step 5: Resize encrypted volume (Trying to give it some space)
> resize2fs -p /dev/CryptVolumeGroup/root 101G
# Reboot
Here are other references of other's doing this differently which I'm still looking into if they have better methods or not.
https://serverfault.com/questions/394902/resizing-a-luks-encrypted-volume (He's unmounting, not mentioned in Arch docs. Not sure I need to)- Extend a LUKS encrypted partition to fill disk
https://blog.tinned-software.net/increase-the-size-of-a-luks-encrypted-partition/ (seems like less steps)
If more detailed information about the specifics is helpful, please let me know and I'll update this with them.
arch-linux luks
add a comment |
I have a laptop with Arch on it, and I sized the root partition too small. Now I want to expand the partition by taking some from the home partition. I will put the details of the specifics below. My question(s) to you is
1) Am I just expanding the root? Or shrinking the home? Or is it both? If both then does order matter? I see several online tuts that sort of do them different ways. So it's confusing to me.
2) Should I follow the arch documentation exactly? It's not like other tuts I've seen which may not be distro specific. Also asking because it mentions things like make a new partition under expand, but never says anything about what to do with the old one. It would be great if you could explain this if the answer is yes.
3) Do I need to update my fstab afterwards?
4) If all goes well, I should still have my data on these partitions right? Obviously I'm backing up just to be sure.
Here are my specific details:
> df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.7G 0 7.7G 0% /dev
run 7.7G 1.2M 7.7G 1% /run
/dev/mapper/archvg-root 9.8G 9.3G 0 100% /
tmpfs 7.7G 723M 7.0G 10% /dev/shm
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
tmpfs 7.7G 16K 7.7G 1% /tmp
/dev/nvme0n1p1 749M 62M 688M 9% /boot
/dev/mapper/archvg-home 456G 3.0G 430G 1% /home
tmpfs 1.6G 16K 1.6G 1% /run/user/1000
/dev/fuse 250G 78M 250G 1% /run/user/1000/keybase/kbfs
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 750M 0 part /boot
└─nvme0n1p2 259:2 0 476.2G 0 part
└─archlv 254:0 0 476.2G 0 crypt
├─archvg-swap 254:1 0 2G 0 lvm [SWAP]
├─archvg-root 254:2 0 10G 0 lvm /
└─archvg-home 254:3 0 464.2G 0 lvm /home
> sudo pvdisplay -m
--- Physical volume ---
PV Name /dev/mapper/archlv
VG Name archvg
PV Size 476.20 GiB / not usable <1.32 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 121908
Free PE 0
Allocated PE 121908
PV UUID m11dPA-mPYo-6dLS-mXPF-V1Ww-jXuO-QXfB8e
--- Physical Segments ---
Physical extent 0 to 511:
Logical volume /dev/archvg/swap
Logical extents 0 to 511
Physical extent 512 to 3071:
Logical volume /dev/archvg/root
Logical extents 0 to 2559
Physical extent 3072 to 121907:
Logical volume /dev/archvg/home
Logical extents 0 to 118835
Here is the steps I plan on taking
Boot from a live USB
# Step 1: Clone the current partition to a new partition
> dd if=/dev/mapper/archvg-root of=/dev/mapper/archvg2-root bs=4M
# Step 2: Extend the new partition
> cryptsetup open /dev/mapper/archvg2-root archlv
# Step 3: Enlarge the PV to use all the available remaining space of the partition
> pvresize /dev/mapper/archlv
## Review
> pvdisplay -m
# Step 4: Resize /home Logical Volume (trying to make it 100G)
> lvresize -L +90.2G /dev/CryptVolumeGroup/root
## Review
> pvdisplay -m
# Step 5: Resize encrypted volume (Trying to give it some space)
> resize2fs -p /dev/CryptVolumeGroup/root 101G
# Reboot
Here are other references of other's doing this differently which I'm still looking into if they have better methods or not.
https://serverfault.com/questions/394902/resizing-a-luks-encrypted-volume (He's unmounting, not mentioned in Arch docs. Not sure I need to)- Extend a LUKS encrypted partition to fill disk
https://blog.tinned-software.net/increase-the-size-of-a-luks-encrypted-partition/ (seems like less steps)
If more detailed information about the specifics is helpful, please let me know and I'll update this with them.
arch-linux luks
I have a laptop with Arch on it, and I sized the root partition too small. Now I want to expand the partition by taking some from the home partition. I will put the details of the specifics below. My question(s) to you is
1) Am I just expanding the root? Or shrinking the home? Or is it both? If both then does order matter? I see several online tuts that sort of do them different ways. So it's confusing to me.
2) Should I follow the arch documentation exactly? It's not like other tuts I've seen which may not be distro specific. Also asking because it mentions things like make a new partition under expand, but never says anything about what to do with the old one. It would be great if you could explain this if the answer is yes.
3) Do I need to update my fstab afterwards?
4) If all goes well, I should still have my data on these partitions right? Obviously I'm backing up just to be sure.
Here are my specific details:
> df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.7G 0 7.7G 0% /dev
run 7.7G 1.2M 7.7G 1% /run
/dev/mapper/archvg-root 9.8G 9.3G 0 100% /
tmpfs 7.7G 723M 7.0G 10% /dev/shm
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
tmpfs 7.7G 16K 7.7G 1% /tmp
/dev/nvme0n1p1 749M 62M 688M 9% /boot
/dev/mapper/archvg-home 456G 3.0G 430G 1% /home
tmpfs 1.6G 16K 1.6G 1% /run/user/1000
/dev/fuse 250G 78M 250G 1% /run/user/1000/keybase/kbfs
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 750M 0 part /boot
└─nvme0n1p2 259:2 0 476.2G 0 part
└─archlv 254:0 0 476.2G 0 crypt
├─archvg-swap 254:1 0 2G 0 lvm [SWAP]
├─archvg-root 254:2 0 10G 0 lvm /
└─archvg-home 254:3 0 464.2G 0 lvm /home
> sudo pvdisplay -m
--- Physical volume ---
PV Name /dev/mapper/archlv
VG Name archvg
PV Size 476.20 GiB / not usable <1.32 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 121908
Free PE 0
Allocated PE 121908
PV UUID m11dPA-mPYo-6dLS-mXPF-V1Ww-jXuO-QXfB8e
--- Physical Segments ---
Physical extent 0 to 511:
Logical volume /dev/archvg/swap
Logical extents 0 to 511
Physical extent 512 to 3071:
Logical volume /dev/archvg/root
Logical extents 0 to 2559
Physical extent 3072 to 121907:
Logical volume /dev/archvg/home
Logical extents 0 to 118835
Here is the steps I plan on taking
Boot from a live USB
# Step 1: Clone the current partition to a new partition
> dd if=/dev/mapper/archvg-root of=/dev/mapper/archvg2-root bs=4M
# Step 2: Extend the new partition
> cryptsetup open /dev/mapper/archvg2-root archlv
# Step 3: Enlarge the PV to use all the available remaining space of the partition
> pvresize /dev/mapper/archlv
## Review
> pvdisplay -m
# Step 4: Resize /home Logical Volume (trying to make it 100G)
> lvresize -L +90.2G /dev/CryptVolumeGroup/root
## Review
> pvdisplay -m
# Step 5: Resize encrypted volume (Trying to give it some space)
> resize2fs -p /dev/CryptVolumeGroup/root 101G
# Reboot
Here are other references of other's doing this differently which I'm still looking into if they have better methods or not.
https://serverfault.com/questions/394902/resizing-a-luks-encrypted-volume (He's unmounting, not mentioned in Arch docs. Not sure I need to)- Extend a LUKS encrypted partition to fill disk
https://blog.tinned-software.net/increase-the-size-of-a-luks-encrypted-partition/ (seems like less steps)
If more detailed information about the specifics is helpful, please let me know and I'll update this with them.
arch-linux luks
arch-linux luks
edited 4 hours ago
Byron Mansfield
asked 4 hours ago
Byron MansfieldByron Mansfield
629
629
add a comment |
add a comment |
0
active
oldest
votes
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',
autoActivateHeartbeat: false,
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%2f505241%2fresize-luks-volumes%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
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.
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%2f505241%2fresize-luks-volumes%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