Re: /sbin/mke2fs /dev/hdb12


Subject: Re: /sbin/mke2fs /dev/hdb12
From: Ken Schweigert (ken@byte-productions.com)
Date: Wed Jan 16 2002 - 08:26:37 MST


David,

pdisk and parted are packages seperate from bash and the kernel. I believe
parted is installed in a default install, but pdisk will have to be installed
from the CD. Mount the CD and look for a RPM like pdisk-0.8-2.ppc.rpm. Then
do a 'rpm -ivh pdisk-0.8-2.ppc.rpm' to get it installed.

The entry you put in /etc/mtab should go into /etc/fstab instead. /etc/mtab
is a "system file" that maintains a list of currently mounted filesystems.
Once you reboot, the file is re-initialized.

Once you reboot, and /home is set to /dev/hdb12, your original /home partition
and it's data won't be available to you. You have two options, maybe more, to
move your data. 1) move your data to a partition that won't get unmounted on
reboot; or 2) create a new mount point and mount the original partition there.
If I were doing it, #2 would be the "best" way. Remember, your data will
always be on that partition until you do something destructive to that
partition; over-write or delete files or re-initialize.

When you reboot, switch user to root:
  [ken@byte-8 ken]$ su -
  Password:
  [root@byte-8 /root]#

Create your new mount point:
  [root@byte-8 /root]# mkdir /mnt/oldhome

Mount your old home partition:
  [root@byte-8 /root]# mount -t ext2 /dev/hdaX /mnt/oldhome

Verify you have oldhome and home mounted (both should be listed):
  [root@byte-8 /root]# mount

Copy your data to the new home:
  [root@byte-8 /root]# cp -a /mnt/oldhome /home

Verify your data copied. If so, unmount oldhome:
  [root@byte-8 /root]# umount /mnt/oldhome

Enjoy your new home partition.

--
-Ken Schweigert, Aspiring Network Administrator
Byte Productions, LLC
http://www.byte-productions.com

On Tue, Jan 15, 2002 at 07:50:43PM -0500, david wright wrote: > Well i seemed to have created a ext2 partition on my secondary drive. I say > "seemed" because i can't seem to access it or find it. I had previously had a > hfs+ filesystem there. I tried to use 'pdisk' or 'parted' neither of which is > available in my 'bash' version, huh? (kernel 2.4.10) - there are man pages > for parted though, 'pdisk' does not exist. i also did man fdisk but that > seems to be more for DOS systems, they also recommend that you don't use it. > (use cfdisk instead which i didn't have either) > > I looked at every partition (hpmount /dev/hdbx) on hdb and found that i > wanted 12 for my ext2 system, so that's when i ran /sbin/mke2fs /dev/hdb12 (i > did get the print out that a filesystem had been created) I also added > /dev/hdb12 / ext2 rw 0 0 to /etc/mtab but when i rebooted, the new filesystem > does not mount. and the line i appended does not appear therein. What am i > missing? how do i use this new ext2 partition? > > All i really wanted to do was move /home to my second hard drive so i would > not be writing unecessary data to my primary disk and filesystem. What is the > best way to do this? (I don't need a whole new filesystem there, just a few > directories) > > *i did check and at least the data on my other hfs+ filesystems on hdb were > unharmed, which was a concern. > > thanks, as always. > > > -david > > "i think they call this horrific process learning,... "



This archive was generated by hypermail 2a24 : Wed Jan 16 2002 - 08:41:21 MST