Re: moving the /var partition

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

 



Chris Purcell wrote:
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

I don't think this worked. I *know* my cp -prx blah blah didn't work. I get several errors when I reboot:


chmod: failed to get attributes of '/var/log/wtmp': No such file or directory.

I am guessing these files were not copied or created properly in the /user filesystem.


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


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

Chris




I also tried used parted to copy the filesystem, but parted didn't work. I'm guessing it was expecting an ext2 filesystem, when it was actually an ext3 filesystem. I was also hoping to use parted to reduce what will be a 60GB /var partition to something more managable. No joy there either.


Does parted not work with ext3?

Bill


-- 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