linux disk command
2011-11-09 23:24
441 查看
1 mounted disk information
there are three files to record the mounted disk information
a、/etc/fstab
$cat /etc/fstab
# /etc/fstab: static file systeminformation.
#
# Use 'blkid'to print the universally unique identifier for a
# device; this may be used with UUID= as amore robust way to name devices
# that works even if disks are added andremoved. See fstab(5).
#
# <file system> <mountpoint> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d/ ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=8d4dae04-12e7-498f-a7d7-54a4cf460ddbnone swap sw 0 0
/dev/scd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
b、/etc/mtab
$cat /etc/mtab
/dev/sda1 / ext4rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devptsrw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfsrw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfsrw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
binfmt_misc /proc/sys/fs/binfmt_miscbinfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/oma/.gvfsfuse.gvfs-fuse-daemon rw,nosuid,nodev,user=oma 0 0
c 、/proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfsrw,nosuid,nodev,noexec,relatime 0 0
proc /proc procrw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfsrw,relatime,size=1931844k,nr_inodes=482961,mode=755 0 0
devpts /dev/pts devptsrw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfsrw,nosuid,relatime,size=775904k,mode=755 0 0
fusectl /sys/fs/fuse/connections fusectlrw,relatime 0 0
/dev/disk/by-uuid/1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d/ ext4 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime0 0
none /sys/kernel/security securityfsrw,relatime 0 0
none /run/lock tmpfsrw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfsrw,nosuid,nodev,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_miscbinfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
gvfs-fuse-daemon /home/oma/.gvfsfuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
2 check the uuid of the device
$ blkid
/dev/sda1: UUID="1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d" TYPE="ext4"
/dev/sda5: UUID="8d4dae04-12e7-498f-a7d7-54a4cf460ddb" TYPE="swap"
$ sudo blkid /dev/sdb
/dev/sdb: UUID="739bf91b-2f6d-44e6-bdad-bc88e33006a3" TYPE="ext4"
there are three files to record the mounted disk information
a、/etc/fstab
$cat /etc/fstab
# /etc/fstab: static file systeminformation.
#
# Use 'blkid'to print the universally unique identifier for a
# device; this may be used with UUID= as amore robust way to name devices
# that works even if disks are added andremoved. See fstab(5).
#
# <file system> <mountpoint> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d/ ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=8d4dae04-12e7-498f-a7d7-54a4cf460ddbnone swap sw 0 0
/dev/scd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
b、/etc/mtab
$cat /etc/mtab
/dev/sda1 / ext4rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devptsrw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfsrw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfsrw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
binfmt_misc /proc/sys/fs/binfmt_miscbinfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/oma/.gvfsfuse.gvfs-fuse-daemon rw,nosuid,nodev,user=oma 0 0
c 、/proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfsrw,nosuid,nodev,noexec,relatime 0 0
proc /proc procrw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfsrw,relatime,size=1931844k,nr_inodes=482961,mode=755 0 0
devpts /dev/pts devptsrw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfsrw,nosuid,relatime,size=775904k,mode=755 0 0
fusectl /sys/fs/fuse/connections fusectlrw,relatime 0 0
/dev/disk/by-uuid/1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d/ ext4 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime0 0
none /sys/kernel/security securityfsrw,relatime 0 0
none /run/lock tmpfsrw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfsrw,nosuid,nodev,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_miscbinfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
gvfs-fuse-daemon /home/oma/.gvfsfuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
2 check the uuid of the device
$ blkid
/dev/sda1: UUID="1e1a19ac-59bc-4ff9-a503-e6cf2cf3797d" TYPE="ext4"
/dev/sda5: UUID="8d4dae04-12e7-498f-a7d7-54a4cf460ddb" TYPE="swap"
$ sudo blkid /dev/sdb
/dev/sdb: UUID="739bf91b-2f6d-44e6-bdad-bc88e33006a3" TYPE="ext4"
相关文章推荐
- Linux fdisk Command Examples to Manage Hard Disk Partition
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- linux command sfdisk -s & hdparm -t /dev/sdb & tcpdump
- arm-linux-androideabi-gcc: Command not found
- 15+ tar command usages with examples – Unix/Linux--reference
- linux sfdisk partition
- 一个在线的command line for linux
- Linux personal command manual
- Linux学习日志(10)- 编译内核make uImage出错“mkimage" command not found…”
- Linux Command Tutorial
- linux mount disk
- Linux:-bash: ***: command not found
- the linux command line学习笔记之五
- Oracle Linux xargs Command
- How To: set udev rule for setting the disk permission on ASM disks when using multipath on Linux 6.x
- Linux 非常好用的command (持续更新)