Page 1 of 1

[Solved]Transfer /home to a hard drive

Posted: Tue Aug 13, 2019 8:40 pm
by Osmario
Hi

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

Code: Select all

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.

Re: Transfer /home to a hard drive

Posted: Tue Aug 13, 2019 11:48 pm
by deck_luck
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]

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 2:25 am
by Osmario
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.

Code: Select all

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:~$

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 4:14 am
by deck_luck
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.

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 3:55 pm
by Osmario
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:

Code: Select all

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.

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 4:58 pm
by jglen490
Do you want a relocation solution, or a backup solution?

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 5:11 pm
by coffee412
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.

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 5:42 pm
by Osmario
I want a relocation solution not a backup solution

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 6:07 pm
by gm10
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.

Re: Transfer /home to a hard drive

Posted: Wed Aug 14, 2019 6:48 pm
by coffee412
Osmario wrote:
Wed Aug 14, 2019 5:42 pm
I want a relocation solution not a backup solution
Thats what I posted.

Re: Transfer /home to a hard drive

Posted: Sat Aug 17, 2019 12:23 am
by deck_luck
OSMario,
Did you get /home migrated to another disk?

Re: Transfer /home to a hard drive

Posted: Sun Aug 18, 2019 9:17 am
by Osmario
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

Re: Transfer /home to a hard drive

Posted: Sun Aug 18, 2019 1:15 pm
by deck_luck
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.

Re: Transfer /home to a hard drive

Posted: Fri Sep 06, 2019 3:04 am
by Osmario
[Solved]