Sponsored Content
Full Discussion: CLI Change drive
Operating Systems Linux Ubuntu CLI Change drive Post 302583822 by Corona688 on Wednesday 21st of December 2011 10:14:41 AM
Old 12-21-2011
Quote:
Originally Posted by Royalist
Please -- I cannot find how to change in terminal from e.g. sda1 to sda2 or to sdb*
UNIX partitions don't work that way. You don't use drive letters or device names to access files. In UNIX, files are all organized as one great big tree. Instead of drive letters, UNIX uses directories as mount points. This lets you put partitions on whatever folder you want. This is even customizable.

This is what the file tree on my system looks like:

Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc3            1008M  318M  639M  34% /
udev                   10M  284K  9.8M   3% /dev
/dev/sdc5              20G   11G  8.4G  56% /home
/dev/sdc6             9.9G  4.6G  4.9G  49% /usr
/dev/sdc7             5.6G  1.6G  3.9G  29% /var
/dev/sdc8             116G  5.1G  111G   5% /var/lib/mysql
shm                   948M     0  948M   0% /dev/shm
/dev/md125            394G  351G   24G  94% /opt
/dev/md126            1.5T  1.4T  106G  93% /opt/disk-images
$

'udev' and 'shm' are special kernel filesystems which you can ignore for now.

If I created a file inside /, or /tmp/, or /sbin/, or /etc/ -- nowhere inside any of the other folders listed -- the file would end up inside /dev/sdc3.

If I created a file in /home/username/, it would end up in /dev/sdc5.

My /var/ partition ended up not being large enough to hold our database, so I grafted another partition onto /var/lib/mysql for it to work inside.

Which partitions go where is traditionally controlled by lines in the /etc/fstab file, but various systems may handle it different ways.

Last edited by Corona688; 12-21-2011 at 11:22 AM..
This User Gave Thanks to Corona688 For This Post:
 

8 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

2. UNIX for Dummies Questions & Answers

Map Drive From Windows To Apache Shared Drive?

Anyone know how I can map a windows drive to an apache shared drive? In my httpd.conf file, I have: Alias /merc_rpts/ "/u/merc_rpts/" <Directory "/u/merc_rpts"> Options Indexes </Directory> I'm able to bring up a browser and see the contents of this folder. In... (0 Replies)
Discussion started by: gseyforth
0 Replies

3. UNIX for Dummies Questions & Answers

Some CLI questions

I use Ubuntu Linux, and I'd like to become more familiar with the CLI. I have these questions: 1) How to remove a directory that is not empty? The only option in man rmdir is -p and that does not do what I need. rm -R needs sudo for some reason. 2) What is a CLI command to make all the files... (3 Replies)
Discussion started by: dotancohen
3 Replies

4. SCO

mounting USB floppy drive /Flash drive in OSR 6.0

Can anybody help me out to mount USB flash /floppy drive in sco openserver 6.0 . (5 Replies)
Discussion started by: sureshdrajan
5 Replies

5. Hardware

How to Clone a Drive with 512 byte Sectors to a Drive with 4096 bytes/sector (AF)?

I have a 320 GB drive which dual boots Windows and Debian: Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal):... (0 Replies)
Discussion started by: phillipsoasis
0 Replies

6. UNIX for Dummies Questions & Answers

Need help to move .csv file from UNIX path to windows shared drive or c:\ drive

Hi Guys, Can any one help me on this. I need help to move .csv/.xls file from unix path to windows shared drive or c:\ drive? Regards, LKR (1 Reply)
Discussion started by: lakshmanraok117
1 Replies

7. Solaris

Drive is showing offline in the /var/adm/messages and shows "drive type unknown" in the format outpu

Hi, I am facing issue with one of the drive is solaris 10. it is showing offline in the messages file scsi: WARNING: /pci@2,600000/QLGC,qlc@0/fp@0,0/ssd@w5006016746e00b1b,0 (ssd0): drive offline genunix: WARNING: Page83 data not standards compliant DGC LUNZ 0430 ... (1 Reply)
Discussion started by: Prasanth T K
1 Replies

8. Shell Programming and Scripting

Change file permission of mounted drive Linux

I got a problem with the permission of mounted 2TB drive in my Linux/Mint system. All the files in any folder are with 777, which is not what I want. my fstab line for this disk is: UUID=90803E0C803DF974 /media/grape/Workspace1_ntfs ntfs auto,users,permissions 0 0 and blkid gave me: $> blkid ... (4 Replies)
Discussion started by: yifangt
4 Replies
volcheck(1)							   User Commands						       volcheck(1)

NAME
volcheck - checks for media in a drive and by default checks all floppy media SYNOPSIS
volcheck [-v] [-i secs] [-t secs] pathname DESCRIPTION
The volcheck utility tells volume management to look at each dev/pathname in sequence and determine if new media has been inserted in the drive. The default action is to volcheck all checkable media managed by volume management. OPTIONS
The following options are supported: -i secs Set the frequency of device checking to secs seconds. The default is 2 seconds. The minimum frequency is 1 second. -t secs Check the named device(s) for the next secs seconds. The maximum number of seconds allowed is 28800, which is 8 hours. The fre- quency of checking is specified by -i. There is no default total time. -v Verbose. OPERANDS
The following operands are supported: pathname The path name of a media device. EXAMPLES
Example 1 A sample of the volcheck command. The following example example% volcheck -v /dev/diskette /dev/diskette has media asks volume management to examine the floppy drive for new media. The following example example% volcheck -i 2 -t 600 /dev/diskette1 & asks volume management if there is a floppy in the floppy drive every 2 seconds for 600 seconds (10 minutes). FILES
/dev/volctl volume management control port ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWvolu | +-----------------------------+-----------------------------+ SEE ALSO
eject(1), rmmount(1M), attributes(5) WARNINGS
Due to a hardware limitation in many floppy drives, the act of checking for media causes mechanical action in the floppy drive. Continu- ous polling of the floppy drive will cause the drive to wear out. It is recommended that polling the drive only be performed during periods of high use. SunOS 5.11 28 Feb 2007 volcheck(1)
All times are GMT -4. The time now is 08:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy