Re: moving the /var partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Tangren said:
> Hello all,
>
> I know this has been addressed on this list before, but I can't seem to
> find it in the archives. If someone can point it out, I would be very
> appreciative.
>
> My /var partition is nearly full. I installed a new hard disk, used
> fdisk to partition it. I then used mke2fs to make an ext3 partition I
> called /user. I then added a line for it in /etc/fstab.
>
> What I want to do at this point is to make move /var to /user and give
> them each others names. I went into single user mode and copied
> everything from /var to /user
>
> # cp -prx /var/* /user
>
> What is(are) the next step(s)?
>
> I couldn't figure this out, so I noticed that the largest file in /var
> is /var/log/lastlog, so I tried making a hard link to /user/log/lastlog.
>  No joy.
>
> Any ideas?
>
> TIA,
>
> Bill Tangren

I would boot into rescue (or single user) mode and use find/cpio to copy
/var/ to /user/.

find /var -xdev | cpio -pmduv /user

...and then just rename them and modify your fstab file.

mv /var /var.old
mv /user /var
mv /var.old /user

Chris



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux