Transfer /home to a hard drive

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Osmario
Level 2
Level 2
Posts: 52
Joined: Wed Jul 18, 2018 12:04 am

Transfer /home to a hard drive

Post by Osmario » Tue Aug 13, 2019 8:40 pm

Hi

Need help to transfer /home directory from SSD to hard drive.
df command returns:

olva@olva-Inspiron-7572:~$ df
Sist. Arq. Blocos de 1K Usado Disponível Uso% Montado em
udev 8127072 0 8127072 0% /dev
tmpfs 1631956 2964 1628992 1% /run
/dev/sdb2 122030736 11459268 104329628 10% /
tmpfs 8159780 23764 8136016 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 8159780 0 8159780 0% /sys/fs/cgroup
/dev/sdb1 523248 6232 517016 2% /boot/efi
tmpfs 1631956 20 1631936 1% /run/user/1000

Thanks in advance
Linux Mint is installed at /dev/sdb1 (SSD) I think so.

deck_luck
Level 3
Level 3
Posts: 150
Joined: Mon May 27, 2019 6:57 pm
Location: here

Re: Transfer /home to a hard drive

Post by deck_luck » Tue Aug 13, 2019 11:48 pm

Do you have a specific question or what help are you looking to gain?

It would be useful information if you provide the ouput of the following commands:

Code: Select all

inxi -Fxxxz
lsblk -so +model,serial,hotplug /dev/sd[a-z]
lsblk -f /dev/sd[a-z]
💡Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime. ✝️

Osmario
Level 2
Level 2
Posts: 52
Joined: Wed Jul 18, 2018 12:04 am

Re: Transfer /home to a hard drive

Post by Osmario » Wed Aug 14, 2019 2:25 am

Hi deck_luck. Thanks for your answer.
Apologize for my plain english.
I'd like to have all stuf from /home folder in a safe place to prevent against breakage, crashes, failures or even when I have to install a new version of Linux Mint.

olva@olva-Inspiron-7572:~$ inxi -Fxxxz
System: Host: olva-Inspiron-7572 Kernel: 4.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.0.10
wm: muffin 4.0.7 dm: LightDM 1.26.0 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
Machine: Type: Laptop System: Dell product: Inspiron 7572 v: N/A serial: <filter> Chassis: type: 10 serial: <filter>
Mobo: Dell model: 082HPJ v: A00 serial: <filter> UEFI: Dell v: 1.1.8 date: 10/11/2018
Battery: ID-1: BAT0 charge: 17.0 Wh condition: 38.0/42.0 Wh (91%) volts: 10.8/11.4 model: SMP DELL Y3F7Y6B type: Li-ion
serial: <filter> status: Discharging

CPU: Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake rev: A L2 cache: 8192 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31872
Speed: 803 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 900 2: 899 3: 885 4: 899 5: 848 6: 898 7: 900 8: 897
Graphics: Device-1: Intel UHD Graphics 620 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5917
Device-2: NVIDIA GP108M [GeForce MX150] vendor: Dell driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:1d10
Display: x11 server: X.Org 1.19.6 driver: modesetting,nouveau unloaded: fbdev,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.5 Mesa 19.0.2 compat-v: 3.0
direct render: Yes
Audio: Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3
chip ID: 8086:9d71
Sound Server: ALSA v: k4.15.0-58-generic
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Dell driver: r8169 v: 2.3LK-NAPI
port: d000 bus ID: 02:00.0 chip ID: 10ec:8168
IF: enp2s0 state: down mac: <filter>
Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter vendor: Dell driver: ath10k_pci v: kernel
port: d000 bus ID: 03:00.0 chip ID: 168c:003e
IF: wlp3s0 state: up mac: <filter>
Device-3: Atheros type: USB driver: btusb bus ID: 1-7:5 chip ID: 0cf3:e007
Drives: Local Storage: total: 1.03 TiB used: 11.58 GiB (1.1%)
ID-1: /dev/sda vendor: Western Digital model: WD10SPZX-75Z10T1 size: 931.51 GiB speed: 6.0 Gb/s rotation: 5400 rpm
serial: <filter> rev: 1A02 scheme: MBR
ID-2: /dev/sdb vendor: LITE-ON model: CV8-8E128-11 SATA 128GB size: 119.24 GiB speed: 6.0 Gb/s serial: <filter>
rev: 10B scheme: GPT
RAID: Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 port: f060 bus ID: 00:17.0
chip ID: 8086.282a rev: 21
Partition: ID-1: / size: 116.38 GiB used: 11.57 GiB (9.9%) fs: ext4 dev: /dev/sdb2
Sensors: System Temperatures: cpu: 40.0 C mobo: 31.0 C sodimm: 34.0 C gpu: nouveau temp: 37 C
Fan Speeds (RPM): cpu: 0
Info: Processes: 252 Uptime: 24m Memory: 15.56 GiB used: 966.5 MiB (6.1%) Init: systemd v: 237 runlevel: 5 Compilers:
gcc: 7.4.0 alt: 7 Shell: bash v: 4.4.20 running in: gnome-terminal inxi: 3.0.27
olva@olva-Inspiron-7572:~$ lsblk -so +model,serial,hotplug /dev/sd[a-z]
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MODEL SERIAL HOTPLUG
sda 8:0 0 931,5G 0 disk WDC WD10SPZX-75Z WXR1A480R65K 0
sdb 8:16 0 119,2G 0 disk LITEON CV8-8E128 TW059X3VLOH0085M05EA 0
olva@olva-Inspiron-7572:~$ lsblk -f /dev/sd[a-z]
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 f027a9a6-2c44-4597-aca3-0b522e636e63
└─sda2 ext4 e89f52df-2a64-4d49-a21e-9f035963f664
sdb
├─sdb1 vfat 468A-BAC4 /boot/efi
└─sdb2 ext4 c3fc442a-3627-4667-8983-07f5eaa1f168 /
olva@olva-Inspiron-7572:~$

