Link to home
Start Free TrialLog in
Avatar of Frank DiPiazza
Frank DiPiazzaFlag for United States of America

asked on

Linux File System install on USB 256GB

Working with Linux, ClearOS 7.x
Trying to install a USB 256Gb Drive.
Used the FDISK /dev/sdf1 option to partition the drive.
Used the mkfs function to put a File System on the drive.
Are there any docs that explain the partition, and FS install process. I keep failing.
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Please see below link on how to manage partitions and filesystems

https://www.ibm.com/developerworks/library/l-lpic1-v3-104-1/
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Frank DiPiazza

ASKER

This is what I have been doing...I must have another issue.
I also use the t option. I've tried c, and 83. I still can't get a good rsync.
Avatar of noci
noci

Indeed the t option is also needed. 
After you created the filesystem you still need to mount the device:
(windows does the same the mounted devices are called A:, C: etc.).

mount /dev/sdh1 /mnt

Then you can pull the data into /mnt.

Is it possible to use a drive without partitioning? (Use the Whole Drive)
fdisk /dev/sdh
o   create a new empty DOS partition table

Open in new window

w Write to disk & Exit

At what point can I make /dev/sdh, where the whole drive is mounted to use. (Just Partition 0, file system ext2)
When/how do I make Partition 0 an ext2 file system? mkfs.ext2

Empty new partition table is not the same as no partition table...
It is what is say a partition table with NO allocated blocks and a completely empty drive. (No usable partitions).

If you want no partition tables it's easy (an unusable in MOST systems except for unix derived ones... you may get warnings)
On windows systems you will be asked if the drive needs formatting.
Again assuming /dev/sdh as the USB drive:    mkfs.ext4 /dev/sdh
Also keep in mind the mount command needs to become: (*to mount on /mnt): mount -t ext4 /dev/sdh /mnt
Done.

The drive IS NOT mounted on /dev/sdh, that is an internal name.  (More like Drive0, Drive1 in windows.)
After the mount command has been given the Block storage devices (/dev/sdh) is mounted on directory mentioned directory (/mnt).
This is all Linux related, not windows.
I use fstab, example:
LABEL=BACKUP01          /store/BACKUP01         ext2    defaults,noauto 0 0
LABEL=BACKUP02          /store/BACKUP02         ext2    defaults,noauto 0 0
The fdisk -l, example:
Disk /dev/sdd: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes

 Device Boot      Start         End      Blocks   Id  System
-nothing here-

When mounted, df -h -T
/dev/sdd               ext2      459G  167G  270G  39% /store/BACKUP01

So this is an empty DOS partition table, and mounted as listed here.
Essentially, it is Partition 0, correct?
Do you see a problem with this?





SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So using fdisk /dev/sdd and making an empty dos partition table isn't necessary?
It is a new drive that should be empty. Other wise deleting any partitions is my first step.

Also, I don't actually have to set the "c" on that empty table either?

Thank you for responding and understanding my novice questions.

Using fdisk ONLY makes sense if you want a partition table / or BSD disk label on the device. Otherwise it is useless, as the same block will be used for a raw device Filesystem header.
The partitiontable is erase/overwritten etc. by the mkfs.whatever to park the homeblock on the same place.
(BTW, there are other partition schema's that are more flexible than the MBR/ BIOS one.
GPT is slightly better, although not realy dynamic, LVM (logical Volume management) has far grater potential.