mke2fs hard drive with files on it?

Discussion in 'Site & Server Administration' started by GMROCKS, Jul 3, 2007.

  1. #1
    We got our backup drive from layered tech and they installed it on the server, I'm trying to figure out a way to mount and access the data on the hard drive.
    this is what I plan to do:

    create a filesystem on our new partition.
    # mke2fs -j /dev/hdc1

    Create a mount point and add the new filesystem to the fstab so it is mounted automatically.
    mkdir /mnt/drive2
    echo "/dev/hdc1 /mnt/drive2 ext3 defaults 0 0" >> /etc/fstab

    Mount your new filesystem and verify that it mounted correctly.
    mount /mnt/drive2
    mount /dev/hdc1 on /mnt/drive2 type ext3 (rw)

    I need to make sure that I don't lose the files and want to know if mke2fs will hurt the current file system on the disk.
     
    GMROCKS, Jul 3, 2007 IP
  2. turiel

    turiel Peon

    Messages:
    148
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're creating a brand new partition and using mke2fs on that, then it will not hurt the other partitions. If you're using mke2fs on an existing partition then all the data on that partition will be wiped.
     
    turiel, Jul 5, 2007 IP
  3. GMROCKS

    GMROCKS Active Member

    Messages:
    648
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks

    I figured that out and succesfully mounted and restored data from the hard drive.
     
    GMROCKS, Jul 5, 2007 IP