deck_luck
Level 3
Level 3
Posts: 150
Joined: Mon May 27, 2019 6:57 pm
Location: here

Re: Transfer /home to a hard drive

Post by deck_luck » Wed Aug 14, 2019 4:14 am

The sda contains two ext4 file systems.

├─sda1 ext4 f027a9a6-2c44-4597-aca3-0b522e636e63
└─sda2 ext4 e89f52df-2a64-4d49-a21e-9f035963f664

What are their purpose?
And, I assume this is the hard drive you want to relocate /home. If not please explain.
💡Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime. ✝️

Osmario
Level 2
Level 2
Posts: 52
Joined: Wed Jul 18, 2018 12:04 am

Re: Transfer /home to a hard drive

Post by Osmario » Wed Aug 14, 2019 3:55 pm

I really want to relocate /home to sda.
Those two ext4 file systems is due the fact I made a mistake by using Gparted.
Now I guess problem is fixed.

inxi -Fxxxz
lsblk -so +model,serial,hotplug /dev/sd[a-z]
lsblk -f /dev/sd[a-z]

returns:

olva@olva-Inspiron-7572:~$ inxi -Fxxxz
System:
Host: olva-Inspiron-7572 Kernel: 4.15.0-58-generic x86_64 bits: 64
compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.0.10 wm: muffin 4.0.7
dm: LightDM 1.26.0 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
Machine:
Type: Laptop System: Dell product: Inspiron 7572 v: N/A serial: <filter>
Chassis: type: 10 serial: <filter>
Mobo: Dell model: 082HPJ v: A00 serial: <filter> UEFI: Dell v: 1.1.8
date: 10/11/2018
Battery:
ID-1: BAT0 charge: 12.1 Wh condition: 38.0/42.0 Wh (91%) volts: 10.5/11.4
model: SMP DELL Y3F7Y6B type: Li-ion serial: <filter> status: Discharging
CPU:
Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP
arch: Kaby Lake rev: A L2 cache: 8192 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31872
Speed: 800 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 800 2: 800
3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
Graphics:
Device-1: Intel UHD Graphics 620 vendor: Dell driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:5917
Device-2: NVIDIA GP108M [GeForce MX150] vendor: Dell driver: nouveau
v: kernel bus ID: 01:00.0 chip ID: 10de:1d10
Display: x11 server: X.Org 1.19.6 driver: modesetting,nouveau
unloaded: fbdev,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2)
v: 4.5 Mesa 19.0.8 compat-v: 3.0 direct render: Yes
Audio:
Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell
driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71
Sound Server: ALSA v: k4.15.0-58-generic
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Dell driver: r8169 v: 2.3LK-NAPI port: d000 bus ID: 02:00.0
chip ID: 10ec:8168
IF: enp2s0 state: down mac: <filter>
Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
vendor: Dell driver: ath10k_pci v: kernel port: d000 bus ID: 03:00.0
chip ID: 168c:003e
IF: wlp3s0 state: up mac: <filter>
Device-3: Atheros type: USB driver: btusb bus ID: 1-7:5 chip ID: 0cf3:e007
Drives:
Local Storage: total: 1.03 TiB used: 11.68 GiB (1.1%)
ID-1: /dev/sda vendor: Western Digital model: WD10SPZX-75Z10T1
size: 931.51 GiB speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter>
rev: 1A02 scheme: MBR
ID-2: /dev/sdb vendor: LITE-ON model: CV8-8E128-11 SATA 128GB
size: 119.24 GiB speed: 6.0 Gb/s serial: <filter> rev: 10B scheme: GPT
RAID:
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
v: 3.0 port: f060 bus ID: 00:17.0 chip ID: 8086.282a rev: 21
Partition:
ID-1: / size: 116.38 GiB used: 11.60 GiB (10.0%) fs: ext4 dev: /dev/sdb2
Sensors:
System Temperatures: cpu: 38.0 C mobo: 29.0 C sodimm: 33.0 C gpu: nouveau
temp: 35 C
Fan Speeds (RPM): cpu: 0
Info:
Processes: 269 Uptime: 21m Memory: 15.56 GiB used: 1008.5 MiB (6.3%)
Init: systemd v: 237 runlevel: 5 Compilers: gcc: 7.4.0 alt: 7 Shell: bash
v: 4.4.20 running in: gnome-terminal inxi: 3.0.27
olva@olva-Inspiron-7572:~$ lsblk -so +model,serial,hotplug /dev/sd[a-z]
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MODEL SERIAL HOTPLUG
sda 8:0 0 931,5G 0 disk WDC WD10SPZX WXR1A480R65K 0
sdb 8:16 0 119,2G 0 disk LITEON CV8-8 TW059X3VLOH0085M0 0
olva@olva-Inspiron-7572:~$ lsblk -f /dev/sd[a-z]
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
└─sda1 ext4 f027a9a6-2c44-4597-aca3-0b522e636e63 /media/olva/f027a9a6-2c44-4597-aca3-0b522e636e63
sdb
├─sdb1 vfat 468A-BAC4 /boot/efi
└─sdb2 ext4 c3fc442a-3627-4667-8983-07f5eaa1f168 /
olva@olva-Inspiron-7572:~$

