SOLVED Lenovo T520 SSD and HDD /home location

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

SOLVED Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

SOLVED also see "Starting Over Lenovo T520 thread"

Just upgraded from a Lenovo Thinkpad X60 with 500GB HDD and 3GB RAM. New Machine (Lenovo T520) has 8gb RAM and a 120GB SSD drive in the primary drive location. I have already installed Mint 17.1 on that drive. When I receive the necessary "multi-bay drive caddy I want to link the two drives so I will have one /home location. Is it possible? I have about 90 GB in my current /home and want to store MOST of my data on the secondary drive.
krustybaguette
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Spykie

Re: Lenovo T520 SSD and HDD /home location

Post by Spykie »

You can crate separate /home partition on the same SSD on second one HDD during instalation system.
also you can create ext4 on this HDD and you must to copy all data from /home dir. on this SSD to this new partition and save permissions for files/folder. After that you must edit /etc/fstab to automount new /home partition.

or simple install Linux from zero and setup partiotion manually.
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

Re: Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

Spykie wrote:You can crate separate /home partition on the same SSD on second one HDD during instalation system.
also you can create ext4 on this HDD and you must to copy all data from /home dir. on this SSD to this new partition and save permissions for files/folder. After that you must edit /etc/fstab to automount new /home partition.

or simple install Linux from zero and setup partiotion manually.
I appreciate the reply but am a little confused as to its meaning. In my original post I mentioned that I have already installed LM 17.1 (Cinnamon) on the SSD that is installed in the primary drive location. I plan to move a 500GB hdd from my old machine and install it in the multi bay adapter the uses the same slot as the optical drive (DVR).

I have already moved the contents of my home directory on the old machine to my network backup location and plan to move the physical hdd from the X60 to the T520 soon. If I interpret Spykie's comment correctly I would then need to reformat the 500 GB hdd as ext4 and create a second home directory on that drive which will be semi permanently installed as a secondary hdd using a multi bay adapter.

At present I have not placed much in the home directory that I created when I installed LM 17.1 on the SSD. If I were to copy everything from the old home directory on the hdd it probably would not fit :)

So after I format the 500GB drive, create a /home/kenneth on it I can copy all the data back over from the network storage location.

I'm puzzled by the statement "save permissions for files/folder." Likewise does "edit /etc/fstab to automount new /home partition" make it so ALL new data would by default be saved there or could I choose between the existing home on the SSD and the new home on the HDD?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Lenovo T520 SSD and HDD /home location

Post by Laurent85 »

krustybaguette wrote:When I receive the necessary "multi-bay drive caddy I want to link the two drives so I will have one /home location. Is it possible?
This implies a logical layer above 2 physical partitions with different sizes from two drives. There is lvm or btrfs but i would not recommend such setup mixing ssd and hd drives. You best option would be to use your second drive as a data drive and mount it under any relevant mount point by adding a line to your fstab. A convenient way to access your data is then to use symbolic links in you home directory pointing to second drive.
Image
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

Re: Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

Laurent85 wrote:
krustybaguette wrote:When I receive the necessary "multi-bay drive caddy I want to link the two drives so I will have one /home location. Is it possible?
This implies a logical layer above 2 physical partitions with different sizes from two drives. There is lvm or btrfs but i would not recommend such setup mixing ssd and hd drives. You best option would be to use your second drive as a data drive and mount it under any relevant mount point by adding a line to your fstab. A convenient way to access your data is then to use symbolic links in you home directory pointing to second drive.
I've installed the 500 GB drive in the manner described and the drive is already formatted as ext4 so I am wondering If I could simply delete everything other than the /home and its subfolders and then proceed with adding a mount point and editing the fstab. Symlinks in the /home on my SSD would access data stored there.

Would deleting all the folders except /home leave anything harmful behind? You know, like in Windows? :lol:

Ken
User avatar
Derek_S
Level 6
Level 6
Posts: 1279
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Lenovo T520 SSD and HDD /home location

Post by Derek_S »

Hello krustybaquette - I think this might be more along the lines of what you have in mind:

https://help.ubuntu.com/community/Parti ... ome/Moving

A question about your current partitions on the 120GB SSD: Do you simply have root and swap? Or, do you have root, swap, and home?
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

Re: Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

Derek_S wrote:Hello krustybaquette - I think this might be more along the lines of what you have in mind:

https://help.ubuntu.com/community/Parti ... ome/Moving

A question about your current partitions on the 120GB SSD: Do you simply have root and swap? Or, do you have root, swap, and home?
I did a regular install of Mint 17.1 including root, swap, but my /home is not a partition, just a folder below /

kb
User avatar
Derek_S
Level 6
Level 6
Posts: 1279
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Lenovo T520 SSD and HDD /home location

Post by Derek_S »

Hello krustybaquette - If you do not have a separate /home partition, then the link I provided has the instructions you need to create a new /home partition on another device and then copy the data files from your current /home to the new /home.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

Re: Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

Derek_S wrote:Hello krustybaquette - If you do not have a separate /home partition, then the link I provided has the instructions you need to create a new /home partition on another device and then copy the data files from your current /home to the new /home.
I just checked the 500 GB which up to now has been my primary LM 17.1 disk on an older machine. It has the same partitioning scheme of ext4 / and an extended partition with linux-swap.
No separate /home partition.

