I've got a new scsi disk, which I want to use for the /home partition. I've run cfdisk for /dev/sdb and mkreiserfs. I'vr created a /home2 directory for /dev/sdb and copied the old /home to /home2. Then I've made a soft link from /home to /home2. My question is, how can I use the space in /dev/sda that I had devoted to the old /home ? I'd like to use this space for /usr, perhaps also increase the size of the swap space (btw, how much space should I give to swap?) Thanks Agus Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo@ija.csic.es
On Wed, 12 Mar 2003, Agustin Lobo wrote:
I've got a new scsi disk, which I want to use for the /home partition. I've run cfdisk for /dev/sdb and mkreiserfs. I'vr created a /home2 directory for /dev/sdb and copied the old /home to /home2. Then I've made a soft link from /home to /home2.
This is the wrong way to do this, you would be better off changing /etc/fstab so that the new partition (/dev/sdb) is mounted at /home. Then you can delete the old /home partition and expand the size to recover the space.
My question is, how can I use the space in /dev/sda that I had devoted to the old /home ? I'd like to use this space for /usr, perhaps also increase the size of the swap space (btw, how much space should I give to swap?)
Thanks
Agus
Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo@ija.csic.es
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wed, 12 Mar 2003, Tom Wesley wrote:
On Wed, 12 Mar 2003, Agustin Lobo wrote:
I've got a new scsi disk, which I want to use for the /home partition. I've run cfdisk for /dev/sdb and mkreiserfs. I'vr created a /home2 directory for /dev/sdb and copied the old /home to /home2. Then I've made a soft link from /home to /home2.
This is the wrong way to do this, you would be better off changing /etc/fstab so that the new partition (/dev/sdb) is mounted at /home. Then you can delete the old /home partition and expand the size to recover the space.
True, but my problem was that I could not backup the contens of the original /home, simply had no device for that. So I had to copy it to te new disk. Was there an alternative under these circumstances? Agus
On Wed, 12 Mar 2003, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Tom Wesley wrote:
On Wed, 12 Mar 2003, Agustin Lobo wrote:
I've got a new scsi disk, which I want to use for the /home partition. I've run cfdisk for /dev/sdb and mkreiserfs. I'vr created a /home2 directory for /dev/sdb and copied the old /home to /home2. Then I've made a soft link from /home to /home2.
This is the wrong way to do this, you would be better off changing /etc/fstab so that the new partition (/dev/sdb) is mounted at /home. Then you can delete the old /home partition and expand the size to recover the space.
True, but my problem was that I could not backup the contens of the original /home, simply had no device for that. So I had to copy it to te new disk. Was there an alternative under these circumstances?
Yeah, there is nothing wrong with mount the /home2 temporarily, but then you can just change that partition to mount at /home instead so you don't need the soft link.
Agus
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Sorry I ask too much, but I'm kind of paranoic with this: On Wed, 12 Mar 2003, Tom Wesley wrote:
Yeah, there is nothing wrong with mount the /home2 temporarily, but then you can just change that partition to mount at /home instead so you don't need the soft link.
But how can I do it while keeping the data in /home2 ? If I change the mounting point, would I be able to access the data? Or can I just change the name of the mounting point? Also, once this is done, my question was how can I give the space of the older /home in /dev/sda to /usr. Should I use cfdisk? Thanks Agus
On Wednesday 12 March 2003 10:26, Agustin Lobo wrote:
Sorry I ask too much, but I'm kind of paranoic with this:
On Wed, 12 Mar 2003, Tom Wesley wrote:
Yeah, there is nothing wrong with mount the /home2 temporarily, but then you can just change that partition to mount at /home instead so you don't need the soft link.
But how can I do it while keeping the data in /home2 ? If I change the mounting point, would I be able to access the data? Or can I just change the name of the mounting point?
Yes, it doesn't matter where you mount the filesystem containing the data (within reason). The data exists on the filesystem in the partition independently of where it's mounted in the (logical) filesystem.
Also, once this is done, my question was how can I give the space of the older /home in /dev/sda to /usr. Should I use cfdisk?
From looking at your /etc/fstab (in other reply) the space released by deleteing the contents of the original /home will be available to any
directory under / (root-fs) except /boot and /home since they are now on separate physical partitions/devices. So, it'll be available for /usr, but also /var, /tmp, ... If you want to make it only available to /usr then you'll be needing to do more re-partitioning which (IMHO) would be more trouble than it's worth... Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Wednesday 12 March 2003 10:05, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Tom Wesley wrote:
On Wed, 12 Mar 2003, Agustin Lobo wrote:
I've got a new scsi disk, which I want to use for the /home partition. I've run cfdisk for /dev/sdb and mkreiserfs. I'vr created a /home2 directory for /dev/sdb and copied the old /home to /home2. Then I've made a soft link from /home to /home2.
This is the wrong way to do this, you would be better off changing /etc/fstab so that the new partition (/dev/sdb) is mounted at /home. Then you can delete the old /home partition and expand the size to recover the space.
True, but my problem was that I could not backup the contens of the original /home, simply had no device for that. So I had to copy it to te new disk. Was there an alternative under these circumstances?
No, but you should delete the contents of the old /home diectory and mount the new one in its place. Was /home or /usr mounted on a partition or just part of your root filesystem? Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Wed, 12 Mar 2003, Dylan wrote:
No, but you should delete the contents of the old /home diectory and mount the new one in its place. Was /home or /usr mounted on a partition or just part of your root filesystem?
Dylan I had:
/dev/sda3 / reiserfs defaults 1 1 /dev/sda1 /boot ext2 defaults 1 2 /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 /dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0 /dev/sda4 /home reiserfs defaults 1 2 Now I have: #/dev/sda4 /home reiserfs defaults 1 2 /dev/sdb /home2 reiserfs defaults 1 2 Agus
On Wed, 12 Mar 2003, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Dylan wrote:
No, but you should delete the contents of the old /home diectory and mount the new one in its place. Was /home or /usr mounted on a partition or just part of your root filesystem?
Dylan I had:
/dev/sda3 / reiserfs defaults 1 1 /dev/sda1 /boot ext2 defaults 1 2 /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 /dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0 /dev/sda4 /home reiserfs defaults 1 2
Now I have:
#/dev/sda4 /home reiserfs defaults 1 2 /dev/sdb /home2 reiserfs defaults 1 2
Agus
OK, let's see if we can fix this Log in a root, remove the /home link mkdir /home change /etc/fstab to read: /dev/sdb /home reiserfs defauls 1 2 then you need to fdisk /dev/sda delete the partition write the table then you need to resize a partition to take advantage of the new space. I'd check the reiserfs site for details on that. Tom
On Wed, 12 Mar 2003, Tom Wesley wrote:
OK, let's see if we can fix this
Log in a root, remove the /home link mkdir /home change /etc/fstab to read: /dev/sdb /home reiserfs defauls 1 2
and, at this point, I understand that I would have to mount: mount /dev/sdb /home right? And, after that, all the files that I have in /home2 would be available under /home? no need to copy? Agus
On Wednesday 12 March 2003 13:31, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Tom Wesley wrote:
OK, let's see if we can fix this
Log in a root, remove the /home link mkdir /home change /etc/fstab to read: /dev/sdb /home reiserfs defauls 1 2
and, at this point, I understand that I would have to mount: mount /dev/sdb /home
right?
Yes
And, after that, all the files that I have in /home2 would be available under /home? no need to copy?
That's right, but I'm not sure why you are using /dev/sdb (which is the raw device) rather that e.g. /dev/sdb1 (which is a partition on the device. Can you tell us how you set up the disc? Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Wed, 12 Mar 2003, Dylan wrote:
That's right, but I'm not sure why you are using /dev/sdb (which is the raw device) rather that e.g. /dev/sdb1 (which is a partition on the device. Can you tell us how you set up the disc?
I used cfdisk /dev/sdb and selected primary partition type 83 and put all the space in... sdb1 (you are right, I should be using sdb1 and not sdb). Then I formatted (reiser) with mkreiserfs /dev/sdb any problem for not having used mkreiserfs /dev/sdb1 ? Then, the final recipe: 1. Remove the s link home -> /home2/ (btw, How? I cannot use rm /home, I would actually delete /home2 and the data!) 2. mkdir /home 3. Edit /etc/fstab and put /dev/sdb1 /home reiserfs defaults 1 2 instead of /dev/sdb /home2 reiserfs defaults 1 2 4. mount /dev/sdb1 /home ok? And then, the question on how to get the space in /dev/sda3 take the empty /dev/sda4. Agus
On Wednesday 12 March 2003 14:08, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Dylan wrote:
That's right, but I'm not sure why you are using /dev/sdb (which is the raw device) rather that e.g. /dev/sdb1 (which is a partition on the device. Can you tell us how you set up the disc?
I used cfdisk /dev/sdb and selected primary partition type 83 and put all the space in... sdb1 (you are right, I should be using sdb1 and not sdb).
Then I formatted (reiser) with mkreiserfs /dev/sdb
any problem for not having used mkreiserfs /dev/sdb1
I can't say for sure, can you mount one and not the other? or both?
?
Then, the final recipe:
1. Remove the s link home -> /home2/
(btw, How? I cannot use rm /home, I would actually delete /home2 and the data!)
No, I don't think it would! But to be safe unmount /home2 first, then remove the link and the /home2 mountpoint
2. mkdir /home
3. Edit /etc/fstab and put
/dev/sdb1 /home reiserfs defaults 1 2
instead of
/dev/sdb /home2 reiserfs defaults 1 2
4. mount /dev/sdb1 /home
Yes, or mount -a
ok?
And then, the question on how to get the space in /dev/sda3 take the empty /dev/sda4.
Now, if sda4 is bigger than you need for your /usr then you could copy /usr into sda4 and simply mount it on /usr (deleting the old contents, of course). or you could mount sda4 as /tmp or /var to free that space, the options are varied... Dylan
Agus
-- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Wed, 12 Mar 2003, Dylan wrote:
any problem for not having used mkreiserfs /dev/sdb1
I can't say for sure, can you mount one and not the other? or both?
If I put /dev/sdb /home2 reiserfs defaults 1 2 in fstab, and mount -a I get: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems Which I do not if I use /dev/sdb Agus
On Wednesday 12 March 2003 14:48, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Dylan wrote:
any problem for not having used mkreiserfs /dev/sdb1
I can't say for sure, can you mount one and not the other? or both?
If I put /dev/sdb /home2 reiserfs defaults 1 2 in fstab, and mount -a I get:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems
Which I do not if I use /dev/sdb
Can you clarify this... /dev/sdb gives you an error, but /dev/sdb doesn't? Oh, and please sort out your mail client - it isn't necessary to reply to me directly as well as on the list. Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Wed, 12 Mar 2003, Dylan wrote:
Can you clarify this... /dev/sdb gives you an error, but /dev/sdb doesn't?
Sorry for the typo: /dev/sdb1 /home2 reiserfs defaults 1 2 in fstab gives the following error after mount -a: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems while with /dev/sdb /home2 reiserfs defaults 1 2 mount -a works fine. agus
On Wednesday 12 March 2003 10:01 am, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Dylan wrote:
Can you clarify this... /dev/sdb gives you an error, but /dev/sdb doesn't?
Sorry for the typo:
/dev/sdb1 /home2 reiserfs defaults 1 2 in fstab
gives the following error after mount -a:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems
while with /dev/sdb /home2 reiserfs defaults 1 2
mount -a works fine.
agus
This is because you created your FS (reiserfs) with /dev/sdb -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 03/12/03 09:57 + +----------------------------------------------------------------------------+ "Every heart that has beat strong and cheerfully has left a hopeful impulse behind it in the world, and bettered the tradition of mankind." - Robert Louis Stevenson
On Wed, 12 Mar 2003, Bruce Marshall wrote:
On Wednesday 12 March 2003 10:01 am, Agustin Lobo wrote:
/dev/sdb1 /home2 reiserfs defaults 1 2 in fstab
gives the following error after mount -a:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems
while with /dev/sdb /home2 reiserfs defaults 1 2
mount -a works fine.
This is because you created your FS (reiserfs) with /dev/sdb
Yes, the point is whether this could cause problems in the future. I don't think so, as I'm puting all the disk space in one single partition /dev/sdb for /home. But, if required, I still could copy back to /dev/sda4 now, format with the correct name /dev/sdb1 and copy the data again. But if /dev/sdb is ok, I would rather leave it as it is, as the data take a long time to be copied and there is always the risk of an error at copying... Agus
On Wed, 12 Mar 2003, Agustin Lobo wrote:
On Wed, 12 Mar 2003, Dylan wrote:
Can you clarify this... /dev/sdb gives you an error, but /dev/sdb doesn't?
Sorry for the typo:
/dev/sdb1 /home2 reiserfs defaults 1 2 in fstab
gives the following error after mount -a:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, or too many mounted file systems
while with /dev/sdb /home2 reiserfs defaults 1 2
mount -a works fine.
agus
Use 'fdisk /dev/sdb' then the "p" option to print the partition information, but if something works, why fix it? ;) Tom
participants (4)
-
Agustin Lobo
-
Bruce Marshall
-
Dylan
-
Tom Wesley