2
0

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 5 years have passed since last update.

Ubuntu18.04で内蔵HDDをマウント

Posted at

概要

fstabコマンドを使って既存HDD(パーティション作成済)をマウントする方法を述べる。

デフォルト設定確認

$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

UUID確認

$ blkid 
/dev/sda1: UUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn" TYPE="LVM2_member" PARTUUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn"
/dev/sdb1: UUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn" TYPE="ext4" PARTUUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn"
/dev/sdc1: UUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn" TYPE="ext4" PARTUUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn"
/dev/mapper/ubuntu--vg-root: UUID="nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn" TYPE="ext4"

既存HDD設定追加

UUID=nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn /mnt/home ext4 errors=remount-ro 0 2
UUID=nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn /mnt/backup ext4 defaults 0 2

参考文献

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?