You are not logged in.
Pages: 1
Hello,
I bought a new 500gb hard drive as a backup for uni, but then decided to install arch on it (and leave 200 gig or so for the backup, as I really don't need more). I made four partitions: root, swap, home, and because I do quite a bit of developing and stuff (abs is quite frankly the bees knees) a /var/...however, the more observant of you will notice that that is four partitions. Woops.
Is there any way to move /var/ somewhere else, and change the partition table or whatever accordingly? I have everything all setup now and I'd really rather not reinstall. I assume not, but i'll ask anyway!
Cheers,
Josh
Edit: Hmm, found this:
1) Reboot into single user mode
2) Mount the var partition somewhere else and copy the contents to /var
3) Edit fstab, comment out /var
4) Unmount the var partition and reboot
Can anyone explain that a little bit more if thats how you do it? Not sure if this should be in newbie corner, really...
Last edited by Tleilaxu (2010-02-06 23:51:28)
Offline
Well. All steps are correct. Just a few comments.
1) Booting in single mode should prevent starting of any daemons and let you copy all the files. The most secure way is to boot from, for example, LiveCD and mount your root partition and new var partition from there.
2) Don't forget to use -p parameter of cp. It will save file permissions.
3) Don't do any mistakes in this file:)
4) PROFIT!
Hi, thanks for the answer.
So,
1) Add 'single' to end of kernel grub line
2) umount sdb2 (the partition with var on)
mount it in another place (i.e. /media/oldvar), which then leaves an 'empty' /var/ like you do if you have a mount point for another hard drive that isn't mounted (?)
copy oldvar/* to /var/? (With -p! Cheers! That would of been a headache.)
3) comment out fstab sdb2 line
4) unmount /media/oldvar, reboot?
Last edited by Tleilaxu (2010-02-07 02:52:23)
Offline
So you problem is that you have four partitions on the one hard drive?
Instead of moving var off it you could decide one of the following solutions:
1. Use extended partitions:
Your HDD: |--root--|--extended--/var/swap/home/anything_else/--|--Uni Stuff--|
2. Use LVM to manage your storage. (recommend)
Your HDD: |--/boot--|--LVM--|--Uni stuff--|
Offline
So you problem is that you have four partitions on the one hard drive?
Instead of moving var off it you could decide one of the following solutions:1. Use extended partitions:
Your HDD: |--root--|--extended--/var/swap/home/anything_else/--|--Uni Stuff--|2. Use LVM to manage your storage. (recommend)
Your HDD: |--/boot--|--LVM--|--Uni stuff--|
Yeah, but that would mean I'd have to reinstall wouldn't it?
Offline
Well, you'd have to reformat the disk, yes.
If you have a spare disk, you could copy the existing installation to the spare (don't do this while booted on the existing installation, use a LiveCD or something), reformat the original, then copy back.
Or you could reformat and then reinstall from scratch. Could be easier.
Offline
I have everything all setup now and I'd really rather not reinstall. I assume not, but i'll ask anyway!
The point is doing it in a way in which doesn't require me to reinstall. I'm quite aware of LVM, etc. Indeed, if I were to reinstall I'd just not make a separate /var/.
Hi, thanks for the answer.
So,
1) Add 'single' to end of kernel grub line
2) umount sdb2 (the partition with var on)
mount it in another place (i.e. /media/oldvar), which then leaves an 'empty' /var/ like you do if you have a mount point for another hard drive that isn't mounted (?)
copy oldvar/* to /var/? (With -p! Cheers! That would of been a headache.)3) comment out fstab sdb2 line
4) unmount /media/oldvar, reboot?
As Coacher was saying, would this work?
Cheers,
Josh
Offline
1) Add 'single' to end of kernel grub line. TO BE CLEAR: THEN REBOOT.
2) umount sdb2 (the partition with var on)
mount it in another place (i.e. /media/oldvar), which then leaves an 'empty' /var/ like you do if you have a mount point for another hard drive that isn't mounted (?)
copy oldvar/* to /var/? (With -p! Cheers! That would of been a headache.) YOU'LL ALSO NEED AT LEAST -r. BEST OFF USING -a, WHICH INCLUDES -p -r PLUS MORE
3) comment out fstab sdb2 line
4) unmount /media/oldvar, reboot?
That should work.
Offline
1) Add 'single' to end of kernel grub line. TO BE CLEAR: THEN REBOOT.
2) umount sdb2 (the partition with var on)
mount it in another place (i.e. /media/oldvar), which then leaves an 'empty' /var/ like you do if you have a mount point for another hard drive that isn't mounted (?)
copy oldvar/* to /var/? (With -p! Cheers! That would of been a headache.) YOU'LL ALSO NEED AT LEAST -r. BEST OFF USING -a, WHICH INCLUDES -p -r PLUS MORE3) comment out fstab sdb2 line
4) unmount /media/oldvar, reboot?
That should work.
Cool, looked up -a.
Thanks, you've both been very helpful.
Last edited by Tleilaxu (2010-02-08 00:58:21)
Offline
fumbles wrote:So you problem is that you have four partitions on the one hard drive?
Instead of moving var off it you could decide one of the following solutions:1. Use extended partitions:
Your HDD: |--root--|--extended--/var/swap/home/anything_else/--|--Uni Stuff--|2. Use LVM to manage your storage. (recommend)
Your HDD: |--/boot--|--LVM--|--Uni stuff--|
Yeah, but that would mean I'd have to reinstall wouldn't it?
Well apart from a reconfiguring of a kernel, changing some config files, and copying stuff here and there.... not at all! The fun of arch linux!
Last edited by fumbles (2010-02-09 11:10:03)
Offline
Pages: 1