I bought a new USB hard drive the other day. Kúpil som si nový pevný disk USB druhý deň. I wanted to use it to create backups of my Linux server. Chcel som ju použiť na vytvorenie zálohy môj server Linux. Here's how I went about formatting and mounting the drive on my Linux server. Tu je návod, ako som sa o formátovanie a montáž pohonu na mojom serveri Linux.
The first thing I did was to find out where the disk had been mounted. Prvá vec, ktorú som urobil, bolo zistiť, kde sa disk bol namontovaný. For that I ran the following command: Bežal som, že pre nasledujúci príkaz:
# tail -F /var/log/messages # Chvost-F / var / log / messages
When I plugged in the drive into my server there was a message saying the the drive was available at /dev/sdc1. Keď som pripojený na pevný disk do môjho serveri došlo k chybe pri jednotky boli k dispozícii / dev/sdc1. So the next step was to format the drive. Takže ďalším krokom bola formát disku. There are a number of file formats that can by read and written to by Linux, but Windows is a bit more fussy about it. Existuje celý rad formátov súborov, ktoré možno podľa čítať a zapísať v Linuxe, ale Windows je trochu úzkostlivo o tom. So I decided to use a tried and tested file system that works well with both operating systems. Tak som sa rozhodol použiť osvedčený systém súborov, ktorý funguje s oboma operačnými systémami. I went with FAT. Išiel som s FAT. So to format the drive as FAT I ran the following command: Takže formátovanie disku FAT som bežal nasledujúci príkaz:
# mkfs.vfat /dev/sdc1 # Mkfs.vfat / dev/sdc1
In a few minutes the newly formatted drive was ready to go. Za niekoľko minút novo formátovaný disk bol pripravený na cestu. Now I wanted to mount it. Teraz som chcel nasadnúť. So I created a directory to mount it: Tak som vytvoril adresár pripojiť je nasledujúci:
# mkdir /media/usbdisk # Mkdir / media / usbdisk
Now, to mount the drive to this mount point I ran the following command: Teraz, namontovať pohon na tento prípojný bod som bežal nasledujúci príkaz:
# mount -t vfat /dev/sdc1 /media/usbdisk # Mount-t vfat / dev/sdc1 / media / usbdisk
And that's it. A to je všetko. My new hard drive was formatted, mounted, and ready to go. Môj nový pevný disk formátovania, montáž, a je pripravená ísť. I copied the data I wanted to copy on it and then I unmounted it: Som skopíroval údaje som chcel skopírovať na neho a potom som ho odpojiť:
# umount /media/usbdisk # Umount / media / usbdisk
NOTE : this last step is very important. POZNÁMKA: Tento posledný krok je veľmi dôležitý. If you unplug your drive without unmounting it you could risk the data it holds. Ak sa odpojíte vaša cesta bez odpojenia, že by ste mohli riziko údaje, ktoré drží.
If this is a USB storage device that you might use often and plan to leave it hooked up to your Linux server you can set up the device to be automatically mounted when you boot into Linux. Pokiaľ ide o USB zariadenie, ktoré môžete použiť a často v pláne nechať napojené na server Linux môžete nastaviť prístroj tak, aby sa automaticky pripoja pri štarte do Linuxu. To do that make an entry like the one shown below at the end of file /etc/fstab : K tomu, aby záznam ako je uvedené nižšie na koniec súboru / etc / fstab:
/dev/sdc1 /mnt/usbdrive vfat defaults 0 0 / Dev/sdc1 / mnt / usbdrive vfat defaults 0 0
Now your drive will be automatically mounted to your Linux server, and you can take your backups without worrying about mounting a device. Teraz je Váš disk bude automaticky pripojené k serveru Linux, a môžete si vziať preddavku bez obáv o montáž zariadení.























please hiw do i format my pc hard drive?Each time i try do do so the computer tells me it cant.Also, i tried to uninstall an ms program the other day prosím HIW do i formátu má pc pevný disk? Zakaždým sa snažím robiť to počítač mi hovorí, že cant.Also, já tried až k uninstall ms program na druhý deň
but the system went off before it could complete uninstalling.since then i cant open any ms package,remove program or add any.what must i do to get my system to normal. ale systém odišiel pred tým, ako mohol dokončiť uninstalling.since potom já dotírat generický akýkoľvek ms balík, odstrániť alebo pridať program any.what musím urobiť, aby sa môj systém do normálneho stavu.