Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Home partition (disk) can be changed without reinstall Linux?
#1
I have 3 disks on my computer
sda - root disk (120 GB SDD)
sdc - home dilsk (160 GB HDD)
sdb - new disk (2TB HDD)

Can I change home disk (160GB) to new disk (2TB) without reinstall Ubuntu 18.04?
If is possible, how can i do that?
Reply
#2
You certainly can.  Is the new 2TB in use at all?  Do you want to use all 2TB for your /home/ or do you have something else in mind. 

Please post the output from the following commands:


Code:
cat /etc/fstab

lsblk -f
Idea  Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.

Reply
#3
Code:
miro@Asus:~/Documents/post-install$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=84857e02-de00-4da3-a92a-4258d4a559ea /               ext4    errors=remount-ro 0       1
# /home was on /dev/sdb1 during installation
UUID=a0c0fece-5397-4e5d-8d10-8c6b23c0e114 /home           ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0
miro@Asus:~/Documents/post-install$ lsblk -f
NAME   FSTYPE   LABEL UUID                                 MOUNTPOINT
loop2  squashfs                                            /snap/gnome-logs/45
loop4  squashfs                                            /snap/core/6350
loop5  squashfs                                            /snap/gtk-common-themes/818
loop6  squashfs                                            /snap/gnome-3-26-1604/74
sda                                                        
└─sda1 ext4           84857e02-de00-4da3-a92a-4258d4a559ea /
sdb                                                        
└─sdb1 ext4           a0c0fece-5397-4e5d-8d10-8c6b23c0e114 /home
sdc                                                        
└─sdc1 ext4           94789980-81ff-46b4-82f5-820adb37e40d /media/miro/94789980-81ff-46b4-82f5-820adb37e40d

I reinstalled Ubuntu on sda and /home on sdb, but i want to know how to change /home disk when I will buy a new HDD for my kid.
Reply
#4
Sorry I have not been feeling well and have not replied to you. 

Your Linux skill level is unknown to me.   Are you a new user?  Do you feel comfortable running the command line or require a GUI?

Are you going to be using the entire new storage device for /home?
Idea  Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.

Reply
#5
(08-01-2019, 08:11 PM)Mironov Wrote: I reinstalled Ubuntu on sda and /home on sdb, but i want to know how to change /home disk when I will buy a new HDD for my kid.

So if I understand correctly, you will use the new HDD instead of the one that's sdb now, and you'll remove the disk that is sdb now?

I think the only thing you'll have to do is
- make the partitions and format them on the new HDD
- copy all the data from your current sdb to the new HDD
- as root, you have to edit your /etc/fstab so that the UUID= part is modified to the UUID of the new HDD. You can check the UUID by the lsblk -f command.
My top 10 reasons to still use Arch after 2 months on my main PC at home.
Reply
#6
So you are basically adding a new HDD and making it your new /home hard drive...
Like TarsolyGer said, you have to make some changes to the "fstab"
Watch joe's video below on how to Add a HDD and change your fstab boot file...
https://www.youtube.com/watch?v=AeR8Rk5LwWU&t=824s

BTW, I always use 2 hard drives anymore, a 160gb (I just got 6 from goHDD.com for $8.00 each) for the OS "Mint 18.3" and a 1TB for my /home on all my systems. So if I change Distro's my /home is on a seperate drive and I just point the installation to that drive for the /home (Do not format the Home Dir).....
I watched it 3 times until I got what was going on... Good Luck!
-Bruce
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#7
(08-03-2019, 06:43 PM)deck_luck Wrote: Sorry I have not been feeling well and have not replied to you. 

Your Linux skill level is unknown to me.   Are you a new user?  Do you feel comfortable running the command line or require a GUI?

Are you going to be using the entire new storage device for /home?

I'm using Linux for an year and a half, but I'm a newbie. I have not a problem using terminal. Yes, I use entire disk for /home.
Thank you for answer. You and TarsolyGer gave me the complete solution.

(08-03-2019, 07:34 PM)TarsolyGer Wrote:
(08-01-2019, 08:11 PM)Mironov Wrote: I reinstalled Ubuntu on sda and /home on sdb, but i want to know how to change /home disk when I will buy a new HDD for my kid.

So if I understand correctly, you will use the new HDD instead of the one that's sdb now, and you'll remove the disk that is sdb now?

I think the only thing you'll have to do is
- make the partitions and format them on the new HDD
- copy all the data from your current sdb to the new HDD
- as root, you have to edit your /etc/fstab so that the UUID= part is modified to the UUID of the new HDD. You can check the UUID by the lsblk -f command.
Yes, current sdb will be removed, and a new HDD will replace it.
Thank you for solution.
Reply
#8
(08-07-2019, 03:24 AM)bescott9944 Wrote: So you are basically adding a new HDD and making it your new /home hard drive...
Like TarsolyGer said, you have to make some changes to the "fstab"
Watch joe's video below on how to Add a HDD and change your fstab boot file...
https://www.youtube.com/watch?v=AeR8Rk5LwWU&t=824s

BTW, I always use 2 hard drives anymore, a 160gb (I just got 6 from goHDD.com for $8.00 each) for the OS "Mint 18.3" and a 1TB for my /home on all my systems. So if I change Distro's my /home is on a seperate drive and I just point the installation to that drive for the /home (Do not format the Home Dir).....
I watched it 3 times until I got what was going on... Good Luck!
-Bruce
Thank you Bruce for YouTube link. Is very useful how to mount and manipulate (in my case) 3rd disk. 
Joe Collins:  IMPORTANT UPDATE: Ubuntu 18.04 dropped the gksudo command. You can just use sudo in its place. Ex. sudo nemo
Reply
#9
(08-07-2019, 06:33 AM)Mironov Wrote:
(08-07-2019, 03:24 AM)bescott9944 Wrote: So you are basically adding a new HDD and making it your new /home hard drive...
Like TarsolyGer said, you have to make some changes to the "fstab"
Watch joe's video below on how to Add a HDD and change your fstab boot file...
https://www.youtube.com/watch?v=AeR8Rk5LwWU&t=824s

I watched it 3 times until I got what was going on... Good Luck!
-Bruce
Thank you Bruce for YouTube link. Is very useful how to mount and manipulate (in my case) 3rd disk. 
Joe Collins:  IMPORTANT UPDATE: Ubuntu 18.04 dropped the gksudo command. You can just use sudo in its place. Ex. sudo nemo
Yep they did.. I never used gksudo at all. I just used a terminal and sudo nemo... lol
I use the GUI a lot still, but I find myself using the terminal more all the time....  Wink
Glad I could help!

LLAP
-Bruce
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#10
The gksu package which includes gksudo has not been maintained for many years and was dwindling in most distro repository.  Most popular distros have already remove gksudo and for some reason Ubuntu held out until 18.04.  They must have had to invest more effort to integrate PolKit's pkexec. Alternatively, for editing system configuration files, the gvfs has builtin support for admin://paths that automatically invoke PolKit as needed for example the "gedit admin:///etc/fstab" command.  Eventually all of the dust will settle, and we will all consider the gksu package as a package from back in the day.
 
Idea  Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)