Do you think I could use gparted to shrink the /ext4 partition to about 100GB (it shows 95.22GB used right now) I could then create a /home partition formatted as ext4 using what would then be unallocated space (currently showing 367.55 GB "unused")? After that I could safely transfer all data from the /home folders on both drives into the newly created /home partition. As a side benefit, I could then keep the 100 GB "shrunken partition for experimentation with other Linux distros or I could expand the newly created /home partition to fill the 500 GB drive.

krustybaguette
User avatar
Derek_S
Level 6
Level 6
Posts: 1279
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Lenovo T520 SSD and HDD /home location

Post by Derek_S »

Hello krustybaquette - All right, I think I understand what you're trying to do. You have data in the /home directories located in the root partitions of two different Linux OSs on two different disks, and you want to consolidate everything into a single /home partition on the 500GB drive.

1.) Like you said, you can begin by using Gparted to shrink the root partition on the 500GB down to 100GB or so, then create a new partition for /home using the newly created unallocated space and format it ext4. From this point onward, you will be working only from the OS on the 120GB SSD, not the OS on the 500GB drive. Modify your BIOS boot order accordingly.

2.) Please follow the instructions in the link I provided for the specifics, this is just a brief outline what to do.
a.) Modify /etc/fstab in order to mount the new /home partition on the 500GB disk as /media/home at system boot. As per the instructions, this is only a temporary step and will be modified later. Reboot the system after this step is completed.
b.) Copy everything from the /home directory of the system on the 120GB SSD to the new /media/home directory on the 500GB disk using the rsync command.
c.) Use the diff command to verify that everything was copied successfully.
d.) Modify /etc/fstab a second time in order to rename /media/home to /home and make the /home partition on the 500GB your system's permanent /home directory.
e.) Rename the /home directory on the 120GB SSD /old_home. This is a temporary step, just to backup and save a second copy of your data just in case things go wrong with this procedure. After you test the system and are absolutely sure that the operation was successful, you can then delete /old_home. However, do not be in a rush to do this. Better safe than sorry.

3.) Now all that's left is the data in the /home directory of the 500GB disk. You can transfer this data by mounting the root partition, then copying any files from the folders in this OS's /home directory to the corresponding folders in your new /home partition on the 500GB disk.

4.) At this point you are finished and can reboot the system. Again, once you are absolutely certain that everything works and that all of your data from both of both of your old /home directories is accounted for, you can delete /old_home on the 120GB SSD and reformat the 100GB partition on the 500GB disk.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh
krustybaguette
Level 3
Level 3
Posts: 153
Joined: Thu Mar 31, 2011 8:24 am

Re: Lenovo T520 SSD and HDD /home location

Post by krustybaguette »

Derek_S wrote:Hello krustybaquette - All right, I think I understand what you're trying to do. You have data in the /home directories located in the root partitions of two different Linux OSs on two different disks, and you want to consolidate everything into a single /home partition on the 500GB drive.

1.) Like you said, you can begin by using Gparted to shrink the root partition on the 500GB down to 100GB or so, then create a new partition for /home using the newly created unallocated space and format it ext4. From this point onward, you will be working only from the OS on the 120GB SSD, not the OS on the 500GB drive. Modify your BIOS boot order accordingly.

2.) Please follow the instructions in the link I provided for the specifics, this is just a brief outline what to do.
a.) Modify /etc/fstab in order to mount the new /home partition on the 500GB disk as /media/home at system boot. As per the instructions, this is only a temporary step and will be modified later. Reboot the system after this step is completed.
I've gotten this far already BUT when I got that far I used nautilus to copy the old /home directory from the shrunken /sda1 partition to the new /home partition and I added the following line to /etc/fstab which allows me to view the new /home partition, but there seems to be a permissions problem.

UUID="56775fbd-4b6b-4adb-8f59-98d6c148862a" /media/home ext4 defaults 0 2
Derek_S wrote: b.) Copy everything from the /home directory of the system on the 120GB SSD to the new /media/home directory on the 500GB disk using the rsync command.
If I copy the contents of my home directory on the SSD drive to the newly created home partition I am afraid there will be conflicts, especially with my Thunderbird email profile, files on my new Desktop, and Music.
c.) Use the diff command to verify that everything was copied successfully.
What modifiers do I use with the diff command?
d.) Modify /etc/fstab a second time in order to rename /media/home to /home and make the /home partition on the 500GB your system's permanent /home directory.

Would that mean removing the reference to /media in the line I added previously? Hence, UUID="56775fbd-4b6b-4adb-8f59-98d6c148862a" /home ext4 defaults 0 2

There rest; e.), 3.), and 4.) seem pretty straightforward except for the fact that I already copied the data from the /home directory of the (shrunken) 500 GB disk. Since the data was copied, not moved, I can delete it from the new /home partition and recopy it after doing the steps outlined above.

e.) Rename the /home directory on the 120GB SSD /old_home. This is a temporary step, just to backup and save a second copy of your data just in case things go wrong with this procedure. After you test the system and are absolutely sure that the operation was successful, you can then delete /old_home. However, do not be in a rush to do this. Better safe than sorry.

3.) Now all that's left is the data in the /home directory of the 500GB disk. You can transfer this data by mounting the root partition, then copying any files from the folders in this OS's /home directory to the corresponding folders in your new /home partition on the 500GB disk.

4.) At this point you are finished and can reboot the system. Again, once you are absolutely certain that everything works and that all of your data from both of both of your old /home directories is accounted for, you can delete /old_home on the 120GB SSD and reformat the 100GB partition on the 500GB disk.[/quote]
Locked

Return to “Installation & Boot”