How to move system to a new, smaller drive?
I have a 320G HDD(has a lot of free space), but planning to move my system to a smaller 275G SSD.
How can i do it without loosing data?
fdisk -l output
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3ADBB6B9-D132-427F-B2C5-9D3666CDB354
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M EFI System
/dev/sda2 411648 2508799 2097152 1G Linux filesystem
/dev/sda3 2508800 625141759 622632960 296.9G Linux LVM
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-swap: 7.8 GiB, 8317304832 bytes, 16244736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-home: 189.1 GiB, 203092393984 bytes, 396664832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
pvs output
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
vgs output
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
lvs output
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-ao---- 189.14g
root fedora -wi-ao---- 50.00g
swap fedora -wi-ao---- <7.75g
parted -l output
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot, esp
2 211MB 1285MB 1074MB ext4
3 1285MB 320GB 319GB lvm
Tried to do it with clonezilla, but failed because target drive is smaller
hard-drive partitioning ssd lvm
add a comment |
I have a 320G HDD(has a lot of free space), but planning to move my system to a smaller 275G SSD.
How can i do it without loosing data?
fdisk -l output
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3ADBB6B9-D132-427F-B2C5-9D3666CDB354
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M EFI System
/dev/sda2 411648 2508799 2097152 1G Linux filesystem
/dev/sda3 2508800 625141759 622632960 296.9G Linux LVM
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-swap: 7.8 GiB, 8317304832 bytes, 16244736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-home: 189.1 GiB, 203092393984 bytes, 396664832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
pvs output
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
vgs output
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
lvs output
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-ao---- 189.14g
root fedora -wi-ao---- 50.00g
swap fedora -wi-ao---- <7.75g
parted -l output
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot, esp
2 211MB 1285MB 1074MB ext4
3 1285MB 320GB 319GB lvm
Tried to do it with clonezilla, but failed because target drive is smaller
hard-drive partitioning ssd lvm
add a comment |
I have a 320G HDD(has a lot of free space), but planning to move my system to a smaller 275G SSD.
How can i do it without loosing data?
fdisk -l output
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3ADBB6B9-D132-427F-B2C5-9D3666CDB354
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M EFI System
/dev/sda2 411648 2508799 2097152 1G Linux filesystem
/dev/sda3 2508800 625141759 622632960 296.9G Linux LVM
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-swap: 7.8 GiB, 8317304832 bytes, 16244736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-home: 189.1 GiB, 203092393984 bytes, 396664832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
pvs output
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
vgs output
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
lvs output
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-ao---- 189.14g
root fedora -wi-ao---- 50.00g
swap fedora -wi-ao---- <7.75g
parted -l output
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot, esp
2 211MB 1285MB 1074MB ext4
3 1285MB 320GB 319GB lvm
Tried to do it with clonezilla, but failed because target drive is smaller
hard-drive partitioning ssd lvm
I have a 320G HDD(has a lot of free space), but planning to move my system to a smaller 275G SSD.
How can i do it without loosing data?
fdisk -l output
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3ADBB6B9-D132-427F-B2C5-9D3666CDB354
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M EFI System
/dev/sda2 411648 2508799 2097152 1G Linux filesystem
/dev/sda3 2508800 625141759 622632960 296.9G Linux LVM
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-swap: 7.8 GiB, 8317304832 bytes, 16244736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-home: 189.1 GiB, 203092393984 bytes, 396664832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
pvs output
PV VG Fmt Attr PSize PFree
/dev/sda3 fedora lvm2 a-- 296.89g 50.00g
vgs output
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 296.89g 50.00g
lvs output
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-ao---- 189.14g
root fedora -wi-ao---- 50.00g
swap fedora -wi-ao---- <7.75g
parted -l output
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot, esp
2 211MB 1285MB 1074MB ext4
3 1285MB 320GB 319GB lvm
Tried to do it with clonezilla, but failed because target drive is smaller
hard-drive partitioning ssd lvm
hard-drive partitioning ssd lvm
asked Feb 5 at 11:46
GeorgeGeorge
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I've alwayes used GParted live CD/USB for this kind of tasks.
After booting, first shrink the existing LVM volumes to the needed sizes
(i.e. the size I want on the destination disk). Open a terminal and do (you might need sudo, I can't remember from memory!):
lvresize --verbose --resizefs -L NEWSIZE /dev/mapper/fedora-home
probably you need to shrink just the home
partition, really. Don't forget to resize the physical volume, too:
pvresize --setphysicalvolumesize {some-space} /dev/sda3
Then do a simple copy/paste of the relevant partitions from the old to the new disk.
As an added bonus, GParted
keeps the same UUIDs of the partitions from the old disk.
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed thelvm
part. It should be actually doable via cli. I'll update my answer.
– Mr Shunz
Feb 5 at 15:13
add a comment |
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
});
}
});
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%2f1402223%2fhow-to-move-system-to-a-new-smaller-drive%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
I've alwayes used GParted live CD/USB for this kind of tasks.
After booting, first shrink the existing LVM volumes to the needed sizes
(i.e. the size I want on the destination disk). Open a terminal and do (you might need sudo, I can't remember from memory!):
lvresize --verbose --resizefs -L NEWSIZE /dev/mapper/fedora-home
probably you need to shrink just the home
partition, really. Don't forget to resize the physical volume, too:
pvresize --setphysicalvolumesize {some-space} /dev/sda3
Then do a simple copy/paste of the relevant partitions from the old to the new disk.
As an added bonus, GParted
keeps the same UUIDs of the partitions from the old disk.
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed thelvm
part. It should be actually doable via cli. I'll update my answer.
– Mr Shunz
Feb 5 at 15:13
add a comment |
I've alwayes used GParted live CD/USB for this kind of tasks.
After booting, first shrink the existing LVM volumes to the needed sizes
(i.e. the size I want on the destination disk). Open a terminal and do (you might need sudo, I can't remember from memory!):
lvresize --verbose --resizefs -L NEWSIZE /dev/mapper/fedora-home
probably you need to shrink just the home
partition, really. Don't forget to resize the physical volume, too:
pvresize --setphysicalvolumesize {some-space} /dev/sda3
Then do a simple copy/paste of the relevant partitions from the old to the new disk.
As an added bonus, GParted
keeps the same UUIDs of the partitions from the old disk.
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed thelvm
part. It should be actually doable via cli. I'll update my answer.
– Mr Shunz
Feb 5 at 15:13
add a comment |
I've alwayes used GParted live CD/USB for this kind of tasks.
After booting, first shrink the existing LVM volumes to the needed sizes
(i.e. the size I want on the destination disk). Open a terminal and do (you might need sudo, I can't remember from memory!):
lvresize --verbose --resizefs -L NEWSIZE /dev/mapper/fedora-home
probably you need to shrink just the home
partition, really. Don't forget to resize the physical volume, too:
pvresize --setphysicalvolumesize {some-space} /dev/sda3
Then do a simple copy/paste of the relevant partitions from the old to the new disk.
As an added bonus, GParted
keeps the same UUIDs of the partitions from the old disk.
I've alwayes used GParted live CD/USB for this kind of tasks.
After booting, first shrink the existing LVM volumes to the needed sizes
(i.e. the size I want on the destination disk). Open a terminal and do (you might need sudo, I can't remember from memory!):
lvresize --verbose --resizefs -L NEWSIZE /dev/mapper/fedora-home
probably you need to shrink just the home
partition, really. Don't forget to resize the physical volume, too:
pvresize --setphysicalvolumesize {some-space} /dev/sda3
Then do a simple copy/paste of the relevant partitions from the old to the new disk.
As an added bonus, GParted
keeps the same UUIDs of the partitions from the old disk.
edited Feb 5 at 15:22
answered Feb 5 at 15:07
Mr ShunzMr Shunz
1,82512017
1,82512017
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed thelvm
part. It should be actually doable via cli. I'll update my answer.
– Mr Shunz
Feb 5 at 15:13
add a comment |
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed thelvm
part. It should be actually doable via cli. I'll update my answer.
– Mr Shunz
Feb 5 at 15:13
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
But the problem is LVM, i can't shrink an LVM physical volume
– George
Feb 5 at 15:11
@George yes, sorry, I missed the
lvm
part. It should be actually doable via cli. I'll update my answer.– Mr Shunz
Feb 5 at 15:13
@George yes, sorry, I missed the
lvm
part. It should be actually doable via cli. I'll update my answer.– Mr Shunz
Feb 5 at 15:13
add a comment |
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%2f1402223%2fhow-to-move-system-to-a-new-smaller-drive%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