LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 03-13-2021, 03:28 PM   #1
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Rep: Reputation: 21
Copy sda home to sdb home


Copy /home on sda to /home sdb.
sdb is external and is connected by USB.

sdb has infrequently been used to back up sda.

sda has linuxmint cinnamon 18.0.

sdb is upgraded to linuxmint 20.1.

$ sudo fdisk -l
Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 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: dos
Disk identifier: 0x000a79b4

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2046 1464844287 1464842242 698.5G 5 Extended
/dev/sda5 2048 111732735 111730688 53.3G 83 Linux
/dev/sda6 111734784 119545855 7811072 3.7G 82 Linux swap / Solaris
/dev/sda7 119547904 1464844287 1345296384 641.5G 83 Linux

sda7 is home has 93,286 items, totalling 401.9 GB.

Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe3a7dfc5

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 58593844 58591797 28G 83 Linux
/dev/sdb2 58595326 1953330322 1894734997 903.5G 5 Extended
/dev/sdb5 58595328 66406399 7811072 3.7G 82 Linux swap / Solaris
/dev/sdb6 66408448 1953330322 1886921875 899.8G 83 Linux

sdb6 is home has 276.1 GB on it, 678.3 GB free.


I could just drag and drop.

Thinking rsync is the way to go. Will rsync copy to sdb6 only what has not been copied to it before?

Will existing files on sdb be updated if oldr than those on sda?
 
Old 03-13-2021, 03:50 PM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by borgward View Post
Thinking rsync is the way to go. Will rsync copy to sdb6 only what has not been copied to it before?
I do not believe you can rsync to a device, so you will have to mount sdb6 - for example, /mnt/home then run rsync.


Quote:
Originally Posted by borgward View Post
Will existing files on sdb be updated if oldr than those on sda?
Correct
 
Old 03-23-2021, 10:28 AM   #3
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
Not sure how to mount sdb6. When I connect the USB HDD /media/tom/6dee8358-96c7-47e2-9adc-9ad58609886f pops up in Nemo.
 
Old 03-23-2021, 10:30 AM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by borgward View Post
Not sure how to mount sdb6. When I connect the USB HDD /media/tom/6dee8358-96c7-47e2-9adc-9ad58609886f pops up in Nemo.
What does "df -h" show you?

Is this related to thread here:
https://www.linuxquestions.org/quest...b6-4175692480/
 
Old 03-23-2021, 10:37 AM   #5
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 395M 6.3M 388M 2% /run
/dev/sda5 53G 10G 40G 21% /
tmpfs 2.0G 2.8M 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda7 632G 375G 225G 63% /home
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 395M 76K 395M 1% /run/user/1000
/dev/sdb1 28G 7.7G 19G 30% /media/tom/6dee8358-96c7-47e2-9adc-9ad58609886f
 
Old 03-23-2021, 10:37 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Per your other thread UUID 6dee... is sdb1. I would assume that sdb6 is also automatically mounted in a similar manner.
 
Old 03-23-2021, 11:23 AM   #7
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by michaelk View Post
Per your other thread UUID 6dee... is sdb1. I would assume that sdb6 is also automatically mounted in a similar manner.
sdb6 is not automatically mounted.
 
Old 03-23-2021, 11:30 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Okay, have you tried mounting it?
 
Old 03-23-2021, 11:36 AM   #9
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
sudo mount /dev/sdb6
[sudo] password for tom:
mount: wrong fs type, bad option, bad superblock on /dev/sdb6,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
tom@tom-Inspiron-1520120 ~ $ dmesg | tail
[223636.765931] sd 7:0:0:0: [sdb] 4096-byte physical blocks
[223636.767021] sd 7:0:0:0: [sdb] Write Protect is off
[223636.767027] sd 7:0:0:0: [sdb] Mode Sense: 5f 00 00 08
[223636.767530] sd 7:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[223636.810087] sdb: sdb1 sdb2 < sdb5 sdb6 >
[223636.814207] sd 7:0:0:0: [sdb] Attached SCSI disk
[223637.710177] EXT4-fs (sdb1): recovery complete
[223637.710187] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[228831.972214] JBD2: no valid journal superblock found
[228831.972225] EXT4-fs (sdb6): error loading journal
 
Old 03-23-2021, 11:50 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
You should specify a fstype and mount point...

Code:
JBD2: no valid journal superblock found
EXT4-fs (sdb6): error loading journal
Does Mint 20 boot ok?
 
Old 03-23-2021, 11:52 AM   #11
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
It Did. Will try booting from USB, and will also put it back in the laptop to see if it boots there.
 
Old 03-23-2021, 12:10 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Does sdb6 ext4 filesystem have a journal?

Its possible to mount it without a journal there could be other problems with the filesystem.

Just reading some other forum threads where some foreign filesystems did not mount but should of been compatible...

Last edited by michaelk; 03-23-2021 at 12:11 PM.
 
Old 03-23-2021, 12:52 PM   #13
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by michaelk View Post
Does sdb6 ext4 filesystem have a journal?
Don't know what you mean by "have a journal"

I booted the drive from USB and then internally. In both cases I got a prompt to login. Every time I entered my password I would wait and eventually get the login page again.

The drive w/20.1 was booting before I connected w/USB. I suspected something was wrong with the external USB hard drive enclosure and replaced it w/new. I suspect the old USB device has somehow damaged the HDD, or its files. It was intermittently displaying home, and then not.
 
Old 03-23-2021, 01:12 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Usually ext4 journal is created/used by default when the filesystem is created. If home is not being displayed anymore I suspect the filesystem is corrupted.
 
Old 03-23-2021, 01:18 PM   #15
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 504

Original Poster
Rep: Reputation: 21
I think I will just reinstall. Any other options?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware14.2 on sda, Slackware -current on sdb: LILO in mbr(sda) and sdb2. How to remove lilo from sdb2 san2ban Slackware 11 07-04-2020 12:30 PM
Copy Windows sdb to sda with complexity bulgin Linux - Hardware 2 07-10-2019 11:47 AM
[SOLVED] sda drive to sdb, so new hdd can become sda? irgunII Slackware 5 03-07-2014 08:38 AM
Can i dd if=/dev/sdb of=/dev/sdc if hdsize(sdb)>hdsize(sdc) & size(sdb)<hdsize(sdc) ? ununun Linux - Software 6 06-28-2011 11:48 AM
[SOLVED] Grub: If exists sdb, then boot sdb, else sda defaultyeti Linux - Desktop 6 06-28-2011 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 03:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration