24 02 2021
Linux mount/umount
-
mount 확인후 할당
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
[root@test etc]# fdisk -l Disk /dev/sdb: 256.1 GB, 256060514304 bytes, 500118192 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x00085ecd Device Boot Start End Blocks Id System /dev/sdb1 2048 500117503 250057728 83 Linux Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x0009f1b1 Device Boot Start End Blocks Id System /dev/sdc1 2048 3907028991 1953513472 83 Linux Disk /dev/sda: 256.1 GB, 256060514304 bytes, 500118192 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0001e6f8 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 466563071 232231936 83 Linux /dev/sda3 466563072 500117503 16777216 82 Linux swap / Solaris [root@test etc]# df Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 16359468 0 16359468 0% /dev tmpfs 16369908 0 16369908 0% /dev/shm tmpfs 16369908 115444 16254464 1% /run tmpfs 16369908 0 16369908 0% /sys/fs/cgroup /dev/sda2 228455892 6355972 210471940 3% / /dev/sdb1 246002848 60572 233423008 1% /backup1 /dev/sda1 999320 147456 783052 16% /boot /dev/sdc1 1922728752 6486828 1818549868 1% /backup2 tmpfs 3273984 0 3273984 0% /run/user/0 [root@test etc]# vi /etc/fstab [root@test etc]# umount /dev/sdc1 [root@test etc]# df Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 16359468 0 16359468 0% /dev tmpfs 16369908 0 16369908 0% /dev/shm tmpfs 16369908 115444 16254464 1% /run tmpfs 16369908 0 16369908 0% /sys/fs/cgroup /dev/sda2 228455892 6355988 210471924 3% / /dev/sdb1 246002848 60572 233423008 1% /backup1 /dev/sda1 999320 147456 783052 16% /boot tmpfs 3273984 0 3273984 0% /run/user/0 [root@test etc]# mount /dev/sdc1 /app mount: mount point /app does not exist [root@test etc]# cd / [root@test /]# mkdir app [root@test /]# mount /dev/sdc1 /app |
-
리부팅할경우도 마운트 유지
Auto mount (case restart)
[root@test /]# vi /etc/fstab
1 2 3 4 5 6 7 8 9 10 11 12 |
# /etc/fstab # Created by anaconda on Tue Feb 16 19:12:05 2021 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=44821e00-59a5-4d92-a1a8-10c9154cc5ca / ext4 defaults 1 1 UUID=fd18a2c6-d9b5-45ae-8050-80e600a161a8 /boot ext4 defaults 1 2 UUID=46b1cbd5-2d3d-43ac-891e-7484419ee4cb swap swap defaults 0 0 /dev/sdb1 /backup1 ext4 defaults 2 1 /dev/sdc1 /app ext4 defaults 3 1 ~ |
Comments are currently closed.