Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I know this is an easy task, especially using cPanel. However I want to do this without formatting the drive, since there is sensitive data already on the hard drives. So how would I mount a hard drive, but not format/lose any of the data already on it?
I've looked and everything seems to lead me to believe that I'll lose data if I do it that way.
You mount a directory on a HD into your existing file system. You do not have to format, if the partition has a supported file system You did not say what file system you would like to mount.
Physically add the drive. If it is an internal drive, you may need to go into the BIOS to set up the BIOS for the hardware.
You need to make a mount point in your file system. This is done with the mkdir command. Most systems have a /mnt directory. Open a konsile as root, use CD to go there. 'cd /mnt'. Then use mkdir, 'mkdir /newpart ( or what ever you want to call it ).
Now as root run the mount command. If you need help with mount, then see man mount. If you want to make the mount so it will occur what you boot, edit the /etc/fstab file as root, and add the mount command there.
Basically this is what happened. Sometime last night the data center my server is hosted at lost power. Upon getting the power back on, the hard drives in the system had corrupted file(s) so they put a new hard drive in my server, loaded the same OS on the same file system. Then once that had completed, they plugged in my other two hard drives so I can do data recovery on them.
I typed this command
mount /dev/hdd /mnt/disk1
Then I got a message saying mount: you must specify the filesysyem type
Not sure what to do or if this is the right way to mount it, without losing data.
That is the correct command and you do have to specify the file system type. You can have a look in the man page for fstab. Here is part of it, describing various file system types.
Quote:
The third field, (fs_vfstype), describes the type of the filesystem.
Linux supports lots of filesystem types, such as adfs, affs, autofs,
coda, coherent, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660,
jfs, minix, msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs, romfs,
smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs, and possibly
others. For more details, see mount(8). For the filesystems currently
supported by the running kernel, see /proc/filesystems. An entry swap
denotes a file or partition to be used for swapping, cf. swapon(8). An
entry ignore causes the line to be ignored. This is useful to show
disk partitions which are currently unused. An entry none is useful
for bind or move mounts.
Linux supports a lot of different file systems. You have to find out what you have to mount it.
That is the correct command and you do have to specify the file system type. You can have a look in the man page for fstab. Here is part of it, describing various file system types.
Linux supports a lot of different file systems. You have to find out what you have to mount it.
I disagree. /dev/hdd is a drive not a partition, but you mount partitions. mount usually autodetects the file system type. So Skillz does not have to specify the file system type.
Ok, why would a server reboot drop/delete the mounted hard drives?
I had to remount the hard drives upon a forceful system reboot. Not sure why that would be, scared the heck out of me though when I went to one of the sites and got a file not found, then logged into the server and the directory the hard drive was mounted in was completely empty.
For future references, for myself. I typed:
mount /dev/hdc1 /home2
To mount the hard drive to the home2 directory. Now my question is, why would it erase it like that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.