[Sussex] Label and partition external hard drive

'Fay Zee' sussex at eglug.org.uk
Tue Feb 22 15:53:29 UTC 2011


Hi All

I've acquired a 3 1/2" 160GB e-SATA hard drive in an external USB
case that I want to use to back up my files. I need to give it a
meaningful volume name to distinguish it from my other external
devices and I've searched and found some of the commands I need. But
I'm stuck on steps 4, 5 and 6 below. Please could someone help me out?
My preference is always for CLI over graphical as I can save the
commands for future use.

---------------------------------------------------------
1. Discover the device name allocated to the external hdd
and find out how many partitions it has
---------------------------------------------------------
BEFORE attaching external hdd:
$ ls -l /dev/sd*
Now attach external hdd and re-run above command. Look for the added
line.

RESULT:
brw-rw---- 1 root disk   8, 80 2011-02-19 23:45 /dev/sdf
brw-rw---- 1 root disk   8, 81 2011-02-19 23:45 /dev/sdf1

---------------------------------------------------------
2. Discover the size of the external hard drive partition
---------------------------------------------------------
# df /dev/sdf1
(If multiple partitions, run $ df /dev/sdf*)

RESULT:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdf1             150G   91M  149G   1%
/media/New Volume

---------------------------------------------------------------------
3. Assign Dos type device name to the external hdd prior to using
mlabel
---------------------------------------------------------------------
# cat /etc/mtools.conf
# echo -e "ndrive x: file="/dev/sdf1"" >> /etc/mtools.conf

---------------------------------------------------
4. Display existing volume name of the external hdd
---------------------------------------------------
# mlabel ????????
I want to know how to view the label first.
I'm nervous at this point as I don't want to corrupt the drive.

---------------------------------------------
5. Give the external hard drive a volume name
---------------------------------------------
mlabel or e2label or tune2fs are mentioned on this link:
http://www.linuxquestions.org/questions/linux-general-1/how-to-change-volume-label-of-the-usb-drives-594875/
But the instructions aren't precise enough - I don't want to corrupt
the disk!

------------------------------------------------------------------
6. Partition the external hdd into 3 partitions of 50GB each
Format one for a Windows file system and the others for Linux only
------------------------------------------------------------------
I also need help here! This is my first external device large enough
to benefit from partitioning (I've only ever partitioned during OS
installation until now).

 Best Regards,
Fay
East Grinstead Linux User Group
www.eglug.org.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/sussex/attachments/20110222/cbb8f91b/attachment.htm>


More information about the Sussex mailing list