Author Topic: Not sure I got my /home partition mounted correctly (SOLVED)  (Read 1255 times)

Offline Cressida

  • Sr. Member
  • ****
  • Posts: 283
Not sure I got my /home partition mounted correctly (SOLVED)
« on: March 20, 2012, 06:28:31 PM »
I had to do a reinstall and am trying to get my existing partitions mounted properly.   /dev/sda6 is my /home (or that is what I want it to be).  
I followed some commands to get it mounted but not sure it is mounted to work as /home since is says /mnt/here.  How can I change it to be my  /home partition like it orginally was ?


[root@localhost ~]# df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              38G  3.5G   32G  10% /
/dev/sda6              58G   13G   46G  22% /mnt/here   -?
/dev/sda7              79G   12G   64G  15% /media/Data
/dev/sda2              20G  2.9G   16G  16% /media/Root_OS
[root@localhost ~]#
« Last Edit: March 21, 2012, 08:06:50 AM by Cressida »
AMD Athlon 64 3200, 2GB ram,  ~320 GB HD,  Video=ATI Radeon X300 SE (128mb) PCI-e
KDE     Kern  3.2.18-pclos2.a64

I used to think I knew a lot about computers until I started using Linux.  Now I feel my age...

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11541
  • ----IOFLU----
Re: Not sure I got my /home partition mounted correctly
« Reply #1 on: March 20, 2012, 06:36:55 PM »
I had to do a reinstall and am trying to get my existing partitions mounted properly.   /dev/sda6 is my /home (or that is what I want it to be).   
I followed some commands to get it mounted but not sure it is mounted to work as /home since is says /mnt/hereHow can I change it to be my  /home partition like it orginally was ?


[root@localhost ~]# df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              38G  3.5G   32G  10% /
/dev/sda6              58G   13G   46G  22% /mnt/here   -?
/dev/sda7              79G   12G   64G  15% /media/Data
/dev/sda2              20G  2.9G   16G  16% /media/Root_OS
[root@localhost ~]#


You place an entry in /etc/fstab to mount it at /home.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Not sure I got my /home partition mounted correctly
« Reply #2 on: March 20, 2012, 07:46:09 PM »
Quote
You place an entry in /etc/fstab to mount it at /home.

@ OP

for my information

Would using PCC /Local disks/manage disk partitions be in any way different, that you know of ?
I just ask, in case there is a difference !

Thanks
Xena

edit: What I mean is, are there any " if "  and   " but  " lurking around ?
« Last Edit: March 20, 2012, 09:05:37 PM by Xenaflux »
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Cressida

  • Sr. Member
  • ****
  • Posts: 283
Re: Not sure I got my /home partition mounted correctly
« Reply #3 on: March 20, 2012, 08:04:05 PM »
For my info as well since editing fstab is over my head.

I looked into the PCC / manage disk partitions but didn't understand the comments about moving files into /home or possibly hiding them?  
Here is the message it gives:

Directory /home already contains data
(james, mysql)

You can either choose to move the files into the partition that will be mounted there or leave them where they are (which results in hiding them by the contents of the mounted partition)


Will executing this command via PCC accomplish the desired results ?

Here is what my disk shows now:

fdisk -l -u=cylinders

Disk /dev/sda: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009289d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        4909    39422976   83  Linux
/dev/sda2            4909        7522    20992000   83  Linux
/dev/sda3            7522       48642   330295296    5  Extended
/dev/sda5            7522        7593      569344   82  Linux swap / Solaris
/dev/sda6           11545       19194    61440000   83  Linux
/dev/sda7           23758       34211    83968000   83  Linux
[root@localhost ~]# blkid
/dev/sda2: LABEL="Root_OS" UUID="66c19e56-47fd-4c7b-b06e-96b3cd9a74fd" TYPE="ext4"
/dev/sda6: LABEL="Home" UUID="2fb347a6-5760-407d-b118-cda9d0fbc37f" TYPE="ext4"
/dev/sda7: LABEL="Data" UUID="ac9fa70e-5579-40fd-a72e-3824e9d26cae" TYPE="ext4"
/dev/sda1: UUID="3cfe5bd3-083f-4036-939e-5db0785d95e5" TYPE="ext2"
/dev/sda5: UUID="8858bf4a-53d8-4a10-b8b8-e567c9c53897" TYPE="swap"
[root@localhost ~]#


And Fstab:

# Entry for /dev/sda1 :
UUID=3cfe5bd3-083f-4036-939e-5db0785d95e5 / ext2 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=8858bf4a-53d8-4a10-b8b8-e567c9c53897 swap swap defaults 0 0
none /dev/pts devpts defaults 0 0
« Last Edit: March 20, 2012, 09:12:24 PM by Cressida »
AMD Athlon 64 3200, 2GB ram,  ~320 GB HD,  Video=ATI Radeon X300 SE (128mb) PCI-e
KDE     Kern  3.2.18-pclos2.a64

I used to think I knew a lot about computers until I started using Linux.  Now I feel my age...

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11541
  • ----IOFLU----
Re: Not sure I got my /home partition mounted correctly
« Reply #4 on: March 20, 2012, 09:06:50 PM »
For my info as well since editing fstab is over my head.

I looked into the PCC / manage disk partitions but didn't understand the comments about moving files into /home or possibly hiding them?  
Here is the message it gives:

Directory /home already contains data
(james, mysql)

You can either choose to move the files into the partition that will be mounted there or leave them where they are (which results in hiding them by the contents of the mounted partition)


Will executing this command via PCC accomplish the desired results ?

For the moment I'd just cover up what's in the /home directory. Get the mounting right, and be sure all your settings are as you want them after you reboot. You can later copy or delete that which is in the /home directory from the live CD into your users directory on the partition.

If you choose to move the new files from the /home directory to the partition, they may overwrite your desired settings.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6372
  • I'm going South
Re: Not sure I got my /home partition mounted correctly
« Reply #5 on: March 20, 2012, 09:29:55 PM »
For my info as well since editing fstab is over my head.

I looked into the PCC / manage disk partitions but didn't understand the comments about moving files into /home or possibly hiding them?  
Here is the message it gives:

Directory /home already contains data
(james, mysql)

You can either choose to move the files into the partition that will be mounted there or leave them where they are (which results in hiding them by the contents of the mounted partition)


Will executing this command via PCC accomplish the desired results ?

Because /dev/sda6 got the wrong mountpoint when you reinstalled, a new /home directory was created on your root partition (/dev/sda1). If you now just mount /dev/sda6 on /home, it will cover your new /home directory. The sda6 partition will become your /home and the /home that was already created on your root partition will be hidden behind it. The data on it will seem to have disappeared. The problem is that it still takes up space on your your root partition.

To solve this problem PCC offers to move the data in your present /home to the partition that is going to be mounted on /home. Normally, you should let it do so, but it is impossible to know if this may lead to conflicts between the data on your present /home and data that already exists on your /dev/sda6. Just letting the partition hide everything in your present /home is the safer alternative, but it means that you won't regain the disk space. You have to get it back later.
« Last Edit: March 20, 2012, 10:06:54 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Cressida

  • Sr. Member
  • ****
  • Posts: 283
Re: Not sure I got my /home partition mounted correctly
« Reply #6 on: March 21, 2012, 08:05:55 AM »
I used the PCC / manage disk partitions with the election to hide everything in the orginal /home.   It seemed to have worked just fine as I have my desktop and settings back now.

Thanks for the additional background info on what is going on behind the scene with this Bald Brick.  Also to Old Polack for your helpful instructions.
AMD Athlon 64 3200, 2GB ram,  ~320 GB HD,  Video=ATI Radeon X300 SE (128mb) PCI-e
KDE     Kern  3.2.18-pclos2.a64

I used to think I knew a lot about computers until I started using Linux.  Now I feel my age...

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11541
  • ----IOFLU----
Re: Not sure I got my /home partition mounted correctly
« Reply #7 on: March 21, 2012, 09:27:23 AM »
I used the PCC / manage disk partitions with the election to hide everything in the orginal /home.   It seemed to have worked just fine as I have my desktop and settings back now.

Thanks for the additional background info on what is going on behind the scene with this Bald Brick.  Also to Old Polack for your helpful instructions.

To recover the space on /dev/sda1, boot to the liveCD, open a terminal, su to root, and issue the following commands;

[root@localhost ~]# mkdir -p /mnt/here                      <Enter>

[root@localhost ~]# mount /dev/sda1 /mnt/here                  <Enter>

[root@localhost ~]# rm -rf /mnt/here/home/*                       <Enter>

To check that the /mnt/here/home directory is now an empty directory, as it should be;

[root@localhost ~]# ls -l /mnt/here/home                         <Enter>
total 0
[root@localhost ~]#

Reboot to the installed system.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...