Thanks again for your help.

jglen490
Level 5
Level 5
Posts: 585
Joined: Sat Jul 15, 2017 9:57 pm

Re: Transfer /home to a hard drive

Post by jglen490 » Wed Aug 14, 2019 4:58 pm

Do you want a relocation solution, or a backup solution?
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

User avatar
coffee412
Level 5
Level 5
Posts: 912
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Transfer /home to a hard drive

Post by coffee412 » Wed Aug 14, 2019 5:11 pm

Here is how I remember how I moved my /home directory.

Boot from a live dvd or flash drive.
Mount your (root filesystem)partition (if not already) on the hard drive. (/mnt/diskdrive)
Mount the drive you want to move the /home directory too. (/mnt/newhome)

You can rsync your /home directory to the new location (/mnt/newhome)

rsync -a /mnt/diskdrive/home /mnt/newhome

Reboot after complete.
Make a mount point in your /etc/fstab for the new home location drive.
So, The new location in the fstab should be mounted as /home and /home should exist on the new home drive - created when you ran rsync.

then issue "mount -a" to reread the fstab and will remount the /home directory according to the /etc/fstab file.

Hope this helps.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp 12.0.3 * Mint 18.3 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36
************* Get Your Linux on! ***************

Osmario
Level 2
Level 2
Posts: 52
Joined: Wed Jul 18, 2018 12:04 am

Re: Transfer /home to a hard drive

Post by Osmario » Wed Aug 14, 2019 5:42 pm

I want a relocation solution not a backup solution

gm10
Level 18
Level 18
Posts: 8233
Joined: Thu Jun 21, 2018 5:11 pm

Re: Transfer /home to a hard drive

Post by gm10 » Wed Aug 14, 2019 6:07 pm

Here's a detailed walkthrough on moving home I had posted for another user: viewtopic.php?p=1504378#p1504378. Replace /dev/sda8 in that post with the partition you want to move your /home to.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
coffee412
Level 5
Level 5
Posts: 912
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Transfer /home to a hard drive

Post by coffee412 » Wed Aug 14, 2019 6:48 pm

Osmario wrote:
Wed Aug 14, 2019 5:42 pm
I want a relocation solution not a backup solution
Thats what I posted.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp 12.0.3 * Mint 18.3 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36
************* Get Your Linux on! ***************

deck_luck
Level 3
Level 3
Posts: 150
Joined: Mon May 27, 2019 6:57 pm
Location: here

Re: Transfer /home to a hard drive

Post by deck_luck » Sat Aug 17, 2019 12:23 am

OSMario,
Did you get /home migrated to another disk?
💡Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime. ✝️

Osmario
Level 2
Level 2
Posts: 52
Joined: Wed Jul 18, 2018 12:04 am

Re: Transfer /home to a hard drive

Post by Osmario » Sun Aug 18, 2019 9:17 am

Hi deck_luck

(Did you get /home migrated to another disk?)

Not yet.
I received several instructions (thanks to everyone). So I am confused and afraid to choose the best method.
Today I am breathing strong in order to gain courage to start to.

Best Regards

deck_luck
Level 3
Level 3
Posts: 150
Joined: Mon May 27, 2019 6:57 pm
Location: here

Re: Transfer /home to a hard drive

Post by deck_luck » Sun Aug 18, 2019 1:15 pm

Before performing any major disk management I encourage you to perform a full backup of all your file systems. If you accidentally select sda instead of sdb you can accidentally overwrite the wrong disk. Do not even consider continuing with the /home migration until you perform a valid full backup. It would be ideal if you have multiple full backups.
💡Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime. ✝️

Post Reply

Return to “Newbie Questions”