Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

/home on other partion move

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


siefke_listen at web

Jul 16, 2012, 8:34 AM

Post #1 of 9 (323 views)
Permalink
/home on other partion move

Hello,

my hdd is full and on the free partion i want make the /home partion.
But how can make it? Copy and fstab? When i mount the partion over thunar
i can not write as user on the partion.

/dev/sda3 on /run/media/siefke/data type ext4 (rw,nosuid,nodev,uhelper=udisks2)

Has someone a advice for me? Thank you.

Regards
Silvio


mikemol at gmail

Jul 16, 2012, 8:53 AM

Post #2 of 9 (318 views)
Permalink
Re: /home on other partion move [In reply to]

On Mon, Jul 16, 2012 at 11:34 AM, Silvio Siefke <siefke_listen [at] web> wrote:
> Hello,
>
> my hdd is full and on the free partion i want make the /home partion.
> But how can make it? Copy and fstab? When i mount the partion over thunar
> i can not write as user on the partion.
>
> /dev/sda3 on /run/media/siefke/data type ext4 (rw,nosuid,nodev,uhelper=udisks2)
>
> Has someone a advice for me? Thank you.

Here's how I'd do it. Take a backup first! At least a couple of these
commands could result in massive data loss if you have a typo. It's
also pretty important that you be logged in as root, and that no user
whose home directory is under /home is currently logged in.

# Create your target filesystem
mkfs.ext4 $your_new_partition

# Mount your target filesystem
mount -t auto $your_new_partition /mnt/

# Copy your data to your target filesystem.
cp -a /home/* /mnt/

Verify that the data that was in /home now exists in /mnt

# Remove the data from /home/, as it will otherwise continue taking up
space on your hard disk.
rm -rf /home/*

# Unmount your target filesystem,
umount /mnt/

Modify /etc/fstab to mount $your_new_partition at /home

# Mount your new /home
mount /home

--
:wq


realnc at gmail

Jul 16, 2012, 9:03 AM

Post #3 of 9 (320 views)
Permalink
Re: /home on other partion move [In reply to]

On 16/07/12 18:34, Silvio Siefke wrote:
> Hello,
>
> my hdd is full and on the free partion i want make the /home partion.
> But how can make it? Copy and fstab? When i mount the partion over thunar
> i can not write as user on the partion.

You cannot write to /home directly, only in your own /home/me home
directory.


> /dev/sda3 on /run/media/siefke/data type ext4 (rw,nosuid,nodev,uhelper=udisks2)

You should probably apply a label to the partition (like "Home") and
then in fstab:

LABEL=Home /home ext4 defaults,exec 0 2

Make sure you moved and not copied your old /home/* stuff. If you
copied, then delete the old /home:

rm -rf /home
mkdir /home

If you really want to write to /home directly as a user, then unmount it
and do:

chmod a+w /home

Now mount it, and do the above command again. Everyone will now be able
to write to /home (and the permission will be kept between
mounts/unmounts/reboots.)


siefke_listen at web

Jul 16, 2012, 9:30 AM

Post #4 of 9 (319 views)
Permalink
Re: Re: /home on other partion move [In reply to]

On Mon, 16 Jul 2012 19:03:33 +0300
Nikos Chantziaras <realnc [at] gmail> wrote:

> You cannot write to /home directly, only in your own /home/me home
> directory.

I have formated the new partion with gparted in ext4. Then have mount
the partion mount /dev/sda3 /home/siefke/ext, but with user rights i can
not write to the partion. When i use root then yes. Now i have mounted
the partion in fstab

UUID=9d9e53c3-c3b2-4b96-9958-c79c42e0d20f /home/siefke/ext ext4 defaults 1 1

The same, with user rights can not write.


Regards
Silvio


mikemol at gmail

Jul 16, 2012, 9:35 AM

Post #5 of 9 (321 views)
Permalink
Re: Re: /home on other partion move [In reply to]

On Mon, Jul 16, 2012 at 12:30 PM, Silvio Siefke <siefke_listen [at] web> wrote:
> On Mon, 16 Jul 2012 19:03:33 +0300
> Nikos Chantziaras <realnc [at] gmail> wrote:
>
>> You cannot write to /home directly, only in your own /home/me home
>> directory.
>
> I have formated the new partion with gparted in ext4. Then have mount
> the partion mount /dev/sda3 /home/siefke/ext, but with user rights i can
> not write to the partion. When i use root then yes. Now i have mounted
> the partion in fstab
>
> UUID=9d9e53c3-c3b2-4b96-9958-c79c42e0d20f /home/siefke/ext ext4 defaults 1 1
>
> The same, with user rights can not write.

The root directory of the new filesystem is owned by root.

The only way I know to fix this would be to replace 'defaults' with
'user=siefke' on your fstab line.

--
:wq


siefke_listen at web

Jul 16, 2012, 10:20 AM

Post #6 of 9 (316 views)
Permalink
Re: /home on other partion move [In reply to]

Hello,

all is done. Now the /home is in other Partion. Sometimes make self trouble
where is no trouble.


Thanks at all.

Regards
Silvio


volkerarmin at googlemail

Jul 16, 2012, 10:52 AM

Post #7 of 9 (313 views)
Permalink
Re: /home on other partion move [In reply to]

Am Montag, 16. Juli 2012, 19:20:55 schrieb Silvio Siefke:
> Hello,
>
> all is done. Now the /home is in other Partion. Sometimes make self trouble
> where is no trouble.
>
>
> Thanks at all.
>
> Regards
> Silvio

could have been so simple... just create partition, mount somewhere, cp -a,
clean /home, mount, fstab:
UUID=BLABLUB /home/ ext4 noatime,discard 0 0

done.
So easy that I can't even remember anything even easier. Maybe putting /tmp on
tmpfs... hm...


--
#163933


realnc at gmail

Jul 16, 2012, 11:48 AM

Post #8 of 9 (313 views)
Permalink
Re: /home on other partion move [In reply to]

On 16/07/12 19:30, Silvio Siefke wrote:
> On Mon, 16 Jul 2012 19:03:33 +0300
> Nikos Chantziaras <realnc [at] gmail> wrote:
>
>> You cannot write to /home directly, only in your own /home/me home
>> directory.
>
> I have formated the new partion with gparted in ext4. Then have mount
> the partion mount /dev/sda3 /home/siefke/ext, but with user rights i can
> not write to the partion.

As explained in my previous post, you can "chmod a+w" the "ext"
directory when the FS is not mounted, then mount it and "chmod a+w" again.



> UUID=9d9e53c3-c3b2-4b96-9958-c79c42e0d20f /home/siefke/ext ext4 defaults 1 1

You should probably be using "0 2" instead of "1 1". See "man fstab" on
what these do. If you don't know what "filesystem dumping" is, you
don't need to set the first field to 1. The second field is set to 2,
because your root FS should be the only one with fsck priority 1. All
other should be priority 2.


neil at digimed

Jul 18, 2012, 7:29 AM

Post #9 of 9 (313 views)
Permalink
Re: Re: /home on other partion move [In reply to]

On Mon, 16 Jul 2012 12:35:54 -0400, Michael Mol wrote:

> The root directory of the new filesystem is owned by root.
>
> The only way I know to fix this would be to replace 'defaults' with
> 'user=siefke' on your fstab line.

You can just do "chown user: /mount/point" with the filesystem mounted.
The user= mount options only work with non-Linux filesystems.

But /home should be owned and only writeable by root.


--
Neil Bothwick

Age and treachery will always overcome youth and skill.
Attachments: signature.asc (0.19 KB)

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.