0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

RaspberryPi4 外付けSSD編

Last updated at Posted at 2020-02-12

買ったSSD

TCSunBow 外付けSSD120GB USB 3.0
https://www.amazon.co.jp/gp/product/B0784FBV62/

接続確認

おもむろにUSBコネクタに差し込む
dmesgで認識しているか確認

$ dmesg
...
[188855.959585] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[188855.991660] usb 2-2: New USB device found, idVendor=2109, idProduct=0715, bcdDevice=f0.40
[188855.991677] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[188855.991690] usb 2-2: Product: VLI Product String
[188855.991701] usb 2-2: Manufacturer: VLI manufacture String
[188855.991712] usb 2-2: SerialNumber: 0000000000006200
[188855.994517] usb-storage 2-2:1.0: USB Mass Storage device detected
[188855.997133] scsi host0: usb-storage 2-2:1.0
[188857.060516] scsi 0:0:0:0: Direct-Access     TCSUNBOW  P1 120GB        R052 PQ: 0 ANSI: 6
[188857.064345] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB)
[188857.065327] sd 0:0:0:0: [sda] Write Protect is off
[188857.065346] sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00
[188857.066339] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[188857.072851]  sda: sda1
[188857.077995] sd 0:0:0:0: [sda] Attached SCSI disk
[188857.081997] sd 0:0:0:0: Attached scsi generic sg0 type 0

フォーマットとマウント

sudo fdisk /dev/sda # メッセージに従って設定する
sudo mkfs.ext4 /dev/sda1
sudo mkdir /mnt/ex-ssd
sudo mount -t ext4 /dev/sda1 /mnt/ex-ssd

dfしてマウントされているか確認する

df -f | grep ex-ssd
  /dev/sda1        110G   83M  104G    1% /mnt/ex-ssd

起動時にマウントするように設定する

マウントしていたらsudo umount /mnt/ex-ssdで外す

sudo blkid /dev/sda1 # UUIDを調べる
sudo vim /etc/fstab
... # 先程調べたUUIDと設定を最後に追記する
 UUID=xxxxxxxxxxxx /mnt/ex-ssd ext4 discard,nofail 0 2
...
sudo mount -a
df -f | grep ex-ssd
  /dev/sda1        110G   83M  104G    1% /mnt/ex-ssd

nofailを指定しているのはマウント出来なかった場合でも起動をさせるためです

再びdfしてマウントされていればOK

以上

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?