вторник, 26 января 2016 г.

Portable Drive Re-Partitioning for FreeBSD

10

Attach the device and find its geom using the next command
% camcontrol devlist
The command shows something like this:
<Optiarc DVD RW AD-5280S 1.01>     at scbus0 target 0 lun 0 (pass0,cd0)
<ST1500DM003-9YN16G CC4B>          at scbus1 target 0 lun 0 (pass1,ada0)
<Multi Flash Reader 1.00>          at scbus6 target 0 lun 0 (da0,pass2)
<WD My Passport 0828 1012>         at scbus7 target 0 lun 0 (da1,pass3)
<WD SES Device 1012>               at scbus7 target 0 lun 1 (ses0,pass4)

20

Check out the existing partitioning scheme:
% gpart show da1
The command will show you current partitioning for the device specified by geom (da1 in the example).

30

Destroy the existing scheme using
# gpart destroy -F da1
The -F key is not required, but the last time I used it.
The command replies: da1 destroyed.

40

Create new scheme:
# gpart create -s GPT da1
da1 created

50

Add a partition using the next command.
# gpart add -t freebsd da1
da1s1 created

60

Grow file system on the recently created partition:
% newfs -L passport -U -o time /dev/da1s1
You may have to detach and attach the device back before newfs'ing to avoid an I/O error while formatting.

Комментариев нет:

Отправить комментарий