카테고리 없음

4T HDD Attache to UBUNTU

mulderu 2018. 9. 13. 15:18



4T HDD Attache to UBUNTU


ref : http://dev-random.net/creating-mounting-partition-lager-2-tb-linux/


my screen dump

----------------------------------------------


root@ddh-ws01:~# lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda      8:0    0   3.7T  0 disk 

└─sda1   8:1    0   3.7T  0 part /DATA

sdb      8:16   0 489.1G  0 disk 

├─sdb1   8:17   0   512M  0 part /boot/efi

├─sdb2   8:18   0 456.6G  0 part /

└─sdb3   8:19   0    32G  0 part [SWAP]

sdc      8:32   0   3.7T  0 disk 

sdd      8:48   0   3.7T  0 disk 

root@ddh-ws01:~# parted /dev/sdc

GNU Parted 3.2

Using /dev/sdc

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) help                                                             

  align-check TYPE N                        check partition N for TYPE(min|opt)

        alignment

  help [COMMAND]                           print general help, or help on COMMAND

  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)

  mkpart PART-TYPE [FS-TYPE] START END     make a partition

  name NUMBER NAME                         name partition NUMBER as NAME

  print [devices|free|list,all|NUMBER]     display the partition table, available

        devices, free space, all found partitions, or a particular partition

  quit                                     exit program

  rescue START END                         rescue a lost partition near START and

        END

  resizepart NUMBER END                    resize partition NUMBER

  rm NUMBER                                delete partition NUMBER

  select DEVICE                            choose the device to edit

  disk_set FLAG STATE                      change the FLAG on selected device

  disk_toggle [FLAG]                       toggle the state of FLAG on selected

        device

  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER

  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition

        NUMBER

  unit UNIT                                set the default unit to UNIT

  version                                  display the version number and copyright

        information of GNU Parted

(parted) mklabel gpt                                                      

(parted) unit GB                                                          

(parted) mkpart primary 0.0GB 4000.8GB                                    

(parted) print                                                            

Model: ASMT ASM1352R-PM (scsi)

Disk /dev/sdc: 4001GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags: 


Number  Start   End     Size    File system  Name     Flags

 1      0.03GB  4001GB  4001GB               primary


(parted) quit                                                             

Information: You may need to update /etc/fstab.


root@ddh-ws01:~# mkfs.ext4 /dev/sdc1                                      

mke2fs 1.42.13 (17-May-2015)

/dev/sdc1 alignment is offset by 512 bytes.

This may result in very poor performance, (re)-partitioning suggested.

Creating filesystem with 976741831 4k blocks and 244187136 inodes

Filesystem UUID: 445160f3-ec1e-4117-9b98-53ceac323f6f

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 

102400000, 214990848, 512000000, 550731776, 644972544


Allocating group tables: done                            

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information:            

done


root@ddh-ws01:~# 

root@ddh-ws01:~# cd /mnt

root@ddh-ws01:/mnt# ls

x

root@ddh-ws01:/mnt# mkdir sdc1

root@ddh-ws01:/mnt# ls -l /dev/disk/by-uuid/

total 0

 

lrwxrwxrwx 1 root root 10  9월 13 15:11 445160f3-ec1e-4117-9b98-53ceac323f6f -> ../../sdc1

lrwxrwxrwx 1 root root 10  9월  6 09:04 D1C5-AAE1 -> ../../sdb1

root@ddh-ws01:/mnt# vi /etc/fstab


# DATA

UUID=445160f3-ec1e-4117-9b98-53ceac323f6f  /mnt/sdc1       ext4    errors=remount-ro 0       1


root@ddh-ws01:/mnt# mount -a

root@ddh-ws01:/mnt# df -h

Filesystem      Size  Used Avail Use% Mounted on

udev             16G     0   16G   0% /dev

tmpfs           3.2G  306M  2.9G  10% /run

/dev/sdb2       450G  348G   80G  82% /

tmpfs            16G  159M   16G   1% /dev/shm

tmpfs           5.0M  4.0K  5.0M   1% /run/lock

tmpfs            16G     0   16G   0% /sys/fs/cgroup

/dev/sdb1       511M  3.6M  508M   1% /boot/efi

/dev/sda1       3.6T   55G  3.4T   2% /DATA

tmpfs           3.2G   84K  3.2G   1% /run/user/1001

/dev/sdc1       3.6T   68M  3.4T   1% /mnt/sdc1

root@ddh-ws01:/mnt#